VAMPIRE

Patches

If you are using Apache 2.0 and mod_python 3.X with a multithreaded MPM, it is recommended you apply the patches listed below to mod_python.

The bugs are present in versions at least up to and including 3.1.4 of mod_python. The diffs are with respect to version 3.1.3 of mod_python but should also work for version 3.1.4. The patches have been accepted for inclusion into the next release of mod_python.

The first patch fixes a problem whereby on initial startup under heavy load, duplicate interpreters can be created for the same named interpreter. Only one will end up being retained, but the others will probably result in a memory leak. Further, if special resources are acquired in each instance of the interpreter you can end up with redundantly allocated resources. This can be a problem if for example the resource is a database connection pool.

The second patch fixes a problem in the module loading and caching system, whereby a module can be reloaded multiple times by different threads. Theoretically this can happen even when auto reloading is turned off, as it could happen on the initial load of a module. The fix isn't the most ideal solution to use, but to do it properly requires the module importing system to be rewritten.

There are actually a couple of other bugs in mod_python in respect of setting up variables denoting the handler directory and interpreter name. Where relevant, Vampire provides a workaround for these problems and it isn't necessary to patch mod_python for these particular issues. As such no patch is provided for those bugs.

For further information on the problems, see past postings on the mod_python mailing list or the mod_python bugs web site at: