Bug #71482 [NEW]: Lost zend_string after "reached pm.max_children setting" with segfault

From: Date: Fri, 29 Jan 2016 09:12:12 +0000
Subject: Bug #71482 [NEW]: Lost zend_string after "reached pm.max_children setting" with segfault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198954@lists.php.net to get a copy of this message
From: alex dot schneider at sevenval dot com Operating system: Linux Mint 17.3 PHP version: 7.0.2 Package: PCRE related Bug Type: Bug Bug description:Lost zend_string after "reached pm.max_children setting" with segfault Description: ------------ The destruction of "HashTable module_registry" sometimes "throws" a segfault in module "pcre". I can give you the following infos only: * The segfault is "thrown" while the destruction of "HashTable module_registry" by "zend_hash_graceful_reverse_destroy(&module_registry)", but before "PHP_GSHUTDOWN_FUNCTION(pcre)" * The trigger is the "ZEND_API void ZEND_FASTCALL zend_hash_destroy(HashTable *ht)" function in zend_hash.c (line 1272) "if (EXPECTED(p->key)) {" with "Access to address 0xXXXXXXXXX is not allowed" In the meantime while my test suite runs, I see in the log: WARNING: [pool fit] server reached pm.max_children setting (2), consider raising it I think, the bug is related to #63180. My patch (attached here) works for me. Perhaps your experts can examine the differences here. PS: Sorry for my english :) Test script: --------------- Unfortunately, i cannot isolate the trigger code from my very complex test suite with a lot of test methods and requests. fpmlimits.conf for triggering the segfault: ... pm = dynamic pm.max_children = 2 pm.start_servers = 2 pm.min_spare_servers = 2 pm.max_spare_servers = 2 pm.max_requests = 5 ... Expected result: ---------------- No segfaults Actual result: -------------- segfaults -- Edit bug report at https://bugs.php.net/bug.php?id=71482&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71482&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71482&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71482&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=71482&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=71482&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=71482&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=71482&r=needscript Try newer version: https://bugs.php.net/fix.php?id=71482&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=71482&r=support Expected behavior: https://bugs.php.net/fix.php?id=71482&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=71482&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=71482&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=71482&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71482&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=71482&r=dst IIS Stability: https://bugs.php.net/fix.php?id=71482&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=71482&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=71482&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=71482&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=71482&r=mysqlcfg

« previous php.bugs (#198954) next »