Hi guys

I've just committed a bug fix aiming at curing a memory leak in the worker MPM bridge. With this commit the code in trunk reaches a new maturity level, but the current solution needs Apache 2.4

when running with the worker MPM the content generation callback is invoked within a thread which sets up its own private data including a mutex and a condition variable used to synchronize with one of the mod_rivet controlled threads. When a thread exits both the mutex and the cond variable must be released consistently otherwise you have a memory leak. Since by design Apache has no thread exit callback (which would be MPM specific) my solution was to exploit the current_thread field of connection_rec structure whose pointer is stored in the request_rec structure. Through the thread id I could get a pointer to thread pool and register a cleanup function with it. Unfortunately this piece of information is not in Apache 2.2

This also means the code cannot be run against the test suite. I'm confident tests would run successfully as no changes were made to the commands code, but we clearly need a test suite update capable of running the httpd binary with different MPMs.

thoughts?

 -- Massimo Manghi

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to