Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97918 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40704 invoked from network); 22 Jan 2017 00:46:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Jan 2017 00:46:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=cmbecker69@gmx.de; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cmbecker69@gmx.de; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.de designates 212.227.17.22 as permitted sender) X-PHP-List-Original-Sender: cmbecker69@gmx.de X-Host-Fingerprint: 212.227.17.22 mout.gmx.net Received: from [212.227.17.22] ([212.227.17.22:62190] helo=mout.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/B1-00729-3F004885 for ; Sat, 21 Jan 2017 19:46:44 -0500 Received: from [192.168.2.109] ([217.82.227.219]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M04uG-1cEotz3ynM-00uIy0; Sun, 22 Jan 2017 01:46:36 +0100 To: Rasmus Lerdorf , Nikita Popov References: Cc: PHP internals Message-ID: <4bc04e8d-d546-a671-6c88-cb44af2e0529@gmx.de> Date: Sun, 22 Jan 2017 01:47:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:OuJ0t7qNIg5oiUs9eUyKeMgwFZhywdNZhSC702NxnE3ODtpcDLW dCuBrLqyL/pwDoJIY9FCJeqgKCLt6VwlJWqs+ikYwbYBol1Qt1POud0fQ4HRsp1nz2Ul7Qx +wsTQQYVuPLVJIVnPNNgLFiReOHWE+tnQxkh26pQAyqT1nnc/9pwoWPc5kgfRnAd5Ao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0yWH1DRM3KTNi3HCviEYd1Qjs9pou8O 1TT2G2X5+8sZLUBHKjuvpYY= Subject: Re: [PHP-DEV] pdo_sqlite fd leak From: cmbecker69@gmx.de ("Christoph M. Becker") On 20.01.2017 at 22:41, Rasmus Lerdorf wrote: > 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. Anyhow, the SQLite3 documentation states[1]: | The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are | recommended for all new programs. The two older interfaces are | retained for backwards compatibility, but their use is discouraged. Isn't that reason enough to switch to sqlite3_prepare_v2() ASAP? Note that this is documented at least for more than nine years[2]! [1] [2] -- Christoph M. Becker