pstack help

P

pat saunders

Hi,
We have an application that is written in COBOL and links into a C API.
Every so often the process freezes and has to be killed and restarted.
To help solve the problem , a pstack trace was run when it froze .
The strange thing is : sigsuspend is not called directly in the code, it must
be in a library file. My main question is does this stack trace show that the
problem is in the C code (my prob) or the COBOL code (not my prob!!!)
Is there any way to debug pstack traces ???
The stack trace is listed below.

lwp#1 ----------
ef03998c sigsuspend (efffed60)
ef03998c _libc_sigsuspend (efffed60, efffed60, 8000, ef1e6b70, 77e5d8, 77e5b8) + 4
ef1d4d20 _ti_sigsuspend (efffed60, ef1e6b70, 0, ef1e6b70, 77e5d8, 77e5b8) + 5c
ef0562c4 usleep (30d40, f4240, ef0a58b0, 0, 6, 0) + 1b8
0001d1c8 snooze (c8, 6, 7a2f3f, 0, f0f0f0f, e) + 58
00788ec0 ???????? (7a4dc0, 1d170, 7a5b46, 7a34d0, 7a4ed8, 7a4108)
007a6ed8 ???????? (78205c, 7a3f58, effff06c, 7a3108, 782000, 7a000c)
0078204c ???????? (7a4dc0, 20202000, 78200c, 7a3104, 2, 0)
00032b74 ???????? (782000, 1, effff440, fffffffa, 676e74, 1)
ef7450c0 mFt_xe_run (7c99a0, 1, effff440, 0, 0, ffffffff) + 98
ef6b231c cobcall (effff6bd, 1, effff440, 0, effff444, 0) + 70c
ef75735c main (2, effff4bc, effff4c8, cf400, 0, 0) + 12c
0001bc1c _start (0, 0, 0, 0, 0, 0) + dc
lwp#2 ----------
ef03a618 signotifywait ()
ef1cbd70 _dynamiclwps (ef1e6b70, 54, 0, 0, 0, ef7efda8) + 1c
ef1cebf0 _ti_thr_yield (0, 0, 0, 0, 0, 0) + 8c
lwp#3 ----------
ef0376e4 door (4, 0, 0, 0, eef55d70, 4)
ef0376e4 __door_return (4, 0, 0, 0, eef55d70, 4) + c
ef1c8a60 _lwp_start (0, 1, 6000, efffeef4, 4, 0) + 14
ef1cebf0 _ti_thr_yield (0, 0, 0, 0, 0, 0) + 8c
lwp#4 ----------
ef03a484 lwp_cond_wait (ef1eb270, ef1eb280, eef43ca0)
ef06c574 _lwp_cond_timedwait (ef1eb270, ef1eb280, 0, 403caf10, 0, 0) + 90
ef1c755c _age (ef1e6b70, ef1e7b84, ef1e82a8, ef1e82c0, 3, ef1e6b70) + 90
ef1c8a60 _lwp_start (0, 1, 4000, eec0fc8c, 3, 0) + 14
ef1cebf0 _ti_thr_yield (0, 0, 0, 0, 0, 0) + 8c
lwp#5 ----------
ef03a4d0 lwp_sema_p (ef1e8590)
ef03a4d0 __lwp_sema_wait (ef1e8590, 658ecd80, 0, eea0bd44, 0, eea0bd38) + 8
ef1c72b8 _co_timerset (ef1e8580, ef1e7b18, ef1e6b70, ef1e82c0, 3, ef1e6b70) + f4
ef1d64bc _thread_start (0, 0, 0, 0, 0, 0) + 40
 
J

Joona I Palaste

pat saunders said:
Hi,
We have an application that is written in COBOL and links into a C API.
Every so often the process freezes and has to be killed and restarted.
To help solve the problem , a pstack trace was run when it froze .
The strange thing is : sigsuspend is not called directly in the code, it must
be in a library file. My main question is does this stack trace show that the
problem is in the C code (my prob) or the COBOL code (not my prob!!!)
Is there any way to debug pstack traces ???
The stack trace is listed below.

Sorry, your question concerns a particular C implementation and not the
C programming language. Therefore it is off-topic for comp.lang.c.
Please ask in a newsgroup dedicated to your own operating system.

--
/-- Joona Palaste ([email protected]) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"I said 'play as you've never played before', not 'play as IF you've never
played before'!"
- Andy Capp
 
Y

Yakov Lerner

lwp#1 ----------
ef03998c sigsuspend (efffed60)
ef03998c _libc_sigsuspend (efffed60, efffed60, 8000, ef1e6b70, 77e5d8, 77e5b8) + 4
ef1d4d20 _ti_sigsuspend (efffed60, ef1e6b70, 0, ef1e6b70, 77e5d8, 77e5b8) + 5c
ef0562c4 usleep (30d40, f4240, ef0a58b0, 0, 6, 0) + 1b8

Your application is multi-threaded, but
usleep shall not be used in multi-thread programs. (Your output looks like
Solaris'). Read carefully 'man usleep'. usleep is not thread-safe.
You shall change it to thread-safe equivalent.

Jacob
 
M

Michael Wojcik

We have an application that is written in COBOL and links into a C API.
Every so often the process freezes and has to be killed and restarted.
To help solve the problem , a pstack trace was run when it froze .
The strange thing is : sigsuspend is not called directly in the code, it must
be in a library file. My main question is does this stack trace show that the
problem is in the C code (my prob) or the COBOL code (not my prob!!!)
Is there any way to debug pstack traces ???

Wrong newsgroup, I'm afraid. This is an OS and language-implementation
question.

You might get more help from comp.lang.cobol, which is considerably
less busy than comp.lang.c and so less concerned with topicality.
But I suspect the newsgroup dedicated to your OS (Solaris, I'm
guessing, based on the presence of "door" in the ptrace output) is
probably a better bet. At this level, C and COBOL are pretty much
beside the point; you're looking at compiled code either way.

I'd also recommend taking this up with your Micro Focus support rep,
if you have one (the ptrace output indicates this is MF COBOL). If
not, email me directly (either address) and I'll take a closer look.


--
Michael Wojcik (e-mail address removed)

Art is our chief means of breaking bread with the dead ... but the social
and political history of Europe would be exactly the same if Dante and
Shakespeare and Mozart had never lived. -- W. H. Auden
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top