Bug #74714 [Opn->Wfx]: serialize() crashes with multiple threads / pthreads
| From: | cmb@php.net | Date: | Wed, 09 Jun 2021 15:06:41 +0000 |
| Subject: | Bug #74714 [Opn->Wfx]: serialize() crashes with multiple threads / pthreads | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-234308@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74714&edit=1
ID: 74714
Updated by: cmb@php.net
Reported by: benjamin dot roth at jaumo dot com
Summary: serialize() crashes with multiple threads / pthreads
-Status: Open
+Status: Wont fix
Type: Bug
Package: Reproducible crash
Operating System: Linux
PHP Version: 7.1.5
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
pthreads is no longer supported as of PHP 7.4.0[1].
[1] <https://github.com/krakjoe/pthreads/issues/929>
Previous Comments:
------------------------------------------------------------------------
[2017-06-08 17:47:28] benjamin dot roth at jaumo dot com
Description:
------------
serialize() seems to be not thread safe. Scripts crash with SIGSEGV or SIGABORT on a regular basis
if parallel threads do serialization with pthreads. Sometimes this happens at the end of the script
on shutdown and sometimes in the middle of script execution. As it is a race condition there is no
deterministic way to reproduce it but the attached script fails after some time in almost all cases.
Test script:
---------------
https://gist.github.com/brstgt/e04d08c237d84003103050dc7c371acd
Serialized file required as "entities.txt" in test script: https://cl.ly/2v3Y1o2S351Q
Run in loop until it segfaults or aborts. Normally between 1-30s
while true; do php scripts/segv.php || break; done
Expected result:
----------------
No SIGABORT or SIGSEGV
Actual result:
--------------
https://gist.github.com/brstgt/76e3e1135872e2ae1770ae4e59b66696
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74714&edit=1