[Prev][Next][Index][Thread]

Re: Posix Threads.. Dump of trap state



> From: Vishal Zinjuvadia <zvishal@ittc.ukans.edu>
> Subject: Posix Threads.. Dump of trap state
> 
>  I am trying to port a multi-threaded OCaml kernel onto OSKit. I am
> experiencing "Dump of trap state" problems . Does anyone have some
> guidelines to debug such problems. How do I know where the trap_dump is
> called.

So, typically you will get a printout like the one at the end of this
message. EIP is the program counter. You can use gdb on the kernel file
(assuming its not stripped and that you did --enable-debug when you
configured) to determine where it died. So, using the example below:

	(gdb) list *0x00100508
	0x100508 is in main (/oskit/examples/x86/threads/dphils.c:209).

Further, all the threads will give backtrace reports, and the last one
given is the thread that was actually running and caused the exception.
There is a program in the oskit install directory (--prefix argument to
configure) called sym-trace that you can use to dump the stack contents:

	/build/oskit-debug/install/bin/sym-trace -o dphils
	001054fd 001129da 0010f53b 0010f5f1 001102ea 00100508 0010d72b
	Generating backtrace for object file dphils
	0x01054fd in (0x01054b4) oskit_libc_sendsig()
	0x01129da in (0x0112930) machdep_deliver_signal()
	0x010f53b in (0x010f518) oskit_sendsig()
	0x010f5f1 in (0x010f548) sendsig_trap_handler()
	0x01102ea in (0x0110284) alltraps()
	0x0100508 in (0x0100444) main()
	0x010d72b in (0x010d650) multiboot_main()

Hope this helps!

Lbs
----------------------------------------
Leigh B. Stoller
University of Utah - Flux Research Group
http://www.cs.utah.edu/~stoller
----------------------------------------

TID 0x1: exception, code=0x2
EAX 00000007 EBX 00000007 ECX 0013ab40 EDX 00000000
ESI 00000000 EDI 00139f8c EBP 00139fa8 ESP 00000000
EIP 00100508 EFLAGS 00010246
CS 0010 SS 0348 DS 0018 ES 0018
Backtrace:

Sendsig: Signal 8 caught but no handler
Backtrace tid:2 P:0101e000: eip:0x00102940 fp:0x00000000

Backtrace tid:3 P:01027000: eip:0x00103f59 fp:0x0102eed8
         0010404d 00105b15 00105a52 00100363 001029b1
Backtrace tid:4 P:01030000: eip:0x00102940 fp:0x00000000

Backtrace tid:5 P:01039000: eip:0x00103f59 fp:0x01040ed8
         0010404d 00105b15 00105a52 00100363 001029b1
Backtrace tid:6 P:01042000: eip:0x00102940 fp:0x00000000

Backtrace tid:7 P:0104b000: eip:0x00103f59 fp:0x01052ed8
         0010404d 00105b15 00105a52 00100363 001029b1
Backtrace tid:8 P:01054000: eip:0x00102940 fp:0x00000000

Tid:0x1 P:0013ab40
Backtrace: fp=139d7c
 001057ce 001054fd 001129da 0010f53b 0010f5f1 001102ea 00100508 0010d72b