Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:91092 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49855 invoked from network); 5 Feb 2016 19:39:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Feb 2016 19:39:12 -0000 X-Host-Fingerprint: 89.236.29.179 h59ec1db3.selucle.dyn.perspektivbredband.net Received: from [89.236.29.179] ([89.236.29.179:23166] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5B/F5-07203-F5AF4B65 for ; Fri, 05 Feb 2016 14:39:11 -0500 Message-ID: <5B.F5.07203.F5AF4B65@pb1.pair.com> To: internals@lists.php.net References: <4E.05.07203.40CE4B65@pb1.pair.com> X-Enigmail-Draft-Status: N1110 Date: Fri, 5 Feb 2016 20:39:08 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Posted-By: 89.236.29.179 Subject: Re: [PHP-DEV] Segmentation fault in PHP 7.0.3 (and earlier versions) From: sisve@devhost.se (Simon Svensson) On 05/02/16 19:57, julien PAULI wrote: > On Fri, Feb 5, 2016 at 7:37 PM, Simon Svensson 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 > Hi, At least the latest traces comes from the php7.0-dbg package. If I recall correctly the normal php7.0 package caused very hard-to-understand backtraces with memory addresses instead of proper function names. I've recompiled the latest from master on a vagrant machine (marcus/php7dev) that calls configure with --enable-debug. However, I do not speak configure-ish so I do not know if that's enough use the requested compilation flags. I am unable to reproduce the error with this recompiled source, both with the /usr/local/php70/bin/php and /usr/local/php70-debug/bin/php. This is the same experience I had with earlier releases, where I have been unable to reproduce the segmentation faults when recompiling (but always have them occur from the ppa). Is there any guide for compiling the source? I could attempt to setup a new virtual machine with Ubuntu 14.04 (instead of php7dev's Debian) to reproduce the error, but I do know know the steps needed to compile everything. The newly build, and working, versions: /usr/local/php70/bin/php --version: PHP 7.0.4-dev (cli) (built: Feb 5 2016 19:14:08) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies /usr/local/php70-debug/bin/php --version: PHP 7.0.4-dev (cli) (built: Feb 5 2016 19:19:10) ( NTS DEBUG ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies // Simon