Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

glibc detected error with sth->{db2_more_results}

by perlCrazy (Monk)
on Jan 12, 2012 at 09:42 UTC ( #947502=perlquestion: print w/replies, xml ) Need Help??
perlCrazy has asked for the wisdom of the Perl Monks concerning the following question:

getting this error while executing the script : *** glibc detected *** <path>perl: double free or corruption (!prev): 0x0846c348 ***
any help will be great. Thanks in advance.
use strict; use strict; use DBI; my $dbh = DBI->connect("dbi:DB2:$dbname",'','',{PrintError => 0}); my $sth = $dbh->prepare("call sp.tbspace"); $sth->execute; do{ while (my $row = $sth->fetchrow_arrayref()) { my $lineStr = @$row; push @dcpu_all_array, "$lineStr\n"; } }while ($sth->{db2_more_results}); $sth->finish;
when comment the $sth->{db2_more_results} error doesn't come.

Replies are listed 'Best First'.
Re: glibc detected error with sth->{db2_more_results}
by Anonymous Monk on Jan 12, 2012 at 09:48 UTC

    upgrade as much as possible :)

    Upgrade the system glib, db2 libraries

    Upgrade the perl modules, perl DBI, DB2

    Install a new perl (don't update system perl )

    And try again :)

Re: glibc detected error with sth->{db2_more_results}
by Anonymous Monk on Jan 12, 2012 at 09:50 UTC
    Provide the output of uname -a and the version numbers of glibc, Perl, DBI, DBD::DB2 and the db2 client library you are using.
      Linux 2.6.18-128.1.6.el5 x86_64 x86_64 x86_64 GNU/Linux
      PERL : 5.8.6
      db2cleint: 9.1
      package Bundle::DBD::DB2; $VERSION = '0.78';

        perl 5.8.6 released 2004-Nov-27

        DBD-DB2-0.78 released 19 Sep 2004

        At a minimum you should upgrade DBI, DBD::DB2 as well as all other installed DBI/DBDs

        That "double free or corruption" error is coming from glibc. Means that one of your libraries is doing a double free on some variable somewhere. There's little you can do except find a version where that bug doesn't happen, or file a bug with the author of the problematic library (probably one of your database libraries).

        sorry forgot to add glibc version

        Name : glibc Version : 2.5 Vendor: Red Hat, Inc. Release : 34

        You really want to upgrade if possible. To quote Dr. Jones: "It belongs in a museum".

        Apart from the problem you described, there are probably a zillion other critical bugs in your system that have been since fixed (and, as a bonus, you'll get a bunch of new ones installed when upgrading).

        The problem is, most - if not all - of the software you mentioned seems out of support. Meaning, you won't get critical bugfixes, which in turn means you might have a security problem.

        "Believe me, Mike, I calculated the odds of this succeeding against the odds I was doing something incredibly stupidů and I went ahead anyway." (Crow in "MST3K The Movie")

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://947502]
Approved by Corion
[Eily]: that's one long sheband

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2018-05-25 08:16 GMT
Find Nodes?
    Voting Booth?