Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39026 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28105 invoked from network); 17 Jul 2008 01:29:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jul 2008 01:29:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:39163] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/C2-54589-D60AE784 for ; Wed, 16 Jul 2008 21:29:18 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 6B6A8C0D3EE; Wed, 16 Jul 2008 18:29:15 -0700 (MST) Received: from [192.168.1.132] (static-64-115-191-41.isp.broadviewnet.net [64.115.191.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id E022DC0D3ED; Wed, 16 Jul 2008 18:29:14 -0700 (MST) Message-ID: <487EA069.3080500@chiaraquartet.net> Date: Wed, 16 Jul 2008 21:29:13 -0400 User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Stanislav Malyshev CC: internals Mailing List References: <4855D62C.2010902@chiaraquartet.net> <487E5AE4.2050405@zend.com> In-Reply-To: <487E5AE4.2050405@zend.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] potential shutdown order issue From: greg@chiaraquartet.net (Greg Beaver) Stanislav Malyshev wrote: > Hi! > >> zend_destroy_rsrc_list(&EG(regular_list)). On the next line, >> zend_post_deactivate_modules() is called, which steps through the module >> list and unloads all the dynamically loaded modules. If one of these > > dl() is really troublesome... > >> I think this issue could be fixed by moving the >> zend_destroy_rsrc_list(&EG(regular_list)) call after the module >> shutdown. I've attached a patch demonstrating the principle (this fixes >> the hashtable destroyed message and I don't get anything bad like a >> segfault). > > But many resource dtors may need some action from modules they belong > to. If modules are already past shutdown, that may be a problem. > If we must spend time on supporting dl(), then I'd propose to fix > module dtor so that it wouldn't try to access EG(regular_list) - if it > happens as you described, it doesn't need it anyway. Hi, This has nothing to do with dl(). mysqli was loaded in php.ini via extension=mysqli.so I can't test the proposed fix until August, but it sounds like it would also fix the issue without messing with shutdown. Greg