Re: Re: Thread safe extension homologation
| From: | Rasmus Lerdorf | Date: | Thu, 28 Sep 2006 20:31:50 +0000 |
| Subject: | Re: Re: Thread safe extension homologation | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4193@lists.php.net to get a copy of this message | ||
Pierre wrote:
On Thu, 28 Sep 2006 13:53:35 -0300 mlemos@acm.org (Manuel Lemos) wrote:Also note that just because it may be threadsafe on one platform doesn't mean it will be threadsafe on another. Even on the same platform, the libc version, openssl version and just about any system-level library the extension requires can cause the extension not to be threadsafe. So you would need an amazingly complicated matrix looking something like:Hello, Is there any intention/plan to homologate PECL extensions in order to let developers know whether they are safe to use with multi-threaded Web servers? I think homologation could also be applied to core extensions but from what I read I guess most of them are thread safe already.It could be a very good addition. However it is a lot of work to really valid each extension and the underlying libraries. One problem is the very little usage of threaded environment by the PECL developers, it is not the environment of choice. I can think about three possible "labels": - Not thread safe: Known to fail, cannot be fixed easily or pointless - Thread safe Fully tested, TS garanteed (if we can say so, there is always unknown bugs) - Should be thread safe no issue should raised, but the extension has not been intensively tested, or not at all I do develop in TS environment frequently (windows, linux, apache2 or maintainer zts mode in console as tests), I should be able to help in one way or another.
libc-x libc-y libc-z openssl-x openssl-y libfoo-x fbsd4 no yes yes ? no yes fbsd6 no yes ? ? yes nolinux2.4 linux2.6 Solaris-X Solaris-Y Solaris-Z NetBSD-X NetBSD-Y OpenBSD-X OpenBSD-Y ... etc. And this is just for one extension. Add to that the fact that there is no real way to definitively say that something is threadsafe even if you limit it to a single platform with a defined set of libraries. There are no decent tools that will definitvely say whether there is a race condition hiding somewhere just waiting for the right combination of events to occur. The best you could ever do would be to go through the code and pick out uses of known unsafe functions like crypt() and thereby definitively state that something isn't threadsafe. -Rasmus