thread debugging with gdb
juanba romance
juanba.romance at gmail.com
Sun Feb 24 13:41:48 UTC 2008
Hello all, i have got spare time to follow with this issue ;-)
I attach parts of the past threads to track stuff
Nope, the kernel in Buildroot for AVR32 fork does not have the debug
> fix. The easiest is to grab the kernel from
> http://avr32linux.org/twiki/bin/view/Main/LinuxPatches and compile it
> with the toolchain you generate with Buildroot. Then replace
> the /lib/modules and /boot/uImage in your image.
>
OK already applied
# cat /proc/version
Linux version 2.6.23.atmel.5-mbv (juanba at psi) (gcc version 4.2.1-atmel.1.0.3)
#4 PREEMPT Sun Feb 24 13:55:02 CET 2008
> > Did you build uClibc with debuggable
> >
> > threads?
> > Not yet i unpackaged the NGW100 kit on saturday and i was only
> > checking the default provided environment, Anyway the the buildroot
> > has already manufactured the images and all the stuff, but yes this
> > time i have toggled CONFIG_BR2_PTHREAD_DEBUG option i mean it's
> > related on isn't it?
> >
>
> If the file in toolchain_build_avr32_nofpu/uClibc-0.9.29/.config has
> PTHREADS_DEBUG_SUPPORT=y, then you should be fine.
>
OK applied also
juanba at psi:~/AVR32/buildroot-avr32-v2.1.0$ grep DEBUG_SUPPORT
toolchain_build_avr32_nofpu/uClibc-0.9.29/.config
PTHREADS_DEBUG_SUPPORT=y
Current state
1. This is the gdb hosted output:
juanba at psi:~/avr32-development/ ddd --debugger avr32-linux-gdb
obj/avr32_linux/syscore-probe.x
GNU DDD 3.3.11 (i486-pc-linux-gnu), by Dorothea Lütkehaus and Andreas
Zeller.
Copyright (c) 1995-1999 Technische Universität Braunschweig, Germany.
Copyright (c) 1999-2001 Universität Passau, Germany.
Copyright (c) 2001 Universität des Saarlandes, Germany.
Copyright (c) 2001-2004 Free Software Foundation, Inc.
(gdb) target remote 10.0.0.1:2345
0x000010fc in _start ()
(gdb) break src/syscore-probe.c:29
Breakpoint 1 at 0x12dc: file src/syscore-probe.c, line 29.
(gdb) cont
Program received signal SIG32, Real-time event 32.
0x00007c40 in sigsuspend ()
(gdb) next
Single stepping until exit from function sigsuspend,
which has no line number information.
0x00006872 in pthread_handle_sigrestart ()
(gdb) next
Single stepping until exit from function pthread_handle_sigrestart,
which has no line number information.
0x000074b8 in __default_rt_sa_restorer ()
(gdb) next
Single stepping until exit from function __default_rt_sa_restorer,
which has no line number information.
0x00007c40 in sigsuspend ()
(gdb) next
Single stepping until exit from function sigsuspend,
which has no line number information.
0x00006124 in __pthread_wait_for_restart_signal ()
(gdb) next
Single stepping until exit from function __pthread_wait_for_restart_signal,
which has no line number information.
0x0000678e in pthread_create ()
(gdb) next
Single stepping until exit from function pthread_create,
which has no line number information.
0x00001bf4 in sys_core_boot ()
(gdb) next
Single stepping until exit from function sys_core_boot,
which has no line number information.
main () at src/syscore-probe.c:88
(gdb) next
(gdb) next
(gdb) next
(gdb) next
(gdb) next
(gdb) next
(gdb) next
(gdb) next
(gdb) next
Program exited normally.
(gdb)
And this is the Target LOG and setup:
1.- First we check that the program runs under specifications if we execute
it in standalone mode
# ./syscore-probe.x
LOG ( 286 )( 23:15:47.499 )syscore-probe, v1-r0.p0 Feb 24 2008 14:09:43
LOG ( 288 )( 23:15:47.505 )tube_handler: T R I G E R R E D
source $00000001 notifier_mask:$00000000
LOG ( 288 )( 23:15:47.508 )Tube change requested: current Tube.-1 versus
Tube.12
LOG ( 288 )( 23:15:47.511 )tube_handler: T R I G E R R E D
source $00000001 notifier_mask:$00000002
LOG ( 288 )( 23:15:47.514 )Rotor speed requested: current speed.-1 versus
speed.124
LOG ( 286 )( 23:15:47.516 )Full Duplex completed
2.- Now we check it with the gdb couplage
# gdbserver :2345 syscore-probe.x
Process syscore-probe.x created; pid = 291
Listening on port 2345
Remote debugging from host 10.0.0.2
LOG ( 291 )( 23:16:57.475 )syscore-probe, v1-r0.p0 Feb 24 2008 14:09:43
LOG ( 293 )( [ 744.180000] ------------[ cut here ]------------
[ 744.180000] Badness at arch/avr32/kernel/ocd.c:73
23:17:24.098 )tube_handler: T [ 744.184000] Oops: Critical exception, sig:
9 [#1]
[ 744.184000] PREEMPT FRAME_POINTER chip: 0x01f:0x1e82 rev 2
[ 744.184000] Modules linked in: xt_state iptable_filter ipt_MASQUERADE
iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack ip_tables
[ 744.184000] PC is at ocd_disable+0x32/0x70
[ 744.184000] LR is at ocd_disable+0x28/0x70
[ 744.184000] pc : [<90013baa>] lr : [<90013ba0>] Not tainted
[ 744.184000] sp : 9142ddf8 r12: 00000001 r11: 91df8720
[ 744.184000] r10: 80000000 r9 : 901febc4 r8 : fffffffe
[ 744.184000] r7 : 9142ddf8 r6 : 91df8720 r5 : 90323300 r4 : 7f1ffe20
[ 744.184000] r3 : 00000000 r2 : 00000001 r1 : 9142deec r0 : 9142dfb8
[ 744.184000] Flags: qvNzc
[ 744.184000] Mode bits: hjmdE....g
[ 744.184000] CPU Mode: Exception
[ 744.184000] Process: syscore-probe.x [293] (task: 90323300 thread:
9142c000)
[ 744.184000] Stack: (0x9142ddf8 to 0x9142e000)
[ 744.184000] dde0:
900148b4 9142de0c
[ 744.184000] de00: 91df8720 90323300 7f1ffe20 9001d80a 9142de28 91df8720
90323300 7f1ffe20
[ 744.184000] de20: 9142deec 9142dfb8 9001dc1c 9142de4c 90328340 00000005
7f1ffe20 9142c000
[ 744.184000] de40: 9142c000 9142deec 9142dfb8 90022caa 9142de78 00000005
9142c000 7f1ffe20
[ 744.184000] de60: ffffe000 9142c000 9142deec 9142dfb8 9142df6c 90323554
9001401e 9142df80
[ 744.184000] de80: 00000000 00001296 7f1ffe20 00000000 00000082 c0000002
9142dfb8 90323554
[ 744.184000] dea0: 00000005 7f1ffe20 9002370c 9142decc 90323300 00000005
90023718 9142decc
[ 744.184000] dec0: 00000000 00000005 7f1ffe20 90013838 9142df70 9142def0
9142c000 7f1ffe20
[ 744.184000] dee0: 00000005 000012dc 01c00000 00000005 00000000 00030001
000012dc 00000000
[ 744.184000] df00: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
[ 744.184000] df20: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
[ 744.184000] df40: 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000
[ 744.184000] df60: 00000000 00000000 00000000 00000000 90013fba 9142df94
9142dfb8 9142c000
[ 744.184000] df80: 90014404 9142dfa4 000149f4 00001296 7f1ffe20 00000000
00000082 c0000002
[ 744.184000] dfa0: 9142c000 900113de 7f1ffd28 000149f4 00001296 7f1ffe20
00000021 000012dc
[ 744.184000] dfc0: 000041fe 7f1ffd04 00000000 00000001 00000000 00000000
00000000 7f1ffd28
[ 744.184000] dfe0: 000149f4 00001296 7f1ffe20 00000000 00000402 7f001000
00000002 00000001
[ 744.184000] Call trace:
[ 744.184000] [<900148b4>] exit_thread+0x10/0x14
[ 744.184000] [<9001d80a>] do_exit+0x25e/0x600
[ 744.184000] [<9001dc1c>] sys_exit_group+0x0/0x10
[ 744.184000] [<90022caa>] get_signal_to_deliver+0x2c6/0x2fc
[ 744.184000] [<9001401e>] do_signal+0x52/0x40c
[ 744.184000] [<90014404>] do_notify_resume+0x2c/0x38
[ 744.184000] [<900113de>] fault_exit_work+0x24/0x36
[ 744.184000]
R I G E[ 744.188000] Fixing recursive fault but reboot is needed!
R[ 744.192000] BUG: scheduling while atomic: syscore-probe.x
/0x00000002/293
[ 744.196000] Call trace:
R [ 744.200000] [<900149b8>] E dump_stack+0x18/0x20
D[ 744.204000] [<90017c4e>]
__schedule_bug+0x2a/0x34
[ 744.208000] [<90183754>] soschedule+0x58/0x308
u[ 744.216000] [<9001d656>] rdo_exit+0xaa/0x600
c[ 744.220000] [<900137ac>] edie+0xec/0x120
[ 744.224000] [<900137ea>] $do_critical_exception+0xa/0x10
0[ 744.228000] [<90011224>] 00bad_return+0x0/0x28
0[ 744.232000] [<900148b4>] 00exit_thread+0x10/0x14
0[ 744.240000] [<9001d80a>] 1do_exit+0x25e/0x600
[ 744.244000] [<9001dc1c>] nsys_exit_group+0x0/0x10
o[ 744.248000] [<90022caa>] tiget_signal_to_deliver+0x2c6/0x2fc
f[ 744.252000] [<9001401e>] iedo_signal+0x52/0x40c
r[ 744.260000] [<90014404>] _do_notify_resume+0x2c/0x38
m[ 744.264000] [<900113de>] asfault_exit_work+0x24/0x36
k[ 744.268000]
:$00000000
Child exited with retcode = 0
Child exited with status 0
GDBserver exiting
To be honest i have not any idea what above means..
Any hint ?
Cheers..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20080224/1182eec6/attachment-0002.htm
More information about the uClibc
mailing list