quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Pederson ...@barryp.org>
Subject Session/mutex problem
Date Sun, 17 Aug 2003 15:20:23 GMT
Gregory (Grisha) Trubetskoy wrote:
> I just added another snapshot
> 
> http://www.modpython.org/tmp/httpd-python-20030814.tgz
> 
> and also the latest compilation of the html docs:
> 
> http://www.modpython.org/tmp/doc-html-20030814/
> 
> Now you have no excuse for not checking it out :-)

I was checking this out on a FreeBSD 5.1 box, with Apache 2.0.47 using 
the prefork MPM, and with the "User www" directive in httpd.conf.  When 
trying to use the new session code, got the exception:

---------
   File "/usr/local/lib/python2.3/site-packages/mod_python/Session.py", 
line 342, in do_load
     _apache._global_lock(self._req.server, None, 0)

ValueError: Failed to acquire global mutex lock
---------

Looking at the httpd-error.log, I found:

-----------
[Sun Aug 17 10:04:16 2003] [notice] mod_python: Creating 256 session 
mutexes based on 256 max processes and 0 max threads.
(13)Permission denied: mod_python: Failed to reinit global modutex 
/tmp/mpmtx191750.
(13)Permission denied: mod_python: Failed to reinit global modutex 
/tmp/mpmtx191750.
(13)Permission denied: mod_python: Failed to reinit global modutex 
/tmp/mpmtx191750.
------------
(modutex? typo there)


Looking in the /tmp folder, I found the mutex files with permissions 
such as:

-rw-------  1 root    wheel    0 Aug 17 10:04 mpmtx191750

So...I'm guessing the mutex files are created before apache forks and 
switches from the "root" user to the "www" user, and can't access those 
files?

     Barry


Mime
View raw message