Re: Segmentation fault in PHP 7.0.3 (and earlier versions)
| From: | julien PAULI | Date: | Fri, 05 Feb 2016 18:57:45 +0000 |
| Subject: | Re: Segmentation fault in PHP 7.0.3 (and earlier versions) | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-91091@lists.php.net to get a copy of this message | ||
On Fri, Feb 5, 2016 at 7:37 PM, Simon Svensson <sisve@devhost.se> wrote:
> Hi,
>
> I'm using Ondřej Surý's ppa which was recently upgraded to PHP 7.0.3. My
> test-suite is causing segmentation faults since 7.0.0 RC5, including the
> 7.0.3 release.
>
> I can reproduce this consistently by running my test-suite in PHPUnit.
> Identifying the tests executing when the fault occurs (using --debug)
> and rerunning them one-by-one does not reproduce the segmentation faults.
>
> I'm running this on Ubuntu 14.04.3 LTS. My application is built on with
> Laravel 5.1 and Doctrine 2.5. I'm using PHPUnit 4.8 and an in-memory
> sqlite database for the tests. (I'm mentioning this to convey what type
> of code is running.)
>
> My test-suite works on PHP 5.6 and HHVM.
>
> I've got a gist with a gdb backtrace, with and without opcache. (There's
> no difference.)
> With: https://gist.github.com/sisve/0f75be357e557d439c19
> Without: https://gist.github.com/sisve/01542193a27fd9da2b7b
>
> I've verified that the opcache is disabled by '/usr/bin/php7.0 -i | grep
> "opcache.enable"' not returning anything, and '/usr/bin/php7.0 -m'
> does
> not contain any entry for opcache. (I'm unsure if this is enough.)
>
> I've got some older backtraces from my previous failures. These may be
> related, or related to something totally different. These have unknown
> opcache-status (probably enabled).
> PHP 7.0.2: https://gist.github.com/sisve/05b4c4075ef223c4ab52
> PHP 7.0.0-RC?:
> https://gist.github.com/sisve/fe8e1b85b4cc488ff457
> PHP 7.0.0-RC5:
> https://gist.github.com/sisve/7ce5980e05068972b8e6
> PHP 7.0.0-RC5:
> https://gist.github.com/sisve/ad318ca820a38bdb8133
>
> I've been whining some time on irc about this, and finally got my thumb
> out of my behind to write this email.
>
> I doubt that these traces are enough to identify and solve the problem.
> What can I do to gather more information and debug this further?
>
Interesting.
The traces tell us some really vague clue, we'd really need a reproducer.
It seems to be involving generators triggered through reflection,
faulting on a foreach() by value.
However, can you confirm that you *don't* reproduce with a debug build
of PHP ? (exact same reproducer)
This is really weird. You may try -O0 -g only.
Julien.Pauli