Bug #78927 [Opn]: Crash in pcre2_code_free_8, zend_hash_destroy

From: Date: Mon, 09 Dec 2019 21:16:23 +0000
Subject: Bug #78927 [Opn]: Crash in pcre2_code_free_8, zend_hash_destroy
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-224177@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78927&edit=1 ID: 78927 Updated by: nikic@php.net Reported by: xnoreq at gmail dot com Summary: Crash in pcre2_code_free_8, zend_hash_destroy Status: Open Type: Bug Package: Reproducible crash Operating System: Linux 5.3.11 PHP Version: 7.4.0 Block user comment: N Private report: N New Comment: Thanks, the trace makes much more sense with this being a cli executable. fork() in most cases shouldn't matter, but here there might be a possible interference with the JIT mapped memory used by PCRE. Which Linux distro are you using and do you know how they build their PCRE binaries? If they are using --enable-sealloc, then this may indeed be incompatible with fork(). Which PHP version did you use before the upgrade? PHP 7.3 or something older? Previous Comments: ------------------------------------------------------------------------ [2019-12-09 20:59:13] xnoreq at gmail dot com This is tiny tiny rss's update script (update_daemon2.php) which is a cli executable. That's why the process name is also php (and not php-cgi or php-fpm). It forks off do to multiple updates in parallel and I guess that leads to the invalid frees. ------------------------------------------------------------------------ [2019-12-09 08:52:21] nikic@php.net Based on code inspection alone, I don't see what the issue could be. ------------------------------------------------------------------------ [2019-12-09 08:44:23] nikic@php.net It looks to me like for some reason the per-request PCRE cache gets shut down, even though FPM shouldn't be using it. ------------------------------------------------------------------------ [2019-12-08 13:49:44] xnoreq at gmail dot com Description: ------------ Since upgrade to 7.4 I keep getting crashes e.g. with tiny tiny rss. I have pcre.jit=1 and opcache.enable=1 in php.ini and use php-fpm. systemd-coredump[736717]: Process 736708 (php) of user 1001 dumped core. Stack trace of thread 736708: #0 0x00007fa2cfd92b5b n/a (libpcre2-8.so.0 + 0x1db5b) #1 0x00007fa2cfdbfba3 n/a (libpcre2-8.so.0 + 0x4aba3) #2 0x00007fa2cfd80c6b pcre2_code_free_8 (libpcre2-8.so.0 + 0xbc6b) #3 0x000055ba3fdfc233 n/a (php + 0x27e233) #4 0x000055ba4001110d zend_hash_destroy (php + 0x49310d) #5 0x000055ba3fdfc111 n/a (php + 0x27e111) #6 0x000055ba400065d4 zend_deactivate_modules (php + 0x4885d4) #7 0x000055ba3ffa02b6 php_request_shutdown (php + 0x4222b6) #8 0x000055ba40088d13 n/a (php + 0x50ad13) #9 0x000055ba3fdb92f7 n/a (php + 0x23b2f7) #10 0x00007fa2cfb2b153 __libc_start_main (libc.so.6 + 0x27153) #11 0x000055ba3fdb9a1e _start (php + 0x23ba1e) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78927&edit=1

« previous php.bugs (#224177) next »