[mod_python] mod_python 3.1.1b and sessions: Failed to acquire global mutex lock

StianSøiland stian at soiland.no
Mon Oct 27 09:30:48 EST 2003

I've just downloaded and installed the 3.1.1b from
http://www.apache.org/dist/httpd/modpython/ (dated 2003-10-24) - and
tested it with these two webservers:
   Redhat 9 - httpd-2.0.40-21.5
   Debian unstable - apache2-mpm-prefork 2.0.47-1

There seems to be some mutex permission problems:

    from mod_python.Session import Session
    def test(req):
        session = Session(req)
        doc = "<html><body><h1>hello</h1>Counts: %s</body></html>"
        counter = session.setdefault('count', 0)
        doc %= counter
        return doc

Yields on both servers:

[Mon Oct 27 08:54:12 2003] [notice] mod_python: Creating 32 session mutexes
    based on 150 max processes and 0 max threads.

(seems OK)

[Mon Oct 27 08:54:14 2003] [warn] (13)Permission denied: Failed to acquire
    global mutex lock at index 24
(.. traceback)
[Mon Oct 27 08:54:14 2003] [error] [client] PythonHandler
    mod_python.publisher: ValueError: Failed to acquire global mutex lock

Now, I can't find anything useful on mr. Google searching for this,
except some listing of a very similar bug that occured with mod_ssl.

The problem then was that the mutex was created by root - and
permissions never fixed so the httpd process could access it. Could it
be anything similar?

Any suggestions? (I'm really eager to test out 3.1.1b.. =) )

Stian Søiland               Work toward win-win situation. Win-lose
Trondheim, Norway           is where you win and the other lose.
http://www.soiland.no/      Lose-lose and lose-win are left as an
                            exercise to the reader.  [Limoncelli/Hogan]

More information about the Mod_python mailing list