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

From: Date: Mon, 15 Jun 2020 07:47:41 +0000
Subject: Bug #79646 [Opn]: Segmentation fault in garbage collector
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227486@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
 Updated by:         nikic@php.net
 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
+PHP Version:        7.4.7
 Block user comment: N
 Private report:     N

 New Comment:

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).


Previous Comments:
------------------------------------------------------------------------
[2020-06-15 06:59:53] enumag at gmail dot com

Unfortunately the segfault persists even with PHP 7.4.7. What should I do now?

------------------------------------------------------------------------
[2020-06-11 09:09:19] enumag at gmail dot com

Okay, not only it always fail in the same test but also in the same spot while the test is executed.
Also the spot is something with rather heavy usage of Generators so if bug #79600 can indeed cause
it then this is most likely the reason. I'll wait for PHP 7.4.7 to see if the problem
disappears or not.

------------------------------------------------------------------------
[2020-06-11 07:08:56] enumag at gmail dot com

Considering the fact that the tests always failed at the same percentage of completion I do think it
is always the same test - I was unable to pinpoint which one though. Is there a way to print test
name for each test when it starts? --testdox seem to only print it when the test is
finished.

However gc_collect_cycles() didn't help in making the bug more reliable to happen. It's
still completely random.

------------------------------------------------------------------------
[2020-06-08 20:19:29] alexinbeijing at gmail dot com

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.

------------------------------------------------------------------------
[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?

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=79646


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


Thread (21 messages)

« previous php.bugs (#227486) next »