Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97902 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58829 invoked from network); 20 Jan 2017 21:08:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2017 21:08:57 -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 74.125.82.169 as permitted sender) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 74.125.82.169 mail-ot0-f169.google.com Received: from [74.125.82.169] ([74.125.82.169:34676] helo=mail-ot0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/29-00729-86C72885 for ; Fri, 20 Jan 2017 16:08:57 -0500 Received: by mail-ot0-f169.google.com with SMTP id f9so64517658otd.1 for ; Fri, 20 Jan 2017 13:08:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lerdorf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nops4gjpgfEcBN8QY29CV8dBZ8Y75tVH3y5sxMmh4hs=; b=pE9dq4MuVm3btippWRyKpCmQzGEW/e3qrx5vys871a53jDj6pa63qFgZbUutsgIMoV 2vHu/ePa1nOIlW9A2SjioggdYd8EIak7fGimIAyn5dUU4oQBq8BxqK7aKYwKNl4Zuj+N gldyCY9PyyF8ssAAxhjKZXGrraDkS5uVPDPS7OG24XfkKhStBvk5vmq0gZ76mbFqtm/h lukzbuFrzjFDaNeUMky0Ejh/srsrBEdHY3VDHHtf8rcWyWZewI5/wMDzUlXU/QJBaRy/ aQ5Ukcy64voXW1ppbKeUhdAY+SIh3dEycH5spsxOOmiAYsZPrkL0QFGPHkCElsS2dscb WfKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nops4gjpgfEcBN8QY29CV8dBZ8Y75tVH3y5sxMmh4hs=; b=KQOou788ciLwASYaC5XktY+V4vdRGX3FlqP36gLTTO6ZkocuOzZL7uQcFR0wlrBnqS nnvXEfSMLoFXK/HNGCiFK2r0oMQb/smWv8Dwl8B+t8JG0vdP9vPm1GQU6DVNyrN5pAWs 9P1u9dnECa7F0qnq681AMuSp38S6uMAZsROCtSVqPHptWZC2kM7PNAAi3pkM9SSVlW5k 3xG8giOrjbWPFCBn27bdYwhh/9EL8ZFQMGr2UAu4bJZywwmeHY0Nk+JAbk1ayJmjU6lX 2B7lS0ymg86rE0Ds5HzkyxK9/2x9LifyvOxMjSNdojKJQnGszXD0TnvHp6n4hROsv5XT 7b8g== X-Gm-Message-State: AIkVDXKVS7a+HohjsJnggA+OLcGLNCu9PYRw+AL559lghWbf4+aEOAGadYhrjf3IGlpisnvp0a2iI0KpeBlLQw== X-Received: by 10.157.7.6 with SMTP id 6mr8926424ote.194.1484946533502; Fri, 20 Jan 2017 13:08:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 20 Jan 2017 21:08:43 +0000 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: multipart/alternative; boundary=001a113e1fe4a3f57905468d0e48 Subject: Re: [PHP-DEV] pdo_sqlite fd leak From: rasmus@lerdorf.com (Rasmus Lerdorf) --001a113e1fe4a3f57905468d0e48 Content-Type: text/plain; charset=UTF-8 On Fri, Jan 20, 2017 at 12:58 Nikita Popov wrote: > > From the docs for sqlite3_close(): > > > If the database connection is associated with unfinalized prepared > > statements or unfinished sqlite3_backup objects then sqlite3_close() > > will leave the database connection open and return SQLITE_BUSY > . > > If sqlite3_close_v2() is called with unfinalized prepared statements > > and/or unfinished sqlite3_backups, then the database connection becomes > > an unusable "zombie" which will automatically be deallocated when the > > last prepared statement is finalized or the last sqlite3_backup is > > finished. The sqlite3_close_v2() interface is intended for use with > > host languages that are garbage collected, and where the order in which > > destructors are called is arbitrary. > > > > > That sounds like it could be the source of the issue. > Ah, that makes more sense that 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. -Rasmus --001a113e1fe4a3f57905468d0e48--