Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39025 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69670 invoked from network); 16 Jul 2008 20:32:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jul 2008 20:32:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:8032] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/08-54589-CCA5E784 for ; Wed, 16 Jul 2008 16:32:13 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 16 Jul 2008 23:32:40 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 16 Jul 2008 13:32:37 -0700 Message-ID: <487E5AE4.2050405@zend.com> Date: Wed, 16 Jul 2008 13:32:36 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Gregory Beaver CC: internals Mailing List References: <4855D62C.2010902@chiaraquartet.net> In-Reply-To: <4855D62C.2010902@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 16 Jul 2008 20:32:37.0109 (UTC) FILETIME=[15B6C250:01C8E783] Subject: Re: [PHP-DEV] potential shutdown order issue From: stas@zend.com (Stanislav Malyshev) 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. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com