Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97903 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61465 invoked from network); 20 Jan 2017 21:41:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2017 21:41:50 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain lerdorf.com designates 209.85.218.50 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.218.50 mail-oi0-f50.google.com Received: from [209.85.218.50] ([209.85.218.50:35113] helo=mail-oi0-f50.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/89-00729-E1482885 for ; Fri, 20 Jan 2017 16:41:50 -0500 Received: by mail-oi0-f50.google.com with SMTP id j15so50387433oih.2 for ; Fri, 20 Jan 2017 13:41:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lerdorf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iuGnz/l6t/kwsc4Htr5pnU4XP9LcatTBYNWaWd7SX7Y=; b=kcTcF8VrK/nClIxKgosZfRPMWrGjZRZqFlhSZwDtp3+UkCO8H6ECJqmwvp/zTXLCQs LhmzB4uAZCmznGaH8vDY2gy8EvqkwKXGE82zlVeKoom5yYxDY+CiWgZfo/Fw6FR4m9rI O/WsI8lWI7Zsy6GtL0U+X8EPXdm4771AhtvEowK2dHPquRCjYDAcd9ZvpMzdY0deBj9E RTcK7tuIlPtTl5fHpapbk6EyEt967AmcfxNvXGkY/RnoWLIpLlVVog6rJ15ABkS+8kyB PbxHcEy/69SxoyJuoQn+LGRyBpkl3ESZYGtSfG/MkYx+KZnbRiuWS5PbTySKN2Ez9HTA TuHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iuGnz/l6t/kwsc4Htr5pnU4XP9LcatTBYNWaWd7SX7Y=; b=S8KShOaqizpIangRIIwD9xcLLiHLLLs/SbZCtgS7Lcd4RgxatL8Dr6tnfIpzAuOLxP lolg5MH/xk+pMX1OrxW81J1px7EHXrxCUuGKPZt7wCF9K8WFvT+Lqt5DlVgPj2U7lm97 eZv4jaY7Yfx7l/WAK/GmKWu7dtz17rJwoZwa2ND68egOOKTfg4y/Makl7qe6+71lkgX8 owQ8sV8z07LIXMdeHmyRStUuN2oY0B/WE+zRnOUk2xHkPGS0MIQBRNfTnecSxO99j+IC /Oer5aDzzuNlBg98yNCBMHAADzZK0z4k4mY3ig7ebgg+KJcwKenkO+bc1MCfc6wK/rEJ N6Rw== X-Gm-Message-State: AIkVDXK5En0aG24eeP1dl8i52T1kSKcFlcJDwQiV4/vB+o3b+0Pxukwyfrdw+Aq4pSbATlv6Dap7vMI/u1v/hw== X-Received: by 10.202.105.198 with SMTP id e189mr8464420oic.91.1484948507355; Fri, 20 Jan 2017 13:41:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.121.84 with HTTP; Fri, 20 Jan 2017 13:41:06 -0800 (PST) In-Reply-To: References: Date: Fri, 20 Jan 2017 13:41:06 -0800 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a1141b2664a81c505468d84d1 Subject: Re: [PHP-DEV] pdo_sqlite fd leak From: rasmus@lerdorf.com (Rasmus Lerdorf) --001a1141b2664a81c505468d84d1 Content-Type: text/plain; charset=UTF-8 On Fri, Jan 20, 2017 at 1:08 PM, Rasmus Lerdorf wrote: > > On Fri, Jan 20, 2017 at 12:58 Nikita Popov wrote: > >> >> That sounds like it could be the source of the issue. >> > Ah, that makes more sense than it never hitting that close call because I > couldn't find any scenario where we wouldn't get there eventually. So it > sounds like we should be calling sqlite3_close_v2() there instead. > Of course, something must be causing the unfinalized prepared statement in the first place so moving to the v2 close likely wouldn't fix it, just move it from an unclosed db handle to an unclosed "unusable zombie" handle, whatever that means. I also noticed that ext/sqlite3 uses sqlite3_prepare_v2() while pdo_sqlite uses sqlite3_prepare(). The differences in those two don't seem like they would affect whether the prepare is finalized or not though. There still must be some path where on a timeout we don't call pdo_sqlite_stmt_dtor() which does the finalize on the statement. -Rasmus --001a1141b2664a81c505468d84d1--