|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-05-28 08:36 UTC] enumag at gmail dot com
Description: ------------ Recently my PHPUnit tests started failing with segfault occasionally on CI. It only started after PHP 7.4.6 was released so I'm guessing something was broken there. Unfortunately I'm unable to reproduce the segfault reliably so the best I was capable of doing it setting up my CI to run PHPUnit through GDB to get a stacktrace the next time it happened which is how I found that the segfault is related to garbage collection. Here is the trace: Program received signal SIGSEGV, Segmentation fault. 0x000055a7fb5ecccd in zend_gc_collect_cycles () #0 0x000055a7fb5ecccd in zend_gc_collect_cycles () #1 0x000055a7fb5ebe37 in gc_possible_root_when_full () #2 0x000055a7fb645f71 in execute_ex () #3 0x000055a7fb5f1bb2 in zend_generator_resume () #4 0x000055a7fb5f2632 in zim_Generator_send () #5 0x000055a7fb64bcae in execute_ex () #6 0x000055a7fb5f1bb2 in zend_generator_resume () #7 0x000055a7fb5f2632 in zim_Generator_send () #8 0x000055a7fb64bcae in execute_ex () #9 0x000055a7fb5f1bb2 in zend_generator_resume () #10 0x000055a7fb5f2632 in zim_Generator_send () #11 0x000055a7fb64bcae in execute_ex () #12 0x000055a7fb64d0ed in zend_execute () #13 0x000055a7fb5c7744 in zend_execute_scripts () #14 0x000055a7fb569428 in php_execute_script () #15 0x000055a7fb64f175 in do_cli () #16 0x000055a7fb3166a7 in main () PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 08:00:01 2025 UTC |
I can't really do anything here without a way to reproduce. GC issues are always tricky, and "something related to generator GC is broken" is not enough to go on :( You can try running PHP under valgrind, using something like USE_ZEND_ALLOC=0 valgrind php ...args optionally with --suppressions=php.supp from https://gist.github.com/nikic/8d404c6799a1532b0c10280f5e57a888 to reduce noise. That might give us a better idea of the root cause (which may have nothing to do with GC itself).