Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87757 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26047 invoked from network); 14 Aug 2015 18:09:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2015 18:09:53 -0000 Authentication-Results: pb1.pair.com smtp.mail=neclimdul@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=neclimdul@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.171 as permitted sender) X-PHP-List-Original-Sender: neclimdul@gmail.com X-Host-Fingerprint: 209.85.213.171 mail-ig0-f171.google.com Received: from [209.85.213.171] ([209.85.213.171:35317] helo=mail-ig0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/E3-10952-DEE2EC55 for ; Fri, 14 Aug 2015 14:09:49 -0400 Received: by igbjg10 with SMTP id jg10so17431606igb.0 for ; Fri, 14 Aug 2015 11:09:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=W/GfPqVIjKwj/Ne7DSh+4YLaPGBrZj/Q8kphGc0sKBU=; b=dVl3R5m1ccvTDkaR5JAhs5RdypNAWDwCTT24aGynnjxqFwTb3Zf1w5tQwRoXdqHzsN WF5sicy9XJd/xR4rptST2aX+LP7A3vWSuR9PTcrGR0wCyM6IUclntMQkAydrcPejaO3Y Pby/NIaQ4BnKjbvqXIXiyHhdeKK1T0ur2C1ENXI/3nruX+rpOkw/Rwn6teiPqvDTC1Wv jQUZHzrUsJA1GmfKSEZOF+4LnzHis8pTOSexUHRW+INvkR4swGveJ9jLZeziR0UH/bQ7 pmBTt2CNB0UHCoKhp1rvkF/1J0xg/ZCap8CNRY1vAHutnO0D2VyCxMKZFAFaXMme+Rtp 5vZw== MIME-Version: 1.0 X-Received: by 10.50.64.147 with SMTP id o19mr3864165igs.33.1439575786466; Fri, 14 Aug 2015 11:09:46 -0700 (PDT) Received: by 10.79.79.66 with HTTP; Fri, 14 Aug 2015 11:09:46 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 Aug 2015 13:09:46 -0500 Message-ID: To: Xinchen Hui Cc: "internals@lists.php.net" , Dmitry Stogov Content-Type: multipart/alternative; boundary=047d7bea2f986134b7051d495b1b Subject: Re: [PHP-DEV] Need help finding segfault in php 7 From: neclimdul@gmail.com (James Gilliland) --047d7bea2f986134b7051d495b1b Content-Type: text/plain; charset=UTF-8 Man I'm glad you figured that out because even with the test case I can't figure out what's going on :) On Fri, Aug 14, 2015 at 12:15 PM, Xinchen Hui wrote: > Hey: > > > On Thu, Aug 13, 2015 at 8:36 PM, James Gilliland > wrote: > > So I've been trying for a couple days to narrow down this bug: > > https://bugs.php.net/bug.php?id=70242 > > > > I can consistently recreate it with a complex test, but I have thus far > not > > been able to find a pattern that helps me narrow down to a test script. I > > thought maybe I could reach out and see if I could get some help > > understanding what is happening in php and see if that has any clues. > > > > > > Seemingly important facts I've found digging through in gdb. > > 1) The connection related pointers on the stmt are already freed when the > > fault happens. It looks like the statement is being freed after the > > connection and the if (S->H->server) { surrounding the failing code is > not > > sufficient to catch this > > 2) The trace has a spl_iterator in it so it seems like that is holding on > > to the stmt pointer. There is a IteratorIterator used on a PDO stmt in > the > > code. But also in a lot of other non-triggering seemingly identical code > > and I haven't been able to get this to work. > > 3) The code in shutdown_executor that is triggering this is the 6th block > > of cleanups which seems to support 1). It is the block without any > > documentation which is sort of my luck in this. > > > > I'm guessing there is some way I need to trick a object to hold onto a > > reference through the other cleanups or something or trigger some sort of > > reference counter quirk but I just can't find it. Any help is > appreciated. > > thanks for the ssh access , I finally get the reason of this bug.. > > I get a simple reproduce script and quick fix. all listed in > https://bugs.php.net/bug.php?id=70272&thanks=1 > > @dmitry: do you see a better solution ? > > thanks > > > -- > Xinchen Hui > @Laruence > http://www.laruence.com/ > --047d7bea2f986134b7051d495b1b--