1846053 Members
2201 Online
110253 Solutions
New Discussion

Debugging a core file

 
Kianoosh Rahattalab
New Member

Debugging a core file

Hi folks,

my machine: HP-UX B.11.23 U ia64

I've got a core from one of customers.
My goal is to get the ouput of "gdb/ where".
First step (bmh is my exec file):
bmh/gdb bmh core
..
Core was generated by `bmh_20050712'.
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
Use the following command to enable debugging of shared libraries.
chatr +dbg enable a.out
/oracle/app/oracle/product/9.2.0/lib/libclntsh.so.9.0: No such file or directory.
Unable to read the load_info structure
------------------------
So I ask for libclntsh.so.9.0 and libwctc9.so, pu them into a new folder "/oracle", defined it as GDB_SHLIB_PATH and started gdb again:
bmh/ gdb bmh core
Core was generated by `bmh_20050712'.
Program terminated with signal 11, Segmentation fault.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.
Use the following command to enable debugging of shared libraries.
chatr +dbg enable a.out

warning: Load module /home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libclntsh.so.9.0 has been stripped.
Debugging information is not available.

warning: Some of the libraries in the core file are different from the libraries on this computer. It might be possible to proceed with your debugging process successfully. However, if you run into problems you must use the versions of the libraries used by the core. The mismatches are:

/oracle/app/oracle/product/9.2.0/lib/libclntsh.so.9.0 in the core file is different from
/home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libclntsh.so.9.0 used by gdb

/usr/lib/hpux64/libnsl.so.1 in the core file is different from
/usr/lib/hpux64/libnsl.so.1 used by gdb

/usr/lib/hpux64/libc.so.1 in the core file is different from
/usr/lib/hpux64/libc.so.1 used by gdb

warning: Load module /home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libwtc9.so has been stripped.
Debugging information is not available.

/usr/lib/hpux64/librt.so.1 in the core file is different from
/usr/lib/hpux64/librt.so.1 used by gdb

/usr/lib/hpux64/libnss_dns.so.1 in the core file is different from
/usr/lib/hpux64/libnss_dns.so.1 used by gdb

/usr/lib/hpux64/libdl.so.1 in the core file is different from
/usr/lib/hpux64/libdl.so.1 used by gdb

/usr/lib/hpux64/libpthread.so.1 in the core file is different from
/usr/lib/hpux64/libpthread.so.1 used by gdb

/usr/lib/hpux64/libunwind.so.1 in the core file is different from
/usr/lib/hpux64/libunwind.so.1 used by gdb

/usr/lib/hpux64/libxti.so.1 in the core file is different from
/usr/lib/hpux64/libxti.so.1 used by gdb

/usr/lib/hpux64/libnss_files.so.1 in the core file is different from
/usr/lib/hpux64/libnss_files.so.1 used by gdb


warning: Unexpected unwind descriptor 0xbb in /home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libclntsh.so.9.0; you may be using a different version of /home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libclntsh.so.9.0

#0 0xc00000000021caf0:0 in real_malloc+0x17f0 ()
from /usr/lib/hpux64/libc.so.1
----------------------------------
Obviously gdb has still problems with libclntsh.so.9.0. Any ideas why? I compared it with our library, there is not any differences.

I would appreciate your comments.
Treat others the way you want to be treated.
3 REPLIES 3
Florian Heigl (new acc)
Honored Contributor

Re: Debugging a core file

I think You need to get the shared libaries from Your customer, too, so that the debug symbols etc. match in with the core file.

But I'm far from having suffient programming knowledge for analyzing core files, so I'm not even close of being sure this is right :))
yesterday I stood at the edge. Today I'm one step ahead.
Kianoosh Rahattalab
New Member

Re: Debugging a core file

Hi florian,

thanks for the answer. I'm not sure that having all other shared libraries would be helpful as gdb still has problems with libclntsh.so.9. I guess something is wrong in my gdb setting or environment.
I've got
oracle/app/oracle/product/9.2.0/lib/libclntsh.so.9 from our customer, but gdb says that it is different from
/home/rahattak/views/5.23_CML02/vobs/lan_cml/bscs/usa/batch/kernel/src/bmh/oracle/libclntsh.so.9.0, even if both are identical.

Regards,
Kianoosh
Treat others the way you want to be treated.
Amit Agarwal_1
Trusted Contributor

Re: Debugging a core file

Looking at the errors, it si clear that the shared libray used at the time coredump are different from the one you have while using gdb.

You are not going to get much useful data (moreover you will get corrupt data) with even if a single librayr is different. So get original libraires from customer and copy it to some temp directory. Set the GDB_SHLIB_PATH and then try.

You need to get all the libraires, only libclntsh.so.9.0 and libwctc9.so wont help.