Hi, On Tue, Apr 29, 2008 at 10:40:18AM -0400, Jorge Arellano Cid wrote:
On Tue, Apr 22, 2008 at 08:27:39PM +0200, Johannes Hofmann wrote:
Hi,
I just noticed, that dillo seems to close file descriptors twice via IO_close_fd, which causes problems when other threads run in parallel for name server queries. Here are the two call stacks via which IO_close_fd is called for each fd:
OK, I committed a commented patch for this. Please test it.
Yes, the double close problem is gone with this patch.
I'd be also interested to know whether this fixes the SIGPIPE problems you saw in your OS.
I remember removing the ignore SIGPIPE code because it didn't happen anymore in GNU/Linux. It'd be good to know where it comes from.
The SIGPIPE problem is still there: Program received signal SIGPIPE, Broken pipe. 0x283e1050 in write () from /usr/lib/libc.so.6 (gdb) bt #0 0x283e1050 in write () from /usr/lib/libc.so.6 #1 0x28297f2c in write () from /usr/lib/libpthread.so.0 #2 0x080712a2 in IO_callback (fd=<value optimized out>, io=0x282a18c0) at IO.c:226 #3 0x080713f7 in IO_fd_write_cb (fd=7, data=0x1) at IO.c:303 #4 0x080bd4b9 in fltk::wait () #5 0x080bd669 in fltk::run () #6 0x0804eadb in main (argc=Cannot access memory at address 0x0) at dillo.cc:110 The signal is delivered as dillo writes to a socket that has been closed by the remote side. I rather wonder, why this does not happen on Linux. I found this on the topic: http://www.developerweb.net/forum/showthread.php?t=2953 Cheers, Johannes