STREAMS/UX for the HP 9000 Reference Manual

208
Debugging STREAMS/UX Modules and Drivers
Debugging Examples
*/
splx(s);
In order to protect access to q->q_ptr, sp_timeout() must also call splstr()
before it accesses q->q_ptr. The source code for sp_timeout() in the first
example in this section shows the correct use of splstr().
See the STREAMS/UX synchronization section of Chapter 3 for guidelines
on protecting module and driver critical sections.
Example 3
The following core dump was obtained while using a modified version of the
sp driver, which is described in example #2 in the strdb section of this
chapter.
On entry to adb, we first look at the msgbuf to look for the panic message
and hex stack trace. The interesting portion of msgbuf for this dump is:
msgbuf+0xc/s
.
.
.
trap type 15, pcsq.pcoq = 0.9ea14, isr.ior = 0.d
@(#)9245XA HP-UX (A.09.00) #0: Thu Aug 13 23:17:54 PDT 1992
panic: (display==0xbf00, flags==0x0) Data segmentation fault
PC-Offset Stack Trace (read across, most recent is 1st):
0x0016da70 0x000e5a68 0x000d34cc 0x0009ea14 0x00099714 0x0009
2fdc
0x0006e0c8 0x0006dbb8 0x0006d2a8 0x001954e8 0x00194fa4 0x000b
7e24
0x001846d4 0x00181730 0x00156538 0x00156af8 0x001567b8 0x000e
6d80
0x000d3aac
End Of Stack
First we translate the hex stack trace in the panic message into procedure
names and addresses. Using the adb i command for each of the hex
addresses in the panic message stack trace, we get the following symbolic
stack trace:
panic+30: addil -1000,dp
trap+0xADC: b trap+1004
$call_trap+20: rsm 1,r0
flushq+60: ldbs 0xD(r21),r22
q_free+1C: ldw -0xA4(sp),r31
osr_pop_subr+0xB44: b osr_pop_subr+0xB4C
osr_close_subr+4D8: stw ret0,-40(sp)
pse_close+8A0: stw ret0,-3C(sp)