Bug #79646 [Com]: Segmentation fault in garbage collector

From: Date: Mon, 08 Jun 2020 20:19:29 +0000
Subject: Bug #79646 [Com]: Segmentation fault in garbage collector
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227361@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79646&edit=1

 ID:                 79646
 Comment by:         alexinbeijing at gmail dot com
 Reported by:        enumag at gmail dot com
 Summary:            Segmentation fault in garbage collector
 Status:             Open
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Alpine
 PHP Version:        7.4.6
 Block user comment: N
 Private report:     N

 New Comment:

I suggest you use setUp() and tearDown() to run gc_collect_cycles() before and after each test. See
if that makes the segfault happen more reliably. Also print out the names of the tests as they run.
See if it always segfaults on the same tests (or a few of them).

That would be a huge clue pointing to what is actually wrong.


Previous Comments:
------------------------------------------------------------------------
[2020-05-28 09:01:20] enumag at gmail dot com

@bwoebi I don't know. I'm using the php:7.4-alpine docker image. Is there one for
7.4.7RC1? If there is I can try but I won't be able to tell reliably if it got fixed since it
only happens occasionally in the first place...

Btw. bwoebi, really sorry for going off-topic here but there are number of issues with ext-uv and/or
amphp where I kinda need your help. Any chance you might find some time for them in June 2020?

------------------------------------------------------------------------
[2020-05-28 08:46:32] bwoebi@php.net

Is this possibly related to #79600? Can you please try with PHP 7.4.7RC1 whether the issue is still
present there?

------------------------------------------------------------------------
[2020-05-28 08:36:38] 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 ()





------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=79646&edit=1


Thread (21 messages)

« previous php.bugs (#227361) next »