httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject Re: [users@httpd] Failure in Apache 2.0.40 with perchild module
Date Sat, 21 Sep 2002 21:50:22 GMT

First of all, perchild is VERY experimental.  You should not be using it
in a production environment.  It isn't ready for it.

However, the bug that you are seeing, is because of the mutex type that
you are using.  Basially, we have an accept mutex, which is used to ensure
that only one process is in accept() at any one time.  Most platforms use
an accept mutex by default that cannot work with Perchild (reason
below).  The solution is to add:

AcceptMutex fcntl

To your config file.

The reason the default mutex type doesn't work, is that Apache creates the
mutex as root, but then changes the owner to the user/group that the child
processes run as.  This works for other MPMs, because all of the children
run as the same user/group.  However, Perchild uses different user/groups
for all children, so at best, only one of them will be able to open the
mutex.  Hence the bug.  The fcntl mutex fixes this, because the mutex is
opened in the parent, and the children just inherit the descriptor from
the parent process.

I should fix the code to use fcntl by default, and allow the default to be
overridden by people who understand what they are doing, but I keep
forgetting to do that.  I should also document this restrcition, but
documentation has taken a back-seat to getting the module more robust
currently.  This module is currently only useful to people who want to
actively help develop it.  I hope to fix that in the near future, but
other things keep coming up to divert my attention.

Ryan

On Sat, 21 Sep 2002, Andy Bierlair wrote:

> I have recently tried to configure apache 2.0.40 with the perchild
> module since this is the right solution for what I need with
> virtualhosting. Compilation works just fine but I am having big trouble
> starting apache after the new compilation.
> 
> This is what my error log says:
> 
> [Sat Sep 21 22:35:36 2002] [notice] child pid 32406 exit signal
> Segmentation fault (11)
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:36 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:37 2002] [notice] child pid 32420 exit signal
> Segmentation fault (11)
> [Sat Sep 21 22:35:37 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:37 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:37 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
> [Sat Sep 21 22:35:37 2002] [emerg] (13)Permission denied:
> apr_proc_mutex_unlock failed. Attempting to shutdown process gracefully.
> 
> 
> And so on, and so on... until I kill httpd entirely.
> A friend of mine has the same problem, so I think it is a problem in the
> module, isn't it?
> 
> I'd be glad to get some help on that issue, since I didn't find a
> solution anywhere so far.
> 
> --Andy
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

-- 

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message