httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: Thread-unsafe libraries in httpd-2.0
Date Fri, 16 Aug 2002 16:10:02 GMT
Rodent of Unusual Size wrote:

>We had this discussion elsewhere, but just for the record..
>Justin Erenkrantz wrote:
>>And, my point back to you is that should be part of the documentation
>>of the module NOT of httpd-2.0.
>IMNSHO, that is *such* BS.  If someone has a working Web server
>and upgrades following our recommendations, and things stop working,
>it's not PHP that will get blamed.  PHP still works just fine; there
>always has been the potential for trouble with threaded libraries, but
>that wasn't an issue because the Web server didn't use threads.
>What changed?  The Web server; it started supporting threads.  So it
>behooves the Web server to document the potential for problems.  Why
>should the burden be put on PHP, or any other module for that matter?
>*They* weren't the ones that enabled threading.

I fear that you're skipping a fundamental point: the modules *did*
change.  Their maintainers had to actively port the module code
in order to release "Apache 2.0 compatible" versions of the modules.
When they ported to 2.0, the requirements for module developers
were the that they'd face if porting to any other threaded server:
* If you're running in a multithreaded server, make your module
  code thread-safe.
* If your module itself can load plug-ins at runtime, document
  the thread-safety requirements for the plug-in developers.
That's no different from one would have to do when porting an
Apache 1.3 module to, for example, the iPlanet httpd.

IMHO, we should document the preceding guideline for module
developers (that effort is already in progress) but a different
message for end users:
* If you're running 2.0 with a threaded MPM, and you add in
  3rd party modules, make sure the providers of those modules
  guarantee that they'll work in a multithreaded application.
* If any of those modules load other plug-ins at runtime via
  their own extension mechanisms (e.g., a page generation engine
  that can load plug-ins to connect to various databases), then
  you need to confirm that those plug-ins are thread-safe as


View raw message