Issue Details (XML | Word | Printable)

Key: MODPYTHON-150
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Graham Dumpleton
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

make_obcallback not thread protected

Created: 22/Mar/06 05:14 AM   Updated: 11/Apr/07 11:37 AM
Return to search
Component/s: core
Affects Version/s: 3.1.4, 3.2.8
Fix Version/s: 3.3.1

Time Tracking:
Not Specified

Resolution Date: 22/Mar/06 06:48 AM


 Description  « Hide
In get_interpreter() function of src/mod_python.c the check of whether or not the callback object has been created is not within the bounds of the acquisition of the interpreters lock. As a result, in a multithreaded MPM, although the creation of the interpreter itself is protected so that only one thread will get to create it, multiple threads may decide the need to call make_obcallback().

In the past this hasn't mattered, but now that apache.init() is doing more complicated things, such as caching parameters as global variables and also doing fiddles with the callback object to allow optional use of new module importer, problems can start to arise.

To fix the issue the release of the interpreters lock needs to be moved to the end of the get_interpreter() function.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.