Skip Menu |
 

This queue is for tickets about the BerkeleyDB CPAN distribution.

Report information
The Basics
Id: 101883
Status: open
Priority: 0/
Queue: BerkeleyDB

People
Owner: Nobody in particular
Requestors: david [...] cobite.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



MIME-Version: 1.0
X-Spam-Status: No, score=-1.9 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9] autolearn=ham
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"; format="flowed"
Message-ID: <54CF9F79.6010609 [...] cobite.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: amavisd-new at cobite.com
X-Spam-Score: -1.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DF8A4240369 for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Mon, 2 Feb 2015 11:02:22 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EQZ0JM4RPEjw for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Mon, 2 Feb 2015 11:02:22 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id B8A0D2400EC for <bug-BerkeleyDB [...] rt.cpan.org>; Mon, 2 Feb 2015 11:02:20 -0500 (EST)
Received: (qmail 21866 invoked by alias); 2 Feb 2015 16:02:20 -0000
Received: from 67.221.182.5.static.nyinternet.net (HELO sandy.cobite.com) (67.221.182.5) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 02 Feb 2015 08:02:16 -0800
Received: from localhost (localhost [127.0.0.1]) by sandy.cobite.com (Postfix) with ESMTP id D006E39AD for <bug-BerkeleyDB [...] rt.cpan.org>; Mon, 2 Feb 2015 11:02:11 -0500 (EST)
Received: from sandy.cobite.com ([127.0.0.1]) by localhost (sandy.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qVRZTaffUuii for <bug-BerkeleyDB [...] rt.cpan.org>; Mon, 2 Feb 2015 11:02:06 -0500 (EST)
Received: from scooter.cobite.com (unknown [10.96.1.8]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by sandy.cobite.com (Postfix) with ESMTPSA id 73DB039A8 for <bug-BerkeleyDB [...] rt.cpan.org>; Mon, 2 Feb 2015 11:02:06 -0500 (EST)
Delivered-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
Subject: Error opening ErrFile with PerlIO_findFILE
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Return-Path: <david [...] cobite.com>
X-RT-Mail-Extension: berkeleydb
X-Original-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Mon, 02 Feb 2015 11:02:01 -0500
X-Spam-Level:
To: bug-BerkeleyDB [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Mansfield <david [...] cobite.com>
X-RT-Original-Encoding: utf-8
X-RT-Interface: Email
Content-Length: 1595
Download (untitled) / with headers
text/plain 1.5k
We have stumbled across an issue (not sure whether it is actually a bug or not!) pertaining to the opening of the ErrFile in the XS code. In our case, we have duped a pipe's write filehandle to replace STDOUT and STDERR, and we're passing: -ErrFile => *STDERR It reduces to the fact that PerlIO_findFILE is returning NULL in the GetFILEptr macro (and USE_PERLIO is defined). Breaking it down during debugging, the pointer returned by the inner functions, IoIFP(sv_2io(sv)), is valid, but the above method returns NULL. The "documentation" of the method PerlIO_findFILE says: "Returns previously 'exported' FILE * (if any)." There is another method on the man page, PerlIO_exportFILE, which is defined as: "Given an PerlIO * return a 'native' FILE * suitable for passing to code expecting to be compiled and linked with ANSI C stdio.h" I tried substituting exportFILE and it is now working - but I'm not sure of the impact. Maybe if findFILE returns NULL, then exportFILE should be tried ? I don't know the semantics for this. As to why this is happening now, I cannot explain it. We have half a dozen systems across different Centos releases running with the exact same code and on a new system, running the exact same versions of everything, this is happening. The only thing about the new system is that it has a lot of CPU cores - so a race condition seems the most likely culprit. I can only assume something is changed about the state of the perlio layers that causes this behavior change, but I cannot figure out what. -- Thanks, David Mansfield Cobite, INC.
MIME-Version: 1.0
X-Spam-Status: No, score=-3.9 tagged_above=-99.9 required=10 tests=[AWL=2.000, BAYES_00=-1.9, FROM_OUR_RT=-4] autolearn=ham
In-Reply-To: <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-101883 [...] rt.cpan.org> <54CF9F79.6010609 [...] cobite.com> <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: amavisd-new at cobite.com
Message-ID: <54D2419C.7060604 [...] cobite.com>
Content-Type: multipart/mixed; boundary="------------080101090307060803080108"
X-Spam-Score: -3.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 865FE2403A1 for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 4 Feb 2015 10:58:33 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id idzPlUpNicWy for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 4 Feb 2015 10:58:31 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 8D21B2400D2 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 4 Feb 2015 10:58:31 -0500 (EST)
Received: (qmail 7678 invoked by alias); 4 Feb 2015 15:58:30 -0000
Received: from 67.221.182.5.static.nyinternet.net (HELO sandy.cobite.com) (67.221.182.5) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 04 Feb 2015 07:58:27 -0800
Received: from localhost (localhost [127.0.0.1]) by sandy.cobite.com (Postfix) with ESMTP id 3912156A5 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 4 Feb 2015 10:58:21 -0500 (EST)
Received: from sandy.cobite.com ([127.0.0.1]) by localhost (sandy.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id i15suC9JTZ+2 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 4 Feb 2015 10:58:20 -0500 (EST)
Received: from scooter.cobite.com (unknown [10.96.1.8]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by sandy.cobite.com (Postfix) with ESMTPSA id A03F84D25 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 4 Feb 2015 10:58:20 -0500 (EST)
Delivered-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Subject: Re: [rt.cpan.org #101883] AutoReply: Error opening ErrFile with PerlIO_findFILE
Return-Path: <david [...] cobite.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
X-RT-Mail-Extension: berkeleydb
Date: Wed, 04 Feb 2015 10:58:20 -0500
X-Spam-Level:
To: bug-BerkeleyDB [...] rt.cpan.org
From: David Mansfield <david [...] cobite.com>
RT-Message-ID: <rt-4.0.18-21741-1423065514-831.101883-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
Content-Length: 424
Download (untitled) / with headers
text/plain 424b
I have a small script that reproduces this. It seems to be related to Proc::Daemon which closes all filehandles. Basically it comes down to this: If I re-open STDERR as a pipe filehandle, and pass as ErrFile it fails, but if STDERR is closed first, it works. According to perl close documentation, closing first is not required. Script is attached (I'll check that RT processes attachments and put inline if not).
Content-Type: application/x-perl; name="db.pl"
Content-Disposition: attachment; filename="db.pl"
Content-Transfer-Encoding: 7bit
Content-Length: 1840
Download db.pl
text/x-perl 1.7k

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-21741-1423065514-831.101883-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-101883 [...] rt.cpan.org> <54CF9F79.6010609 [...] cobite.com> <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org> <54D2419C.7060604 [...] cobite.com> <rt-4.0.18-21741-1423065514-831.101883-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-19278-1423995786-1006.101883-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 132
Download (untitled) / with headers
text/plain 132b
Hey David, what is different on the new system where it is failing? Different version of Perl? sorry for not replying sooner. Paul
MIME-Version: 1.0
X-Spam-Status: No, score=-4.9 tagged_above=-99.9 required=10 tests=[AWL=1.000, BAYES_00=-1.9, FROM_OUR_RT=-4] autolearn=ham
In-Reply-To: <rt-4.0.18-19278-1423995786-1339.101883-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-101883 [...] rt.cpan.org> <54CF9F79.6010609 [...] cobite.com> <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org> <54D2419C.7060604 [...] cobite.com> <rt-4.0.18-21741-1423065514-831.101883-6-0 [...] rt.cpan.org> <rt-4.0.18-19278-1423995786-1339.101883-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: amavisd-new at cobite.com
Message-ID: <54E4A111.6020403 [...] cobite.com>
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -4.9
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 24965240336 for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 18 Feb 2015 09:26:37 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xJeGkwTWf1Rp for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 18 Feb 2015 09:26:35 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id A3E28240213 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 09:26:34 -0500 (EST)
Received: (qmail 26805 invoked by alias); 18 Feb 2015 14:26:34 -0000
Received: from 67.221.182.5.static.nyinternet.net (HELO sandy.cobite.com) (67.221.182.5) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 18 Feb 2015 06:26:30 -0800
Received: from localhost (localhost [127.0.0.1]) by sandy.cobite.com (Postfix) with ESMTP id A99F568F1 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 09:26:26 -0500 (EST)
Received: from sandy.cobite.com ([127.0.0.1]) by localhost (sandy.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id p04CMnEXlbu5 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 09:26:25 -0500 (EST)
Received: from scooter.cobite.com (scooter.cobite.com [10.96.1.8]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by sandy.cobite.com (Postfix) with ESMTPSA id DDF9F68EF for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 09:26:25 -0500 (EST)
Delivered-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Subject: Re: [rt.cpan.org #101883] Error opening ErrFile with PerlIO_findFILE
Return-Path: <david [...] cobite.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
X-RT-Mail-Extension: berkeleydb
Date: Wed, 18 Feb 2015 09:26:25 -0500
X-Spam-Level:
To: bug-BerkeleyDB [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Mansfield <david [...] cobite.com>
RT-Message-ID: <rt-4.0.18-30126-1424269598-92.101883-0-0 [...] rt.cpan.org>
Content-Length: 1074
On 02/15/2015 05:23 AM, Paul Marquess via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101883 > > > Hey David, > > what is different on the new system where it is failing? Different version of Perl? > > sorry for not replying sooner. > Paul
I believe it is the newer version of Proc::Daemon that is significant. All other things remained basically constant (or were made consistent during debugging). The working one has perl-Proc-Daemon-0.06-1.el6.noarch and the broken one is perl-Proc-Daemon-0.14-9.el6.noarch. There are significant differences in the way those versions handle existing open file handles while daemonizing. I can't guarantee there's not a bug there, but I don't know the semantics of the perlio level in native code - and I can't rule out a perl bug. After all the difference in the test script between working and not working is a "close STDERR" right before re-opening, but the perldoc for open clearly states it should not be necessary when re-opening. So hopefully you know more about this than me. Thanks, David
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-30126-1424269598-92.101883-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <RT-Ticket-101883 [...] rt.cpan.org> <54CF9F79.6010609 [...] cobite.com> <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org> <54D2419C.7060604 [...] cobite.com> <rt-4.0.18-21741-1423065514-831.101883-6-0 [...] rt.cpan.org> <rt-4.0.18-19278-1423995786-1339.101883-6-0 [...] rt.cpan.org> <54E4A111.6020403 [...] cobite.com> <rt-4.0.18-30126-1424269598-92.101883-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-22650-1424292530-1017.101883-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1577
Download (untitled) / with headers
text/plain 1.5k
On Wed Feb 18 09:26:38 2015, david@cobite.com wrote: Show quoted text
> > On 02/15/2015 05:23 AM, Paul Marquess via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101883 > > > > > Hey David, > > > > what is different on the new system where it is failing? Different > > version of Perl? > > > > sorry for not replying sooner. > > Paul
> > I believe it is the newer version of Proc::Daemon that is significant.
Version of Perl the same? Show quoted text
> All other things remained basically constant (or were made consistent > during debugging). The working one has > perl-Proc-Daemon-0.06-1.el6.noarch and the broken one is > perl-Proc-Daemon-0.14-9.el6.noarch.
Could you try revering back to the previous version? That would confirm if Proc::Daemon is the problem. Show quoted text
> There are significant differences in the way those versions handle > existing open file handles while daemonizing. I can't guarantee > there's > not a bug there, but I don't know the semantics of the perlio level in > native code - and I can't rule out a perl bug. After all the > difference > in the test script between working and not working is a "close STDERR" > right before re-opening, but the perldoc for open clearly states it > should not be necessary when re-opening. So hopefully you know more > about this than me.
Messing with filehandles is a real pain especially in XS code. Can't say I'm any expert. Anyway, I've run a quick regression test and changing to PerlIO_exportFILE didn't break on any perl + BerkeleyDB all the way back to 5.6.0. I'll run the full test overnight and see how that goes.
MIME-Version: 1.0
X-Spam-Status: No, score=-5.233 tagged_above=-99.9 required=10 tests=[AWL=0.667, BAYES_00=-1.9, FROM_OUR_RT=-4] autolearn=ham
In-Reply-To: <rt-4.0.18-22650-1424292530-76.101883-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-101883 [...] rt.cpan.org> <54CF9F79.6010609 [...] cobite.com> <rt-4.0.18-14121-1422892944-168.101883-3-0 [...] rt.cpan.org> <54D2419C.7060604 [...] cobite.com> <rt-4.0.18-21741-1423065514-831.101883-6-0 [...] rt.cpan.org> <rt-4.0.18-19278-1423995786-1339.101883-6-0 [...] rt.cpan.org> <54E4A111.6020403 [...] cobite.com> <rt-4.0.18-30126-1424269598-92.101883-6-0 [...] rt.cpan.org> <rt-4.0.18-22650-1424292530-76.101883-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Virus-Scanned: amavisd-new at cobite.com
Message-ID: <54E4FFF3.3090408 [...] cobite.com>
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.233
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 2CB6F240203 for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 18 Feb 2015 16:11:29 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a4ZbNyO-iLog for <cpan-bug+BerkeleyDB [...] hipster.bestpractical.com>; Wed, 18 Feb 2015 16:11:26 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 2B8902401CC for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 16:11:24 -0500 (EST)
Received: (qmail 29853 invoked by alias); 18 Feb 2015 21:11:24 -0000
Received: from 67.221.182.5.static.nyinternet.net (HELO sandy.cobite.com) (67.221.182.5) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 18 Feb 2015 13:11:21 -0800
Received: from localhost (localhost [127.0.0.1]) by sandy.cobite.com (Postfix) with ESMTP id E6CB3944B for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 16:11:16 -0500 (EST)
Received: from sandy.cobite.com ([127.0.0.1]) by localhost (sandy.cobite.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aJWl1qOBeeRl for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 16:11:16 -0500 (EST)
Received: from scooter.cobite.com (scooter.cobite.com [10.96.1.8]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by sandy.cobite.com (Postfix) with ESMTPSA id 40C609449 for <bug-BerkeleyDB [...] rt.cpan.org>; Wed, 18 Feb 2015 16:11:16 -0500 (EST)
Delivered-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
Subject: Re: [rt.cpan.org #101883] Error opening ErrFile with PerlIO_findFILE
Return-Path: <david [...] cobite.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+BerkeleyDB [...] hipster.bestpractical.com
X-RT-Mail-Extension: berkeleydb
Date: Wed, 18 Feb 2015 16:11:15 -0500
X-Spam-Level:
To: bug-BerkeleyDB [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: David Mansfield <david [...] cobite.com>
RT-Message-ID: <rt-4.0.18-22650-1424293890-1950.101883-0-0 [...] rt.cpan.org>
Content-Length: 2099
On 02/18/2015 03:48 PM, Paul Marquess via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101883 > > > On Wed Feb 18 09:26:38 2015, david@cobite.com wrote:
>> On 02/15/2015 05:23 AM, Paul Marquess via RT wrote:
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101883 > >>> >>> Hey David, >>> >>> what is different on the new system where it is failing? Different >>> version of Perl? >>> >>> sorry for not replying sooner. >>> Paul
>> I believe it is the newer version of Proc::Daemon that is significant.
> Version of Perl the same? >
>> All other things remained basically constant (or were made consistent >> during debugging). The working one has >> perl-Proc-Daemon-0.06-1.el6.noarch and the broken one is >> perl-Proc-Daemon-0.14-9.el6.noarch.
> Could you try revering back to the previous version? That would confirm if Proc::Daemon is the problem. >
>> There are significant differences in the way those versions handle >> existing open file handles while daemonizing. I can't guarantee >> there's >> not a bug there, but I don't know the semantics of the perlio level in >> native code - and I can't rule out a perl bug. After all the >> difference >> in the test script between working and not working is a "close STDERR" >> right before re-opening, but the perldoc for open clearly states it >> should not be necessary when re-opening. So hopefully you know more >> about this than me.
> Messing with filehandles is a real pain especially in XS code. Can't say I'm any expert. > > Anyway, I've run a quick regression test and changing to PerlIO_exportFILE didn't break on any perl + BerkeleyDB all the way back to 5.6.0. > > I'll run the full test overnight and see how that goes. >
In the complete knowledge void I live in regarding this issue, I would do if PerlIO_findFILE returns NULL, try PerlIO_exportFILE. Seems most defensive and I would worry about possibly leaking if the allocation doesn't need to be done, or aliasing an existing handle and having buffering issues. Again, the sum total of what I know is what you see above :-( Thanks, David
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-22650-1424293890-1950.101883-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-21741-1423065514-831.101883-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-8947-1424602715-1510.101883-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 98
Hey David, BerkeleyDB-0.55 just uploaed to CPAN. Ping me if you have any problems. cheers Paul


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.