On Thu, Sep 26, 2002 at 09:47:49AM -0700, Michael A Chase wrote: > On Thu, 26 Sep 2002 12:32:28 -0400 Pooya Woodcock <[EMAIL PROTECTED]> wrote: > > I'm getting a segfault w/ oracle 9i-64bit, DBD-Oracle-1.12, > > DBI-1.30, perl 5.80. compiled with sun forte C 6 update 2, flags: > > "-mt -fast -xchip=ultra2 -xarch=v9a -xlic_lib=sunperf". > > The segfaults come at the end of any series of queries -- that is, > > at the END of the scripts. I'm thinking that this might be a PerlIO > > problem- not a dbi problem.. what do you think? > # It's a good idea to disconnect explicitly in any case. > $dbh -> disconnect; > # Don't leave any handles around for global destruction. > $sth = $dbh = undef; > Sometimes global destruction has trouble with DBI handles. See if > undefining all your handles (like above) helps.
I've changed the test script to this: #!/usr/local/bin/perl -w $|++; use strict; use DBI; #DBI->trace(9); my $dbh = DBI->connect("DBI:Oracle:host=localhost;sid=ORADB;port=1521", "scott", "tiger"); my $sth = $dbh->prepare(qq{select * from dept}); $sth->execute(); while (my @data = $sth->fetchrow_array()) { print @data, "\n"; } $dbh->disconnect; $sth = $dbh = undef; and the output is the same, with the same stack frames: 10ACCOUNTINGNEW YORK 20RESEARCHDALLAS 30SALESCHICAGO 40OPERATIONSBOSTON Segmentation Fault (core dumped) signal SEGV (no mapping at the fault address) in Perl_PerlIO_flush at 0x10010a038 0x000000010010a038: Perl_PerlIO_flush+0x0020: ldx [%i5 + 0x8], %i4 --------- without the DBI->trace, the segv is here, in libmalloc.so: signal SEGV (no mapping at the fault address) in free_unlocked at 0xffffffff7ee00fc8 0xffffffff7ee00fc8: free_unlocked+0x0100: ldx [%o2], %o3 (/opt/SUNWspro/WS6U2/bin/sparcv9/dbx) where current thread: t@1 =>[1] free_unlocked(0x100255b40, 0xffffffff7ef0251c, 0x50, 0xffffffff7ee00eb8, 0xffffffff7ef02000, 0x1004ef5f0), at 0xffffffff7ee00fc8 [2] free(0x1004ef600, 0x0, 0x1004ef180, 0x0, 0x1004ef180, 0x1004ef180), at 0xffffffff7ee00eb8 [3] epc_exit_handler(0x0, 0x0, 0xffffffff7ec00000, 0xffffffff7e8a54cc, 0xffffffff7f722d20, 0x0), at 0xffffffff7d05cf90 [4] _exithandle(0x28000, 0x100223938, 0x11243c, 0x100018ea4, 0xffffffff7ef02000, 0xffffffff7e9b2d68), at 0xffffffff7e8261a0 [5] exit(0x0, 0x22e400, 0x241800, 0x10022e400, 0x100240258, 0x10022e480), at 0xffffffff7e8a54cc [6] main(0x0, 0xffffffff7ffff698, 0x10022e448, 0x0, 0x0, 0x1), at 0x100018ea4 thanks, Pooya