Operating System - HP-UX
1752786 Members
5840 Online
108789 Solutions
New Discussion юеВ

gprof:Coredump with IA utility compiled with -G

 
Michelle_53
New Member

gprof:Coredump with IA utility compiled with -G

I am getting the following coredump when i run an IA utility, compiled with -G option(to be used with gprof).

# /abc
Memory fault(coredump)

# gdb /abc /core
HP gdb 5.0 for HP Itanium (32 or 64 bit) and target HP-UX 11.2x.
Copyright 1986 - 2001 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 5.0 (based on GDB) is covered by the
GNU General Public License. Type "show copying" to see the conditions to
change it and/or distribute copies. Type "show warranty" for warranty/support.
..
Core was generated by `abc'.
Program terminated with signal 11, Segmentation fault.
#0 0x40c4830040c4830 in ()
(gdb) where
warning: GDB cannot print complete stack trace since some shared libraries are missing. Set GDB_SHLIB_PATH and try again.

#0 0x40c4830040c4830 in ()
warning: Attempting to unwind past bad PC 0x40c4830040c4830
#1 0x60000000c04d7940:0 in lstat+0x60 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c03bdf70:0 in mktemp+0x420 () from /usr/lib/hpux32/libc.so.1
#3 0x60000000c04c92e0:0 in tmpnam+0x170 () from /usr/lib/hpux32/libc.so.1
#4 0x60000000c04d2ac0:0 in tmpfile+0x40 () from /usr/lib/hpux32/libc.so.1
#5 0x60000000c05395b0:0 in _exit_smonitor+0x410 ()
from /usr/lib/hpux32/libgprof.so
#6 0x60000000c0538120:0 in _gprof_hook+0x60 ()
from /usr/lib/hpux32/libgprof.so
#7 0x60000000c0055b10:0 in LE_user_hook_terminate+0xd0 ()
from /usr/lib/hpux32/dld.so
#8 0x60000000c002eea0:0 in TE_do_program_exit+0x40 ()
from /usr/lib/hpux32/dld.so
#9 0x4527f50:0 in __exit_handler+0x130 ()


I have added the path for all the shared libraries in GDB_SHLIB_PATH but gdb still cribs with the Warning "GDB cannot print complete stack trace since some shared libraries are missing"

following are the libraries to which this utility is linked.

shared library list:
libpthread.so.1
libprof.so <-----
libm.so.1
libc.so.1

I had compiled "abc" with a -G flag, So not sure if it getting linked with libprof.so is the correct behavior.

The same utility works fine and shows a good gprof outout when i compile it for PA.
Is there any known problem with GPROF libraries on IA which cause this coredump and has HP released a patch to take care of this.
6 REPLIES 6
Stephen Keane
Honored Contributor

Re: gprof:Coredump with IA utility compiled with -G

I'm probably blowing smoke here (as I don't have an IA machine) but are you sure you have SHLIB_PATH (not GDB_SHLIB_PATH) set right? I though on IA machines libprof.so was under /usr/lib/hpux32 or /usr/lib/hpux64 directories (depening on which version you want). Are you using the right version?
Steve Steel
Honored Contributor

Re: gprof:Coredump with IA utility compiled with -G

Hi


Could it be so simple as a badly tuned kernel running out of stack space during the debug


Look at all kernel values referring to maxssiz and maxdsiz

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Amit Agarwal_1
Trusted Contributor

Re: gprof:Coredump with IA utility compiled with -G

There is no gprof patch for any core dump on IPF platform.

Could you provide the program code and the HPUX release where you are noticing the problem.
rick jones
Honored Contributor

Re: gprof:Coredump with IA utility compiled with -G

After you have sent-in the core dump and maybe an example program, while you wait for resolution, you might try using Caliper to take your profiles. I seem to recall it not requiring -G compilation (could be wrong though) and it can give a whole host of other information. And on top of that, it is free :) http://www.hp.com/go/caliper will I believe get you started.
there is no rest for the wicked yet the virtuous have no pillows
Amit Agarwal_1
Trusted Contributor

Re: gprof:Coredump with IA utility compiled with -G

Just noticed that your program is getting linked with libprof.so and not libgprof.so. This is suspicious as -G option should cause the link line to include libgprof.so and not libprof.so.

BTW, the gdb output shows that libgprof.so is actually getting loaded and used during the runtime. Now this is confusing, as in something is going wrong really badly.

I would suggest to build both 32-bit and 64-bit binaries and then try. Do you see the coredump on both bits. This can provide good insight into problem.
Michelle_53
New Member

Re: gprof:Coredump with IA utility compiled with -G

Sorry about a goof-up in my posting.
The following are the libraries to which abc is linked.
libpthread.so.1
libm.so.1
libgprof.so
libc.so.1

Apologies once again...