General
cancel
Showing results for 
Search instead for 
Did you mean: 

Seems like pstack causes coredump

blackwater
Regular Advisor

Seems like pstack causes coredump

I have written a simple shell script that runs pstack in a loop. It looks like this:

set -x
rating_server_pid=13456
LOG_FILE="p.log"
while [ true ]
do
pstack $rating_server_pid > $LOG_FILE
done
sleep 10
done


When I run it sometimes I runs correctly and sometimes I get:

./run_p.stack.sh: line 7: 13862 Segmentation fault (core dumped) pstack $rating_server_pid > $LOG_FILE

./run_p.stack.sh: line 7: 13867 Segmentation fault (core dumped) pstack $rating_server_pid > $LOG_FILE


I got backtrace from the core file:

srv2-rx8 B.11.31 ia64 bash-3.2$ gdb pstack
HP gdb 6.0 for HP Itanium (32 or 64 bit) and target HP-UX 11iv2 and 11iv3.
Copyright 1986 - 2009 Free Software Foundation, Inc.
Hewlett-Packard Wildebeest 6.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.
..
(gdb) core-file ./core
Core was generated by `pstack'.
Program terminated with signal 11, Segmentation fault.
SEGV_MAPERR - Address not mapped to object
#0 0x60000000c03cc650:0 in __doprnt_main+0x9d00 ()
from /usr/lib/hpux32/libc.so.1
(gdb) bt
#0 0x60000000c03cc650:0 in __doprnt_main+0x9d00 ()
from /usr/lib/hpux32/libc.so.1
#1 0x60000000c01fdc10:0 in _doprnt+0x30 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c03d8ba0:0 in printf+0x220 () from /usr/lib/hpux32/libc.so.1
#3 0x401e9c0:0 in pstack_dump () at pstack.c:679
#4 0x40094f0:0 in pstack () at pstack.c:913
#5 0x40051a0:0 in main () at pstack.c:1125

Seems like pstack sometimes causes coredump. What can be done?
4 REPLIES
James R. Ferguson
Acclaimed Contributor

Re: Seems like pstack causes coredump

Hi:

Patch PHSS_39822 may address your problem.

Regards!

...JRF...
blackwater
Regular Advisor

Re: Seems like pstack causes coredump

I have asked an administrator to install PHSS_39822 and PHCO_39526. When they are installed I will check if this problem is fixed or not.
blackwater
Regular Advisor

Re: Seems like pstack causes coredump

I have run the script after installing these patches and pstack doesn't cause any coredumps. I should have assigned 10 points.
James R. Ferguson
Acclaimed Contributor

Re: Seems like pstack causes coredump

Hi (again):

> I have run the script after installing these patches and pstack doesn't cause any coredumps. I should have assigned 10 points.

At least close the thread with a bunny so that future trollers will see the treasure :-)

Regards!

...JRF...