Skip to contentSkip to conversation

Epoll + ephttpd2.0 + Coro

DISCUSSION Philippe Meloche (LMC) 2 participants 2 messages Mar 25, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to run the ephttpd 2.0 server on a PII with a 2.4.19 kernel patched with /dev/epoll. But I have trouble with the coro ( C couroutine ) library. The server always does a segmentation fault when the function dph_exit_conn() calls co_exit(0). It's the fatal() function that generates this segmentation fault. Plus, this fault is automatically generated each time there is no more requests on a connection and that dph_httpd() calls dph_exit_conn().

I would like to know of you ever had this kind of problem and how you solved it. The version of coro I use is the 1.1.0-pre2. I need this http server to rebuild /dev/epoll tests on my computer for reference results.

Philippe Meloche

[email protected]

#1 lore raw
Quoted 10 lines · Philippe Meloche (LMC)

Hi,

I'm trying to run the ephttpd 2.0 server on a PII with a 2.4.19 kernel patched with /dev/epoll. But I have trouble with the coro ( C couroutine ) library. The server always does a segmentation fault when the function dph_exit_conn() calls co_exit(0). It's the fatal() function that generates this segmentation fault. Plus, this fault is automatically generated each time there is no more requests on a connection and that dph_httpd() calls dph_exit_conn().

Quoted 3 lines

I would like to know of you ever had this kind of problem and how you solved it. The version of coro I use is the 1.1.0-pre2. I need this http server to rebuild /dev/epoll tests on my computer for reference results.

You better use the latest patch :

http://www.xmailserver.org/linux-patches/epoll-lt-2.4.20-0.3.diff

and the latest library/ephttpd server :

http://www.xmailserver.org/linux-patches/epoll-lib-0.4.tar.gz

The new man pages are available here :

http://www.xmailserver.org/linux-patches/epoll.txt
http://www.xmailserver.org/linux-patches/epoll_create.txt
http://www.xmailserver.org/linux-patches/epoll_ctl.txt
http://www.xmailserver.org/linux-patches/epoll_wait.txt

The crashes you're seen are because of a gcc error compiling the coroutine library. The one that you'll find inside the epoll-lib should work. If I remember well the problem was solved by switching from -O3 to -O2 when building the coro library ...

- Davide