Problem
I get the following panic:PANIC: sleep - Sleeping at interrupt or STREAMS run time
I am running executables on SCO OpenServer 5.0.x that were compiled on SCO Open Desktop 3.0 with profiling enabled (the -p or -qp options to cc(CP)).
Applications developed on Open Desktop 3.0 can cause panics on SCO OpenServer Release 5.0.0 and 5.0.2 if profiling is enabled. Profiling is an option of the compiler that allows the application developer to identify how many times a line of code is executed when a program is run.
This is a known problem in the SCO OpenServer 5.0.0 and 5.0.2 kernel. It has been resolved in SCO OpenServer Release 5.0.4.
This particular problem only occurs with programs that have been compiled with embedded profiling. For a customer-ready program, profiling would normally be disabled since it would have a performance overhead associated with it and profiling is only useful during the development stage of an application.
Solution
A new set of binaries which resolves this issue has been created by SCO Engineering and is available upon request from SCO Support.
To identify this as the cause of the panic, run the following command within crash(ADM) against the dump: "u -f".
This produces an output of the user information associated with
the kernel. If there are values other than 0 in the profiling
variables, profiling is enabled. These variables are:pr_base; pr_size; pr_off; pr_scaleA typical output of an application with enabled profiling:
> u -f
PER PROCESS USER AREA FOR PROCESS 45
USER ID's: uid: 0, gid: 2, real uid: 1047, real gid: 50
supplementary gids: 50
PROCESS TIMES: user: 2313, sys: 55108, child user: 0, child sys: 0
PROCESS MISC:
command: alarm, psargs: alarm
proc: P#45, cntrl tty: 0,9
start: Fri May 9 13:41:00 1997
mem: 0x10ec769, type: exec
proc/text lock: none
current directory: I#747
OPEN FILES AND POFILE FLAGS:
[ 0]: F#624 [ 1]: F#214 w [ 2]: F#214 w
FILE I/O:
u_base: 0x406b1d, file offset: 46829092, bytes: 0
segment: data, cmask: 0022, ulimit: 4194303
file mode(s): read write
SIGNAL DISPOSITION:
sig# signal oldmask sigmask
1: 0x1697 -
2: 0x1697 -
3: 0x1697 - 28: default -
29: default -
30: default -
31: default -
ux_uid: 0, ux_gid: 0, ux_mode:
comp: 0xe0000d2a, nextcp: 0xe0000d2d
bsize: 1024, pgproc: 0, qsav: 0xe0001148, error: -75249144
ap: 0xe0001148, u_r: 0x25, pbsize: 1
pboff: 36, pbdev: 1,42 , rablock: 0, errcnt: 5
dirp: 0x1, dent.d_ino: 0 dent.d_name: udp, pdir: I#562
ttyip: - , tsize: 0x8, dsize: 0x12c, ssize: 0x2
arg[0]: 0x1, arg[1]: 0x406af8, arg[2]: 0x25
arg[3]: 0x1, arg[4]: 0x8059504, arg[5]: 0
syscall: 0x4, ar0: 0xe0000e34, ttyp: 0xf01ad48a, ticks: 0x56a3d4
==>> pr_base: 0x408ddc, pr_size: 7268, pr_off: 0x1d4, pr_scale: 16386
ior: 0x9, iow: 0, iosw: 0xa, ioch: 0x28db212
sysabort: 0, systrap: 0
callgatep: 0, callgate[0]: 0, callgate[1]: 0
debugpend: 0, debugon: 0
dr[0]: 0, dr[1]: 0, dr[2]: 0
dr[3]: 0, dr[4]: 0, dr[5]: 0
dr[6]: 0, dr[7]: 0
entrymask: 00000000 00000000 00000000 00000000
exitmask: 00000000 00000000 00000000 00000000
EXDATA:
ip: I#891, tsize: 0x7290, dsize: 0x3318, bsize: 0x4098, lsize: 0
magic#: 0413, toffset: 0xd0, doffset: 0x7360, loffset: 0
txtorg: 0xd0, datorg: 0x400360, entloc: 0xd4, nshlibs: 0
execsz: 0x15, ldtmodified: 0, ldtlimit: 256>quitIf profiling has not been enabled, you should see the following:
> u -f
PER PROCESS USER AREA FOR PROCESS 108
USER ID's: uid: 0, gid: 50, real uid: 0, real gid: 50
supplementary gids: 50
PROCESS TIMES: user: 8, sys: 2, child user: 0, child sys: 0
PROCESS MISC:
command: crash, psargs: crash
proc: P#108, cntrl tty: 58,4
start: Wed May 28 15:06:39 1997
mem: 0x8e1, type: exec
proc/text lock: none
current directory: I#415
OPEN FILES AND POFILE FLAGS:
[ 0]: F#337 r [ 1]: F#337 w [ 2]: F#337 w
[ 3]: F#429 r [ 4]: F#337
FILE I/O:
u_base: 0x80cf710, file offset: 28041848, bytes: 4096
segment: data, cmask: 0022, ulimit: 2097151
file mode(s): read
SIGNAL DISPOSITION:
sig# signal oldmask sigmask
1: default -
2: 0x805eb50 - 2 13
3: default -
4: default - 29: default -
30: default -
31: default -
ux_uid: 0, ux_gid: 0, ux_mode:
comp: 0xe0000d0b, nextcp: 0xe0000d0f
bsize: 1024, pgproc: 0, qsav: 0xe0000e34, error: -266449448
ap: 0xe0001148, u_r: 0, pbsize: 49
pboff: 0, pbdev: 1,40 , rablock: 0, errcnt: 7
dirp: 0x4c, dent.d_ino: 0 dent.d_name: unix, pdir: I#122
ttyip: - , tsize: 0x6a, dsize: 0x89, ssize: 0x2
arg[0]: 0x4c, arg[1]: 0x2c88, arg[2]: 0x80ce710
arg[3]: 0x12000, arg[4]: 0x5, arg[5]: 0
syscall: 0x32, ar0: 0xe0000e34, ttyp: 0xf0217502, ticks: 0x2aac5ab
==>> pr_base: 0, pr_size: 0, pr_off: 0, pr_scale: 0
ior: 0x3, iow: 0, iosw: 0x5a, ioch: 0x5922a
sysabort: 0, systrap: 0
callgatep: 0, callgate[0]: 0, callgate[1]: 0
debugpend: 0, debugon: 0
dr[0]: 0, dr[1]: 0, dr[2]: 0
dr[3]: 0, dr[4]: 0, dr[5]: 0
dr[6]: 0, dr[7]: 0
entrymask: 00000000 00000000 00000000 00000000
exitmask: 00000000 00000000 00000000 00000000
EXDATA:
ip: I#178, tsize: 0x19be4, dsize: 0xed78, bsize: 0x2094, lsize: 0
magic#: 011065, toffset: 0x34, doffset: 0x19c18, loffset: 0
txtorg: 0x8048034, datorg: 0x8062c18, entloc: 0x80014480, nshlibs: 0
execsz: 0x30, ldtmodified: 0, ldtlimit: 256>quitTo disable profiling, recompile the application without the -p
or -q[l|p] flags.NOTE: Profiling on SCO OpenServer Development System 5.0.0 is not the
problem. The problem lies with applications compiled on SCO Open
Desktop 3.0 with profiling enabled that are run on OpenServer 5.0.x. See also
Refer to the documentation on cc(CP), prof(CP) and lprof(CP) for further information on profiling.