Hi,
Getting core dump in global destructor while communicating with DBI 1.02
with Perl 5.4.4 and Oracle 10.g on 64 bit Solaris 10.
I can not move o latest version of DBI as Perl 5.4.4 support only upto
DBI 1.20.
Perl code and stack trace are below.
Any help would be appreciable.
> perl connect.pl
Connected as user pakumar
All tables - Got rows:
Owner TableName NumRows
----- --------- -------
Bus error (core dumped)
======================================================
t...@1 (l...@1) program terminated by signal BUS (invalid address alignment)
0x0000000100061c58: visit+0x006c: ld [%l3 + 8], %l6
(dbx) w
current thread: t...@1
=>[1] visit(0x100061d70, 0x4, 0x4, 0x1001dd000, 0x1001dd, 0x100263210),
at 0x100061c58
[2] Perl_sv_clean_objs(0x100061000, 0x100061, 0x100000, 0x1,
0x1001cc000, 0x1001cc), at 0x100061dd0
[3] perl_destruct(0x1001dd000, 0x0, 0x100000, 0x100000, 0x1001db,
0x1001db000), at 0x1000175ac
[4] Perl_main(0x4, 0x0, 0x100000, 0x0, 0x1001dc000, 0x1001da7a0), at
0x100014ed4
[5] main(0x4, 0xffffffff7fffea38, 0xffffffff7fffea60,
0xffffffff7df4ade8, 0xffffffff7db006c0, 0xffffffff7db00700), at
0x100014dfc
(dbx)
======================================================
Perl code:
======================================================
# Example PERL DBI/DBD Oracle Example on Oracle 10g
use DBI;
my $dbname = "DEV10G"; ## DB Name from tnsnames.ora
my $user = "pakumar";
my $passwd = "pakumar";
#### Connect to the database and return a database handle
$dbh = DBI->connect("dbi:Oracle:${dbname}", $user, $passwd);
if($dbh){
print("Connected as user $user\n");
} else {
print("Failed to connect!\n");
exit;
}
#### Prepare and Execute a SQL Statement Handle
my $sth = $dbh->prepare("SELECT owner,table_name,num_rows FROM
all_tables");
$sth->execute();
print("All tables - Got rows:\n");
print("Owner\tTableName\tNumRows\n");
print("-----\t---------\t-------\n");
while(@row = $sth->fetchrow_array()){
print("$row[0]\t$row[1]\t$row[2]\n");
}
#$dbh->commit;
#$sth->finish;
print("Select Done!...");
#### Disconnect
if($dbh->disconnect){
print("Disconnected\n");
} else {
print("Failed to disconnect\n");
}
Thanks & Regards,
Pankaj Kumar| Tech Mahindra
Manikchand Galleria, Pune 411 0016, INDIA
* Office: +91 20 66417000 Extn: 7289| Mobile: +91 9595601050
Email: [email protected]
www.techmahindra.com <http://www.techmahindra.com/>
============================================================================================================================
Disclaimer:
This message and the information contained herein is proprietary and
confidential and subject to the Tech Mahindra policy statement, you may review
the policy at <a
href="http://www.techmahindra.com/Disclaimer.html">http://www.techmahindra.com/Disclaimer.html</a>
externally and <a
href="http://tim.techmahindra.com/Disclaimer.html">http://tim.techmahindra.com/Disclaimer.html</a>
internally within Tech Mahindra.
============================================================================================================================<<image001.gif>>
