Putting in locks is the easy part.  The tough part is finding which
libraries are safe and which ones aren't.  You can't really test for it as
thread bugs tend to be subtle, occur sporadically and get worse with load.
So who are we going to trick into testing this stuff for us on their
loaded production servers?  The only way to find this stuff is to sit down
and read the code very carefully.  Except of course when we don't have the
source for stuff.  Then what?

The Perl folks aren't really handling this yet and the Roxen guys don't
support nearly as many libraries as we do.

I have been pushing for some more attention to this problem within the ASF
and have tried to kickstart an effort to pool our knowledge. With enough
eyes we should be able to build a knowledgebase that summarizes which
libraries are threadsafe, which ones aren't, and which ones can be,
provided you use them correctly. The current status of this knowledgebase
is here:

http://httpd.apache.org/docs-2.0/developer/thread_safety.html

Unfortunately so far it is mostly a single set of eyes, mine in this case,
that have contributed.  I know few people here have cvs commit access to
the Apache cvs server, but you can bounce any additions through me.

I did it at the Apache level since I am trying to leverage the knowledge
the mod_perl folks have as well.

-Rasmus

On Thu, 22 Aug 2002, Kristian Koehntopp wrote:

> Am Mittwoch, 21. August 2002 22:09 schrieb Shane Caraveo:
> > Rasmus Lerdorf wrote:
> > > production quality. The best we can do is pick a small set
> > > of extensions and a small set of platforms and say that with
> > > the limited set of extensions, against a specific set of
> > > versions of addon libraries on a specific version of that
> > > OS, yes, it should be production quality - maybe.
>
> I believe the designers of the Roxen web server were in a similar
> situation as Roxen is threaded, too. They worked around this
> problem with wrapper functions that kept a per-library lock for
> each library that was not tested as threadsafe.
>
> They gradually improved the granularity of their locks, and
> isolated threadsafe functions, improving performance.
>
> How are the perl people handling this issue? I believe they are
> using the same libs as we do.
>
> Kristian
>


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to