Re: potential shutdown order issue
| From: | Dmitry Stogov | Date: | Thu, 21 Aug 2008 13:19:56 +0000 |
| Subject: | Re: potential shutdown order issue | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-40051@lists.php.net to get a copy of this message | ||
I missed the problem. How can I reproduce it?
Thanks. Dmitry.
Lukas Kahwe Smith wrote:
On 17.07.2008, at 03:29, Greg Beaver wrote:Stanislav Malyshev wrote:@Dmitry/Stas .. could you guys look into this issue? @Greg: can you provide any further context information? regards, Lukas Kahwe Smith mls@pooteeweet.orgHi!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.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 thesedl() 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.