Re: potential shutdown order issue
| From: | Greg Beaver | Date: | Thu, 17 Jul 2008 01:29:13 +0000 |
| Subject: | Re: potential shutdown order issue | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39026@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
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. Gregzend_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. Hi,