httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Accept locking test code strangeness
Date Wed, 10 Oct 2001 04:51:49 GMT
[ I still haven't received this message, but saw it on apachelabs.org. ]

[ Blah, blah, blah, Sander says that pthread mutexes don't work on
  Linux.  ENOSYS is returned when calling setpshared.  ]

Yup.  PROCESS_SHARED is defined, but not implemented on Linux 2.4/
glibc 2+.  Therefore, no cross-process locks based on pthreads on 
Linux will work.  It will be merely PROCESS_PRIVATE which doesn't do 
you a lot of good in Apache 1.3 which is based on a prefork model.

Basically, if you say AcceptMutex pthread on 1.3, you will be running 
without an accept mutex - which I believe on later Linux versions is 
actually okay.  IIRC, Dean and Linus went back and forth on this I 
think on lkml - thundering herd isn't much of a problem on recent 
versions - Dean will have more concrete knowledge of this though.

FWIW, APR does an explicit check at configure-time to check for this 
bogosity and ends up disabling pthread cross-process locking on Linux.  
So, AcceptMutex pthread is not valid with Apache 2.0 on Linux.  =)  
-- justin


Mime
View raw message