#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Need Help to debug the Perl core dumps


    We have perl module we use DBD were we can update/insert/Select the queries from a mysql database continoulsy.

    While running it creates the core dump continuously. Any help is greatly appreciated to find out where the issue is.

    Below are my entire gdb trace.



    Reading symbols from /usr/bin/perl...(no debugging symbols found)...done.
    [New Thread 29426]
    Reading symbols from /lib64/libnsl.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libnsl.so.1
    Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libdl.so.2
    Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libm.so.6
    Reading symbols from /lib64/libcrypt.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libcrypt.so.1
    Reading symbols from /lib64/libutil.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libutil.so.1
    Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libc.so.6
    Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/ld-linux-x86-64.so.2
    Reading symbols from /lib64/libfreebl3.so...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libfreebl3.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/DBI/DBI.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/DBI/DBI.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/List/Util/Util.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/List/Util/Util.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Time/HiRes/HiRes.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Time/HiRes/HiRes.so
    Reading symbols from /lib/../lib64/librt.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib/../lib64/librt.so.1
    Reading symbols from /lib/../lib64/libpthread.so.0...(no debugging symbols found)...done.
    [Thread debugging using libthread_db enabled]
    Loaded symbols for /lib/../lib64/libpthread.so.0
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Sys/Hostname/Hostname.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Sys/Hostname/Hostname.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Util/Util.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Util/Util.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Package/Stash/XS/XS.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Package/Stash/XS/XS.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/List/MoreUtils/MoreUtils.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/List/MoreUtils/MoreUtils.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Validate/XS/XS.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Validate/XS/XS.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/IO/IO.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/IO/IO.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Fcntl/Fcntl.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Fcntl/Fcntl.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Storable/Storable.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Storable/Storable.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Encode/Encode.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Encode/Encode.so
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Tie/Hash/NamedCapture/NamedCapture.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Tie/Hash/NamedCapture/NamedCapture.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/XML/Parser/Expat/Expat.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/XML/Parser/Expat/Expat.so
    Reading symbols from /usr/local/lib/libexpat.so.0...done.
    Loaded symbols for /usr/local/lib/libexpat.so.0
    Reading symbols from /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Socket/Socket.so...(no debugging symbols found)...done.
    Loaded symbols for /usr/local/lib/perl5/5.16.2/x86_64-linux/auto/Socket/Socket.so
    Reading symbols from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/DBD/mysql/mysql.so...done.
    Loaded symbols for /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/DBD/mysql/mysql.so
    Reading symbols from /usr/local/mysql/lib/libmysqlclient.so.18...done.
    Loaded symbols for /usr/local/mysql/lib/libmysqlclient.so.18
    Reading symbols from /lib/../lib64/libz.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib/../lib64/libz.so.1
    Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libgcc_s.so.1
    Reading symbols from /lib64/libnss_files.so.2...(no debugging symbols found)...done.
    Loaded symbols for /lib64/libnss_files.so.2
    Core was generated by `/usr/bin/perl ./computeMos.pl'.
    Program terminated with signal 6, Aborted.
    #0 0x0000003c16a328a5 in raise () from /lib64/libc.so.6
    Missing separate debuginfos, use: debuginfo-install perl-5.10.1-127.el6.x86_64
    (gdb) bt full
    #0 0x0000003c16a328a5 in raise () from /lib64/libc.so.6
    No symbol table info available.
    #1 0x0000003c16a34085 in abort () from /lib64/libc.so.6
    No symbol table info available.
    #2 0x0000003c16a6ffe7 in __libc_message () from /lib64/libc.so.6
    No symbol table info available.
    #3 0x0000003c16a75916 in malloc_printerr () from /lib64/libc.so.6
    No symbol table info available.
    #4 0x0000003c16a796cf in _int_malloc () from /lib64/libc.so.6
    No symbol table info available.
    #5 0x0000003c16a7a141 in malloc () from /lib64/libc.so.6
    No symbol table info available.
    #6 0x000000000047d3a5 in Perl_safesysmalloc ()
    No symbol table info available.
    #7 0x00000000004ab06e in Perl_sv_grow ()
    No symbol table info available.
    #8 0x00000000004ac0e8 in Perl_sv_setpvn ()
    No symbol table info available.
    #9 0x00000000004ac58e in Perl_newSVpvn_flags ()
    No symbol table info available.
    #10 0x00007f423b8bae05 in validate () from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Validate/XS/XS.so
    No symbol table info available.
    #11 0x00007f423b8bc1f4 in XS_Params__Validate__XS_validate () from /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux/auto/Params/Validate/XS/XS.so
    No symbol table info available.
    #12 0x0000000000497af8 in Perl_pp_entersub ()
    No symbol table info available.
    #13 0x00000000004961d3 in Perl_runops_standard ()
    No symbol table info available.
    #14 0x0000000000434735 in perl_run ()
    No symbol table info available.
    #15 0x000000000041e10c in main ()
    No symbol table info available.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,947
    Rep Power
    1225
    Do you have trace enabled?

    DBI->trace($trace_setting)

    Or are you using Perl's -u command line switch?
    Last edited by FishMonger; May 22nd, 2013 at 10:55 AM.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0
    Trace level is not set .Is that the problem related to DBI ?

    and we don't use command line perl functions in it.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Apr 2009
    Posts
    1,947
    Rep Power
    1225
    I have never done any troubleshooting of core dumps and I'm working blind here because I don't know anything about your script, so all I can do at this point is ask you questions.

    1) Does the script core dump when run on other systems?

    2) Is this a clean (source) build of perl or an upgrade?

    3) "Missing separate debuginfos, use: debuginfo-install perl-5.10.1-127.el6.x86_64" leads me to believe that you upgraded and have some left over libraries from the prior version.

    4) Were any system libraries, such as libmysqlclient, upgraded since installing?

    5) Have you added any debugging statements to the script to narrow down where and what it's doing when it core dumps?

    6) Have you tried stepping through the script with the debugger to see where it core dumps?

    7) Have you tried writing a short test script that does the same thing as the current script is doing when it core dumps? If so, does it also core dump?

    8) Does the script generate any warnings/errors at any point upto and including when it core dumps?

    Can you post your script?
    Last edited by FishMonger; May 23rd, 2013 at 11:39 AM.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2012
    Location
    Paris area, France
    Posts
    842
    Rep Power
    496
    Adding debug print statements may also be useful.
  10. #6
  11. !~ /m$/
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    May 2004
    Location
    Reno, NV
    Posts
    4,264
    Rep Power
    1810
    My interpretation of his problem is that his DBI (probably DBD::mysql driver) is bad. Probably did not successfully compile and link to the database library, and that's why he sees core dumps.

    I suggest you try the installation again, making note of any errors during the 'make test' phase.

    Alternately, you can probably find a pre-built package to install from an apt-get type package managment system for your operating system.

IMN logo majestic logo threadwatch logo seochat tools logo