Reading a Shutdown Message

Updated: April 19, 2023

If your application crashes with a kernel fault, the output tells you what happened at the time of the crash. Here's a sample:

Shutdown[0,0] S/C/F=5/3/3 C/D=fe06601c/fe0fafb0
QNX Version 7.1.0-1.3.0 Release 2021/06/08-17:43:35EDT KSB:808a0000
$URL: http://svn.ott.qnx.com/product/branches/7.1.0/trunk/services/system/ker/timestamp.c $
[0]PID-TID=647179-1 P/T FL=41000400/00040000 state=00 "./nonnull-4.exe"
[1]PID-TID=1-2 P/T FL=01019001/0c000000 state=01 "proc/boot/procnto-smp-instr"
[2]PID-TID=1-3 P/T FL=01019001/0c000000 state=01 "proc/boot/procnto-smp-instr"
[2]ASPACE PID=249868 PF=41400010 "proc/boot/fs-nfs3"
[3]PID-TID=1-4 P/T FL=01019001/0c000000 state=01 "proc/boot/procnto-smp-instr"
[3]ASPACE PID=249868 PF=41400010 "proc/boot/fs-nfs3"
armle context[fe065368]:
0000: 00000000 0000004c 1b4c9044 1b4c8f88 1b4c9038 5a07cde4 1b4c9034 1b4c9004
0020: 5a07ce62 00000000 45b5be78 00000000 1b4c8f9c 5a07cdc8 1b4c66b8 1b4c65f4
0040: 60000030
instruction[1b4c65f4]:
f8 29 00 00 6e 2a 00 00 50 00 00 00 4c 00 00 00 44 00 00 00 48 00 00 00 40 00
stack[5a07cdc8]:
0000:>1b4c900c 00000001 5a07cde4 5a07cdec 45c06df4 1b4c66b8 00000001 5a07ce62
0020: 00000000 5a07ce72 5a07ce84 00000000 00000003 1b4c6034 00000004 00000020
0040: 00000005 00000009 00000009 1b4c6614 00000006 00001000 00000007 45b2e000
0060: 0000002d 00000802 0000002e c0000034 0000002f 5a07cefb 0000002b 168bb8f6
Here's what each part means:
Shutdown[0,0]
A fatal error occurred on CPU 0 while CPU 0 held the kernel lock.
S/C/F=5/3/3
Signal, code, and fault codes; see these files:
  • signal: /usr/include/signal.h
  • code: /usr/include/sys/siginfo.h
  • fault: /usr/include/sys/fault.h

To find out what happened, search signal.h for the signal code. This tells you the name of the signal. Then, look in siginfo.h for the signal name. In this example, code 11 in signal.h is a SIGSEGV; in siginfo.h, code 1 in the SIGSEGV section is:

SEGV_MAPERR 1  // Address not mapped
  

See also the entry for siginfo_t in the QNX Neutrino C Library Reference.

C/D
Location of the kernel's code and data.
  • code: Points to the address of kernel's main() function.
  • data: Points to the kernel's 'inkernel' variable.
state
The state of the kernel:
  • now — in the kernel
  • lock — nonpreemptible
  • exit — leaving kernel
  • specret — special return processing
  • any number — the interrupt nesting level.
QNX Version
The version of the OS, followed by the date and time at which it was built.
KSB
The kernel stack base.
[x]PID-TID=y-z
The process ID and thread ID. On CPU x (think SMP), process y was running thread z when the crash occurred.
P/T FL
Process and thread flags. The process flags are in the form _NTO_PF_*, and the thread flags are in the form _NTO_TF_*. For more information, see <sys/neutrino.h> and the entry for pidin in the Utilities Reference.
[x]ASPACE PID=y
On CPU x, the address space for process y was active. This line appears only when the process is different from the one in the PID-TID line.
PF
The process flags for the ASPACE PID. In the sample above, devb-eide wasn't running, but its address space was active.
context
The register set. You can find the list of registers in /usr/nto/include/cpu/context.h, where cpu is the appropriate CPU-specific directory.
instruction
The instruction on which the error occurred.
stack
The contents of the stack. The location of the stack pointer is indicated by a greater-than sign (>) in the output; you can use the -S option for procnto to specify how many bytes of data before and after the stack pointer to include in the dump.