httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <>
Subject Re: Apache/pthread and locking problem
Date Tue, 10 Aug 1999 18:21:03 GMT

In article <> you wrote:
> The Apache/pthread stuff was developed under Linux.  It has worked in the
> past on FreeBSD.  Which version of FreeBSD are you using?  Which locking
> mechanism are you using?  

I'm at FreeBSD 3.1 and tried both flock and fcntl variants.

> I am assuming you are using the poll/accept
> model, and not the fd-queue model.  

Yes, I've not changed the uncommented line of ``#define USE_ACCEPT_QUEUE'' in
http_accept.h. But even with this I get the same problem.

> Can you send me a stack-trace of the
> lock?

That's the problem. For a nice backtrace via gdb I can use -X, but then the
problem doesn't occur. When I start without -X and attach gdb to the processes
I get a bogus backtrace. And when I use ktrace I cannot really see the locking
problem, because it then looks more like an endless waitpid() related loop.
The only reasonable stuff I see is:

(gdb) bt
#0  0x180e05a4 in _flock ()
#1  0x80689db in accept_mutex_on (locknum=0) at acceptlock.c:612
#2  0x806817a in accept_thread (dummy=0x80c6130) at http_accept.c:126
#3  0x81bffac in ?? ()

This is with USE_ACCEPT_QUEUE after I connected to the child.

                                       Ralf S. Engelschall

View raw message