Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DBD-Oracle CPAN distribution.

Report information
The Basics
Id: 35644
Status: resolved
Priority: 0/
Queue: DBD-Oracle

People
Owner: Nobody in particular
Requestors: LAnusauskas [...] corp.untd.com
Cc:
AdminCc:

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



Subject: Errors when closing pipe after DBI->connect
Date: Mon, 5 May 2008 11:32:13 -0700
To: <bug-DBD-Oracle [...] rt.cpan.org>
From: "Anusauskas, Laimonas" <LAnusauskas [...] corp.untd.com>
Download (untitled) / with headers
text/plain 1.7k
Hi, We are seing strange problem with Perl "close" function on a pipe returning errors no matter what the exit code of the actual program is. It only happens after connection is established to the local database, before connection is established "close" function works as it should. This only started happening after we upgraded Oracle to version 10.2 and recompiled DBD-Oracle driver. We didn't have this problem with DBD compiled with 9.2 libraries. Also, this issue doesn't appear after connection to MySQL database, so its not the issue with DBI itself. This only happens if connection is local and doesn't happen if connection is using network. My feeling that this has something to do with the fact that Oracle client forks separate server process to connect to the local database and that somehow messes up Perls waitpid call. OS: Solaris Sparc 2.10 Perl: v5.8.8 built for sun4-solaris-64 DBI: DBI-1.604 DBD-Oracle: DBD-Oracle-1.21 I also reproduced the same problem when compiling for 32bit. Test case: Show quoted text
------ Cut here ---- #!/u01/dba/config/perl -w use DBI; use strict; warn "Before connect"; open(PIPE,"|/bin/tee") || die("Can not launch command"); warn close(PIPE) ? "No errors" : $!; my $dbh = DBI->connect( "DBI:Oracle:", "system","***", {TraceLevel => 0,RaiseError => 1, AutoCommit=>0,PrintError=>1}) or die("Failed to connect:$DBI::errstr"); warn "After connect"; open(PIPE,"|/bin/tee") || die("Can not launch command"); warn close(PIPE) ? "No errors" : $!; $dbh->disconnect(); exit(0);
----- Output --- Before connect at ./dbd_bug.pl line 6. No errors at ./dbd_bug.pl line 8. After connect at ./dbd_bug.pl line 16. No child processes at ./dbd_bug.pl line 18. ----- Best regards, Limus Sr. Oracle DBA United Online, Inc.
Subject: RE: [rt.cpan.org #35644] AutoReply: Errors when closing pipe after DBI->connect
Date: Tue, 6 May 2008 15:14:08 -0700
To: <bug-DBD-Oracle [...] rt.cpan.org>
From: "Anusauskas, Laimonas" <LAnusauskas [...] corp.untd.com>
It seems that DBI->connect call is throwing SIGCHLD signal. I am investigating further. Limus
Download (untitled) / with headers
text/plain 176b
Did you upgrade your DBD::Oracle driver as well?? Might be a bug in Oracle? That has been know to happen. Connect to your 10 DB with your 9 client and see what happens?
No answer in 4 years. Closing.
Subject: RE: [rt.cpan.org #35644] Errors when closing pipe after DBI->connect
Date: Fri, 5 Oct 2012 18:10:19 +0000
To: "bug-DBD-Oracle [...] rt.cpan.org" <bug-DBD-Oracle [...] rt.cpan.org>
From: "Anusauskas, Laimonas" <LAnusauskas [...] corp.untd.com>
Download (untitled) / with headers
text/plain 559b
Sorry, forgot about this ticket. The workaround that worked for us was to trap SIGCLD in beginning of the script: # Trap SIGCLD signal otherwise IPC gets all messed up after DBI calls $SIG{CLD} = sub {}; Limus Show quoted text
-----Original Message----- From: Pythian Remote DBA via RT [mailto:bug-DBD-Oracle@rt.cpan.org] Sent: Friday, October 05, 2012 10:56 AM To: Anusauskas, Laimonas Subject: [rt.cpan.org #35644] Errors when closing pipe after DBI->connect <URL: https://rt.cpan.org/Ticket/Display.html?id=35644 > No answer in 4 years. Closing.
Subject: Re: [rt.cpan.org #35644] Errors when closing pipe after DBI->connect
Date: Fri, 05 Oct 2012 16:02:07 -0400
To: bug-DBD-Oracle [...] rt.cpan.org
From: Yanick Champoux <champoux [...] pythian.com>
Download (untitled) / with headers
text/plain 770b
On 12-10-05 02:10 PM, Anusauskas, Laimonas via RT wrote: Show quoted text
> Queue: DBD-Oracle > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=35644 > > > Sorry, forgot about this ticket. > > The workaround that worked for us was to trap SIGCLD in beginning of the script: > > # Trap SIGCLD signal otherwise IPC gets all messed up after DBI calls > $SIG{CLD} = sub {};
Excellent. Thanks! And it seems that with the current version of DBI, it's no longer an issue either. I've tried the test script in the ticket, and it runs smoothly with and without the trapping. Cheers (and thanks again), `/anick -- -- Attending Oracle OpenWorld? Be sure to watch out for the Pythian team and to catch one of our many speaking sessions bit.ly/OOW12sessions


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.