Forum Topic - Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT: (6 Items)
   
Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
Hi,

we've recently migrated from QNX6.4.1 to QNX6.5 as per suggestion of the QNX support. Reason was a very random "Crash[0,
0] at nano_signal line 1066" reported during running application or start up of our application.

Now with the new QNX6.5 we still phase a similar error but with MORE information. Can someone give me a hint were to 
start and how to interpret the message from the kernel.

I assume we have a bug somewhere in one part of our application -> "datasrv" as per the dump.

Shutdown[0,0] S/C/F=5/4/3 C/D=0002c214/000a1dd4 state(d0)= now lock exit
QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT
[0]PID-TID=2027582-19? P/T FL=00002010/04820000 "datasrvr"
ppcbe context[03ff7ed0]:
0000: 00000002 03ff7f80 000a6d14 03fe20a0 20004035 20004035 00000001 00000000
0020: 9000800b 03fe20a0 00000000 03fe20a0 00000000 000a8348 00000000 01a69de8
0040: 00001032 00000000 00000000 00000000 000a0000 00000000 00000000 000a1dd0
0060: 00008000 00000000 00000000 00000000 fe3393f4 00000000 01ef87cc 01a69af0
0080: 0009acac 00069fb4 00029032 0006a024 40000004 20000000 00000000 00000000
00a0: fe3393f4
instruction[0006a024] (nano_signal@2242):
48 00 00 08 16 5b 08 c2 80 1f 00 28 60 00 01 00 90 1f 00 28 80 01 00 14 7c 08
stack[03ff7f80]:
0000: 03ff7f90 00069fb4 800b010b 01a69af0 03ff7fe0 0006a148 01a69de8 01a69af0
0020: 03ff7fe0 0004dca0 01a69b50 01a69af0 03ff7ff0 0006bd6c 00000005 02e4f750
0040: 03ff7fd0 00067d98 02e4fa54 02e4f750 00000000 00000000 01a69de8 01a69af0
0060: 04820100 0009acbc 01a69de8 01a69af0 01ef87cc 00000000 800b010b 00004000


Thanks in advance for all hints
Kind Regards
Thomas
Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
In case you haven't seen the technote "Reading a Kernel Dump":
http://www.qnx.com/developers/docs/6.5.0/topic/com.qnx.doc.neutrino_technotes/proc_dump.html

It might get you started.

Regards,

Eric
Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
Hi,

yes thanks a lot. I've just found the doc AFTER I've posted my message.
Sorry to bother you folks with the post - next time I will have a closer look to the docs before I post something.

Regards
Thomas
Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
Something similar occured to me. Right after cpu_startnext() function started procnto:

System page at phys:84709000 user:84709000 kern:84709000
Starting next program at v84755bd4

Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock
QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT
shle context[84798378]:
0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000
0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0
0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782
instruction[8474b820] (pa@347):
03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46
stack[847983d0]:
0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000
0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468

Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded it
 using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause:
- S: SIGTRAP
- C: TRAP_CRASH (or NSIGTRAP)
- F: BREAKPOINT instr.

I have no clue why breakpoint instruction was reached. Image spec is like this:

[image=0x84720000]
[virtual=shle,binary] .bootstrap = {
  startup-mb442
  PATH=/proc/boot procnto
}

libc.so
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so

[+script] .script = {
        display_msg Welcome to QNX Neutrino 6.5.0 on the mb442-derived board
        SYSNAME=nto
        TERM=qansi
        HOME=/
        LD_LIBRARY_PATH=.:/tmp/:/proc/boot:/usr/photon/lib:/dll:/lib:/lib/dll:/usr/lib:/usr/photon/dll:/opt/lib
        PATH=.:/tmp:/proc/boot:.:/sbin:/usr/sbin:/usr/bin:/bin:/usr/local/bin:/usr/photon/bin:/opt/bin
        [+session] ksh &
}

###########################################################################
## File system links
###########################################################################
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /tmp=/dev/shmem

libcam.so.2
libm.so.2

###########################################################################
## QNX applications
###########################################################################
syslogd
ls
ksh
pipe
pidin
slogger
sloginfo
slay
mount
umount
cat
cp
rm
pipe
mkdir
kill
hogs
grep
chmod
sleep
tracelogger
shutdown
use

###########################################################################
## END OF BUILD SCRIPT
###########################################################################

As you can see, my welcome message wasn't displayed, kernel crashed earlier. I tried to change procnto to procnto-instr 
- no change, kernel dump is still the same. I placed plenty of kprintf in libstartup functions, all of them were 
displayed at boot time, so at least startup-mb442 seems to be OK. I feel not experienced enough to move further with 
this.
Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
Those SIGTRAP ones are essentially assertion failures in the code.
In this particular case line 347 of pa.c (reported as pa@347)

That particular one seems to be a failure to find a large enough
sysram chunk to satisfy an early kernel memory allocation.
Is your startup's init_raminfo() working correctly?

	Sunil.

On 12-06-07 1:54 PM, Paul Osmialowski wrote:
> Something similar occured to me. Right after cpu_startnext() function started procnto:
>
> System page at phys:84709000 user:84709000 kern:84709000
> Starting next program at v84755bd4
>
> Shutdown[0,0] S/C/F=5/4/3 C/D=84732850/84799c4c state(c0)= now lock
> QNX Version 6.5.0 Release 2010/07/09-14:41:25EDT
> shle context[84798378]:
> 0000: 00000000 fffffff8 847983f0 00000000 00000000 00005100 00000000 84700000
> 0020: 1ffffffe 847983d0 00004fe0 1fffffff 84799f18 84799f14 84798468 847983d0
> 0040: 400000f1 8474b820 84708000 00000000 000000d0 8474b782
> instruction[8474b820] (pa@347):
> 03 a0 09 00 63 5f 79 84 5b 01 63 60 04 e2 2d 40 0c 70 d1 91 1c 35 01 76 2d 46
> stack[847983d0]:
> 0000: 00000002 00000000 00000000 8470b000 84bfffff 00000000 00000000 84700000
> 0020: 84707fff 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
> 0060: 00000000 00000000 00000000 84798440 8470926d 00000000 8474b758 84798468
>
> Seems like there's no process started yet (no PID in kernel dump), addresses seem to be OK (things are where I loaded 
it using tftp), examining signal.h, sigininfo.h and fault.h gave me following S/C/F cause:
> - S: SIGTRAP
> - C: TRAP_CRASH (or NSIGTRAP)
> - F: BREAKPOINT instr.
>
> I have no clue why breakpoint instruction was reached. Image spec is like this:
>
Re: Shutdown[0,0] ... QNX Version 6.5.0 Release 2010/07/09-14:35:30EDT  
Seems like you were right. The only line in init_raminfo() is add_ram which adds 8MB of memory (should be enough). I 
looked at add_ram() code and found that it calls alloc_ram() for the part of RAM that overlaps with loaded image (which 
is also true in my case). I looked at alloc_ram() code and found three remarked kprintf's left there - I unremarked them
 and what it printed, pointed me to the source of my problem: I was passing wrong base address to add_ram() in 
init_raminfo(). Now there's no kernel dump anymore, actually, there's nothing at all that could give me a clue that the 
system is working :( Maybe something is wrong with my script? What display_msg command actually does? Is it using 
callout_debug (which seems to work OK as I was able to see kernel dump) for producing the output?