Bug #924
1.5.0 doesn't work on FreeBSD
| Status: | Fixed | Start: | ||
| Priority: | Normal | Due date: | ||
| Assigned to: | - | % Done: | 0% |
|
| Category: | core | |||
| Target version: | - | |||
| Pending: | Resolution: | fixed |
||
Description
aio_suspend is not currently implemented in FreeBSD.
configure finds aio.h, but also seems not to use "linux-aio":
[...] checking for lua... yes checking for LUA... yes checking for libaio... no checking for library containing aio_suspend... none required checking aio.h usability... yes checking aio.h presence... yes checking for aio.h... yes checking for library containing crypt... -lcrypt [...] enabled: auth-crypt compress-bzip2 compress-deflate compress-gzip large-files network-openssl regex-conditionals disabled: auth-ldap linux-libaio network-ipv6 stat-cache-fam storage-gdbm storage-memcache webdav-locks webdav-properties
Manually editing config.h (removing HAVE_AIO_H) works around this and reverts to the previous behaviour: it dumps on the first requested page.
GNU gdb 6.1.1 [FreeBSD] [...] (gdb) bt #0 0x282514af in kevent () from /lib/libc.so.6#10x0805f9e1 in fdevent_freebsd_kqueue_poll ()#20x0804db58 in lighty_mainloop ()#30x0804ed4d in main () (gdb) c Continuing. [...a request is done...] Program received signal SIGSEGV, Segmentation fault. 0x0805bc5a in fdevent_get_revents () (gdb) bt #0 0x0805bc5a in fdevent_get_revents ()#10x0804db70 in lighty_mainloop ()#20x0804ed4d in main () (gdb)
-- lapo
History
12/02/2006 07:15 AM - jakabosky
can you compile it with debugging turned on.
This is what I use on my linux computer:
CFLAGS=" -g3 -O " CXXFLAGS=" -g3 -O " ./configure --enable-maintainer-mode
I only use linux but I might be able to find the problem, if you do another backtrace
with debugging turned on.
12/02/2006 10:25 AM - Anonymous
Sure, here it goes:
[Switching to Thread 0x8082000 (LWP 100092)]
0x08060eab in fdevent_get_revents (ev=0x8098000, event_count=1,
revents=0x8095aa0) at fdevent.c:216
216 fdevent_revent *r = revents->ptr[i];
(gdb) bt
#0 0x08060eab in fdevent_get_revents (ev=0x8098000, event_count=1,
revents=0x8095aa0) at fdevent.c:216
#1 0x0804efa7 in lighty_mainloop (srv=0x8085000) at server.c:972
#2 0x08050775 in main (argc=4, argv=0xbfbfeaa0, envp=0xbfbfeab4)
at server.c:1673
BTW: It seems that aio_suspend is implemented really, but must must be loaded into the kernel with kldload aio (it also lacks to recognize the need for -pthread in the last link step).
-- lapo
12/02/2006 10:39 PM - jakabosky
- cd lighttpd/
- patch -p0 <../lighttpd-1.5.0-kqueue.diff
- make
12/03/2006 06:00 PM - Anonymous
That patch changed the segfault to:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x8082000 (LWP 100181)] 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? ()#10x0804effd in lighty_mainloop (srv=0x8085000) at server.c:991#20x08050775 in main (argc=4, argv=0xbfbfeaa0, envp=0xbfbfeab4) at server.c:1673
If I can debug it further to provide more infos, please tell me how.
-- lapo
12/04/2006 02:23 AM - jakabosky
I have changed the patch. You will need to revert the changes from the old patch.
svn revert src/fdevent_freebsd_kqueue.c
12/04/2006 09:47 PM - jakabosky
Jan or someone with write access to svn will need to commit the patch.
Also did you need to make any changes to get aio_suspend to work?