Error always returned from system() after connecting to Oracle 10 .2on Solaris 64 bit
Error always returned from system() after connecting to Oracle 10 .2on Solaris 64 bit
am 07.11.2007 14:31:55 von peter.sands
------_=_NextPart_001_01C82142.90A7D8FB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
1.41 distributed with Oracle 10.2, I find that, having connected to Oracle
within a perl script any subsequent system() calls return a -1 error status,
even simple commands like true. (First tried building and using
DBD-Oracle-1.19, DBI-1.40 with the same results).
>cat dbtest.pl
use strict;
use Getopt::Std;
use DBI;
# Connect to database
my $db = DBI -> connect("DBI:Oracle:","","",
{AutoCommit => 0,PrintError => 0,RaiseError => 1})
or die "Failed to connect: $DBI::errstr\n";
$db -> disconnect();
system(true);
print "$?\n";
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
-1
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v
This is perl, v5.8.3 built for sun4-solaris-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License or
the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/
, the Perl Home Page.
>file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3
/opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
executable SPARC Version 1, dynamically linked, not stripped
>echo $PERL5LIB
/opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2/per
l/lib/site_perl/5.8.3/
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle; print
$DBD::Oracle::VERSION,"\n";'
1.15
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
$DBI::VERSION,"\n";'
1.41
Peter Sands
Application Technical Architect
Telephone 01452-652642 (Internal 777-2642)
Personal e-mail peter.sands@british-energy.com
DSSS Production Support Team e-mail: Barnwood IM Trading Apps Support
Information Management
British Energy, Barnett Way, Barnwood, Gloucester, GL4 3RS
|* This e-mail, and any attachments, is confidential and for the use of the addressee only.
|* If you are not the intended recipient, please telephone +44 (0) 1506 408700
|* We do not accept legal responsibility for this e-mail or any viruses.
|* All e-mails sent and received by us are monitored.
|* Contracts cannot be concluded with us by e-mail.
|* This message has been sent from a member of the British Energy Group (the "Group").
|* The parent company of the Group is British Energy Group plc, a company registered in Scotland, registered number 270184, and having its registered office at
|* Systems House, Alba Campus, Livingston EH54 7EG
------_=_NextPart_001_01C82142.90A7D8FB--
RE: Error always returned from system() after connecting to Oracle 10 .2 on Solaris 64 bit
am 07.11.2007 16:25:23 von HLiu
Have you tried to use Perl 64 bit build? I've had similar problem before
and solved it by installing the newest Perl 64 bit version. I believe
your Perl has to be compatible to your system and Oracle.
Good luck.
Alan
-----Original Message-----
From: Sands Peter [mailto:peter.sands@british-energy.com]=20
Sent: Wednesday, November 07, 2007 7:32 AM
To: 'dbi-users@perl.org'
Subject: Error always returned from system() after connecting to Oracle
10 .2 on Solaris 64 bit
Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
1.41 distributed with Oracle 10.2, I find that, having connected to
Oracle within a perl script any subsequent system() calls return a -1
error status, even simple commands like true. (First tried building and
using DBD-Oracle-1.19, DBI-1.40 with the same results).
>cat dbtest.pl
use strict;
use Getopt::Std;
use DBI;
# Connect to database
my $db =3D DBI -> connect("DBI:Oracle:","","",
{AutoCommit =3D> 0,PrintError =3D> 0,RaiseError =3D> 1})
or die "Failed to connect: $DBI::errstr\n"; $db
-> disconnect();
system(true);
print "$?\n";
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
-1
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v =20
This is perl, v5.8.3 built for sun4-solaris-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the Perl 5
source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to
the Internet, point your browser at http://www.perl.com/
, the Perl Home Page.
>file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 =20
/opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
executable SPARC Version 1, dynamically linked, not stripped
>echo $PERL5LIB
/opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2
/per
l/lib/site_perl/5.8.3/
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle;=20
>print
$DBD::Oracle::VERSION,"\n";'
1.15
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
$DBI::VERSION,"\n";'
1.41
Peter Sands
Application Technical Architect
Telephone 01452-652642 (Internal 777-2642)
Personal e-mail peter.sands@british-energy.com
DSSS Production Support Team e-mail: Barnwood IM Trading Apps Support
Information Management
British Energy, Barnett Way, Barnwood, Gloucester, GL4 3RS
|* This e-mail, and any attachments, is confidential and for the use of
the addressee only.
|* If you are not the intended recipient, please telephone +44 (0) 1506=20
|408700
|* We do not accept legal responsibility for this e-mail or any viruses.
|* All e-mails sent and received by us are monitored.
|* Contracts cannot be concluded with us by e-mail.
|* This message has been sent from a member of the British Energy Group
(the "Group").
|* The parent company of the Group is British Energy Group plc, a=20
|company registered in Scotland, registered number 270184, and having=20
|its registered office at
|* Systems House, Alba Campus, Livingston EH54 7EG
Re: Error always returned from system() after connecting to Oracle10 .2 on Solaris 64 bit
am 08.11.2007 13:59:37 von Martin.Evans
Sands Peter wrote:
> Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
> 1.41 distributed with Oracle 10.2, I find that, having connected to Oracle
> within a perl script any subsequent system() calls return a -1 error status,
> even simple commands like true. (First tried building and using
> DBD-Oracle-1.19, DBI-1.40 with the same results).
>
>
>> cat dbtest.pl
> use strict;
> use Getopt::Std;
> use DBI;
>
> # Connect to database
> my $db = DBI -> connect("DBI:Oracle:","","",
> {AutoCommit => 0,PrintError => 0,RaiseError => 1})
> or die "Failed to connect: $DBI::errstr\n";
> $db -> disconnect();
>
> system(true);
>
> print "$?\n";
>
>
> >/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
> -1
>
>> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v
>
> This is perl, v5.8.3 built for sun4-solaris-thread-multi
>
> Copyright 1987-2003, Larry Wall
>
> Perl may be copied only under the terms of either the Artistic License or
> the
> GNU General Public License, which may be found in the Perl 5 source kit.
>
> Complete documentation for Perl, including FAQ lists, should be found on
> this system using `man perl' or `perldoc perl'. If you have access to the
> Internet, point your browser at http://www.perl.com/
> , the Perl Home Page.
>
>
>> file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3
> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
> executable SPARC Version 1, dynamically linked, not stripped
>
>
>> echo $PERL5LIB
> /opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2/per
> l/lib/site_perl/5.8.3/
>
>
>> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle; print
> $DBD::Oracle::VERSION,"\n";'
> 1.15
>
>
>> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
> $DBI::VERSION,"\n";'
> 1.41
>
> Peter Sands
>
Have you tried running truss on the perl script to see what is happening
when system fails? I think it is worth a try. Also, the OCI libraries do
a lot of fiddling with signals and I can imagine SIGCHLD having an
effect on system.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com
Re: Error always returned from system() after connecting to Oracle 10 .2 on Solaris 64 bit
am 08.11.2007 14:45:58 von mgainty
I agree with Martin OCI may possibly be intercepting your signals and not
passing to Perl
is this mod_perl or are you running the perl binary as cgi script?
M--
----- Original Message -----
From: "Martin J. Evans"
To:
Sent: Thursday, November 08, 2007 7:59 AM
Subject: Re: Error always returned from system() after connecting to Oracle
10 .2 on Solaris 64 bit
> Sands Peter wrote:
> > Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
> > 1.41 distributed with Oracle 10.2, I find that, having connected to
Oracle
> > within a perl script any subsequent system() calls return a -1 error
status,
> > even simple commands like true. (First tried building and using
> > DBD-Oracle-1.19, DBI-1.40 with the same results).
> >
> >
> >> cat dbtest.pl
> > use strict;
> > use Getopt::Std;
> > use DBI;
> >
> > # Connect to database
> > my $db = DBI -> connect("DBI:Oracle:","","",
> > {AutoCommit => 0,PrintError => 0,RaiseError => 1})
> > or die "Failed to connect: $DBI::errstr\n";
> > $db -> disconnect();
> >
> > system(true);
> >
> > print "$?\n";
> >
> >
> > >/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
> > -1
> >
> >> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v
> >
> > This is perl, v5.8.3 built for sun4-solaris-thread-multi
> >
> > Copyright 1987-2003, Larry Wall
> >
> > Perl may be copied only under the terms of either the Artistic License
or
> > the
> > GNU General Public License, which may be found in the Perl 5 source kit.
> >
> > Complete documentation for Perl, including FAQ lists, should be found on
> > this system using `man perl' or `perldoc perl'. If you have access to
the
> > Internet, point your browser at http://www.perl.com/
> > , the Perl Home Page.
> >
> >
> >> file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3
> > /opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
> > executable SPARC Version 1, dynamically linked, not stripped
> >
> >
> >> echo $PERL5LIB
> >
/opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2/per
> > l/lib/site_perl/5.8.3/
> >
> >
> >> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle;
print
> > $DBD::Oracle::VERSION,"\n";'
> > 1.15
> >
> >
> >> /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
> > $DBI::VERSION,"\n";'
> > 1.41
> >
> > Peter Sands
> >
>
> Have you tried running truss on the perl script to see what is happening
> when system fails? I think it is worth a try. Also, the OCI libraries do
> a lot of fiddling with signals and I can imagine SIGCHLD having an
> effect on system.
>
> Martin
> --
> Martin J. Evans
> Easysoft Limited
> http://www.easysoft.com
>
RE: Error always returned from system() after connecting to Oracle 10 .2 on Solaris 64 bit
am 08.11.2007 20:34:01 von aaron_saarela
Hi Peter,
Oracle (either DBD or the driver itself) is changing the default signal
handler. This results in the system call always return -1 (in reality
it's the 'wait' call that's returning this value).
Once you establish a connection, try resetting the default signal
handler. E.g.:
My $dbh =3D DBI->connect( ...
$SIG{ CHLD } =3D 'DEFAULT';
Regards,
-Aaron
=20
-----Original Message-----
From: Sands Peter [mailto:peter.sands@british-energy.com]=20
Sent: Wednesday, November 07, 2007 8:32 AM
To: 'dbi-users@perl.org'
Subject: Error always returned from system() after connecting to Oracle
10 .2 on Solaris 64 bit
Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
1.41 distributed with Oracle 10.2, I find that, having connected to
Oracle within a perl script any subsequent system() calls return a -1
error status, even simple commands like true. (First tried building and
using DBD-Oracle-1.19, DBI-1.40 with the same results).
>cat dbtest.pl
use strict;
use Getopt::Std;
use DBI;
# Connect to database
my $db =3D DBI -> connect("DBI:Oracle:","","",
{AutoCommit =3D> 0,PrintError =3D> 0,RaiseError =3D> 1})
or die "Failed to connect: $DBI::errstr\n"; $db
-> disconnect();
system(true);
print "$?\n";
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
-1
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v =20
This is perl, v5.8.3 built for sun4-solaris-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the GNU General Public License, which may be found in the Perl 5
source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to
the Internet, point your browser at http://www.perl.com/
, the Perl Home Page.
>file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3 =20
/opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
executable SPARC Version 1, dynamically linked, not stripped
>echo $PERL5LIB
/opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2
/per
l/lib/site_perl/5.8.3/
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle;=20
>print
$DBD::Oracle::VERSION,"\n";'
1.15
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
$DBI::VERSION,"\n";'
1.41
Peter Sands
Application Technical Architect
Telephone 01452-652642 (Internal 777-2642)
Personal e-mail peter.sands@british-energy.com
DSSS Production Support Team e-mail: Barnwood IM Trading Apps Support
Information Management
British Energy, Barnett Way, Barnwood, Gloucester, GL4 3RS
|* This e-mail, and any attachments, is confidential and for the use of
the addressee only.
|* If you are not the intended recipient, please telephone +44 (0) 1506=20
|408700
|* We do not accept legal responsibility for this e-mail or any viruses.
|* All e-mails sent and received by us are monitored.
|* Contracts cannot be concluded with us by e-mail.
|* This message has been sent from a member of the British Energy Group
(the "Group").
|* The parent company of the Group is British Energy Group plc, a=20
|company registered in Scotland, registered number 270184, and having=20
|its registered office at
|* Systems House, Alba Campus, Livingston EH54 7EG
Re: Error always returned from system() after connecting to Oracle10 .2 on Solaris 64 bit
am 09.11.2007 11:52:40 von cj10
On 07/11/07 13:31, Sands Peter wrote:
> Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
> 1.41 distributed with Oracle 10.2, I find that, having connected to Oracle
> within a perl script any subsequent system() calls return a -1 error status,
> even simple commands like true. (First tried building and using
> DBD-Oracle-1.19, DBI-1.40 with the same results).
I think it likely that this is something to do with Oracle's
handling of SIGCHLD. I have a hunch that this might only happen
if the connection is not via Oracle*Net.
Is you database local? Are you connecting using the bequeather?
--
Charles Jardine - Computing Service, University of Cambridge
cj10@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679