Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28284 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12722 invoked by uid 1010); 7 Mar 2007 07:46:18 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 12706 invoked from network); 7 Mar 2007 07:46:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2007 07:46:18 -0000 Authentication-Results: pb1.pair.com smtp.mail=mv@binarysec.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mv@binarysec.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain binarysec.com from 193.27.78.88 cause and error) X-PHP-List-Original-Sender: mv@binarysec.com X-Host-Fingerprint: 193.27.78.88 unknown Linux 2.5 (sometimes 2.4) (4) Received: from [193.27.78.88] ([193.27.78.88:51603] helo=binarysec.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CF/81-29923-7CD6EE54 for ; Wed, 07 Mar 2007 02:46:16 -0500 Received: from michaelb651094 (unknown [172.16.2.1]) by binarysec.com (Postfix) with SMTP id 08C33196D; Wed, 7 Mar 2007 09:50:09 +0100 (CET) Message-ID: <015e01c7608c$75b51c80$070110ac@michaelb651094> To: "Wez Furlong" Cc: , References: <008c01c75c05$b6584ae0$070110ac@michaelb651094> <41168.216.230.84.67.1172786770.squirrel@www.l-i-e.com> <00ac01c75f2c$44efe280$070110ac@michaelb651094> <4e89b4260703062209r6197b580qd77958a3dc9004eb@mail.gmail.com> Date: Wed, 7 Mar 2007 08:44:30 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 Subject: Re: [PHP-DEV] Thread safe problem on module_registry (Zend API Feature/Change request) From: mv@binarysec.com ("Michael Vergoz") Hello Wez, Thanks for your feedback. Indeed the mutex that i placed isn't useful and in fact this is a test patch i made. I didn't know TsHashTable :) This says the mutex will not solve the problem to which i face. The dl() function can't work with ZTS. I coded other test source here : http://mykii.binarysec.com/PHP/Zend_API_module_registry_TSRM/first_shot.patch In fact the problem is deeper because there are other complex links as list_destructors that isn't TS whereas this one is used for the management of modules. The design of construction and destruction of the modules aren't adapted to TS environment. I think it's necessary to redesign the Modular aspect of PHP in order to solve these problems in-depth. I have some ideas about this subject but my time is very restricted. I propose to return to see you when I would have a serious proposal. Regards, Michael Vergoz ----- Original Message ----- From: "Wez Furlong" To: "Michael Vergoz" Cc: ; Sent: Wednesday, March 07, 2007 7:09 AM Subject: Re: [PHP-DEV] Thread safe problem on module_registry (Zend API Feature/Change request) > Just curious, why did you choose to mutex around a hash instead of > using the zend_ts_hash functions? > > Changing the access semantics while preserving the type and name of > that variable will cause any external modules that are unaware of that > change to subtly break, or if you're lucky, crash hard. > > Seems "better" to make that break a little bit more obvious by > changing the name, or introducing an API to encapsulate the correct > access semantics. > > These are just suggestions. My main comments are that the locking > macros are mildly ugly and that a lack of compile time enforcement on > the new locking requirement will cause people pain with modules > outside of the main php distribution. > > --Wez. > > > > On 3/5/07, Michael Vergoz wrote: >> Hello, >> >> I made a patch that "mutex'ed" module_registry and module_count. >> For the moment it doesn't solve the dl(). >> >> The patch for last CVS PHP_5_2 >> http://mykii.binarysec.com/PHP/module_registry_mutex/module_register_mutex.patch >> >> Small description : >> http://mykii.binarysec.com/PHP/module_registry_mutex/readme.txt >> >> Regards, >> Michael Vergoz >> >> ----- Original Message ----- >> From: "Richard Lynch" >> To: "Michael Vergoz" >> Cc: >> Sent: Thursday, March 01, 2007 11:06 PM >> Subject: Re: [PHP-DEV] Thread safe problem on module_registry (Zend API >> Feature/Change request) >> >> >> > On Thu, March 1, 2007 7:29 am, Michael Vergoz wrote: >> > >> > I don't claim to understand this issue fully/deeply, but I'm >> > definitely +1 on resurrecting 'dl' if this change fixes everything to >> > everyone's satisfaction. >> > >> > Not that my vote actually counts, as I've never had the skills/time to >> > actually contribute C code to PHP. >> > >> > I may be the only user on the planet with a shared host that lets me >> > use 'dl' to pull in extensions, but there it is, and I kinda need it, >> > as there are no other viable options to do what I need to do, other >> > than changing to a new webhost I might not like... :-) >> > >> > -- >> > Some people have a "gift" link here. >> > Know what I want? >> > I want you to buy a CD from some starving artist. >> > http://cdbaby.com/browse/from/lynch >> > Yeah, I get a buck. So? >> > >> > >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> >