[M3devel] System and User space Threads on LINUXLIBC6
Daniel Alejandro Benavides D.
dabenavidesd at yahoo.es
Fri Sep 28 17:02:59 CEST 2007
Hi:
I would like to know if it is necessary to turn down
the garbage collection to debug a M3 program.
I know running a program inside gdb in general could
cause some runtime diferences withj normal execution,
like the cout<< in C++, which is reliable under
debugging conditions, but not in normal execution
conditions in a program which calls it constantly
(that happened me on 2005), so one can note that the
behaviour would be better on debug conditions, thats
why I think this is not maybe the problem on NThreads
program (is easy to say that if we think that the
runtime errors showed inside m3gdb are not present
when the program executes normally), tough I debugged
one more time to show other backtraces:
(m3gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program:
/home/danielb/code/m3/parallel/LINUXLIBC6/NThreads
Error in re-setting breakpoint 3:
No source file named ThreadPThread.m3.
Error in re-setting breakpoint 3:
No source file named ThreadPThread.m3.
Error in re-setting breakpoint 3:
No source file named ThreadPThread.m3.
Breakpoint 3 at 0xb7654dba: file ThreadPThread.m3,
line 1180.
[Thread debugging using libthread_db enabled]
[New Thread -1220008256 (LWP 8474)]
[Switching to Thread -1220008256 (LWP 8474)]
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb7447010) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
[New Thread -1220281424 (LWP 8495)]
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb7447058) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
[New Thread -1228674128 (LWP 8496)]
1
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb74470a0) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
1[New Thread -1237066832 (LWP 8497)]
2 1
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb74470e8) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
2 1[New Thread -1245459536 (LWP 8498)]
3 2 1
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb7447130) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
3 2 1[New Thread -1253852240 (LWP 8499)]
3 2 1
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb7447178) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
Program received signal SIG64, Real-time event 64.
NThreads_M3_te29971a7_INIT (L_2=0xb7447178) at
NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
Program received signal SIG64, Real-time event 64.
[Switching to Thread -1253852240 (LWP 8499)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) cont
Continuing.
[Switching to Thread -1220008256 (LWP 8474)]
Breakpoint 1, NThreads_M3_te29971a7_INIT
(L_2=0xb7447178) at NThreads.m3:14
14 Closure = Thread.Closure OBJECT
(m3gdb) cont
Continuing.
Program received signal SIG64, Real-time event 64.
[Switching to Thread -1237066832 (LWP 8497)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) cont
Continuing.
Program received signal SIG64, Real-time event 64.
[Switching to Thread -1228674128 (LWP 8496)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) cont
Continuing.
Program received signal SIG64, Real-time event 64.
[Switching to Thread -1220281424 (LWP 8495)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) cont
Continuing.
[Switching to Thread -1253852240 (LWP 8499)]
Breakpoint 3, SignalHandler (sig=64, sip=16_b543af8c,
uap=16_b543b00c) at ThreadPThread.m3:1180
1180 ThreadPThread.m3: No such file or directory.
in ThreadPThread.m3
(m3gdb) where
#0 SignalHandler (sig=64, sip=16_b543af8c,
uap=16_b543b00c) at ThreadPThread.m3:1180
#1 <signal handler called>
#2 0xffffe410 in __kernel_vsyscall ()
#3 0xb75df3c1 in __lll_mutex_unlock_wake () from
/lib/tls/i686/cmov/libpthread.so.0
#4 0xb75dc2df in _L_mutex_unlock_128 () from
/lib/tls/i686/cmov/libpthread.so.0
#5 0xb543b358 in ?? ()
#6 0xb764ecef in Release (m=16_b767adf4) at
ThreadPThread.m3:186
#7 0xb764ecef in Release (m=16_b7440004) at
ThreadPThread.m3:186
#8 0xb7651aa9 in RunThread (me=16_08054700) at
ThreadPThread.m3:536
#9 0xb76517e6 in ThreadBase (param=16_08054700) at
ThreadPThread.m3:521
#10 0xb75da341 in start_thread () from
/lib/tls/i686/cmov/libpthread.so.0
#11 0xb754c4ee in clone () from
/lib/tls/i686/cmov/libc.so.6
(m3gdb) step
1181 in ThreadPThread.m3
(m3gdb) step
[Switching to Thread -1237066832 (LWP 8497)]
Breakpoint 3, SignalHandler (sig=64, sip=16_b643cf9c,
uap=16_b643d01c) at ThreadPThread.m3:1180
1180 in ThreadPThread.m3
(m3gdb) step
[Switching to Thread -1228674128 (LWP 8496)]
Breakpoint 3, SignalHandler (sig=64, sip=16_b6c3df9c,
uap=16_b6c3e01c) at ThreadPThread.m3:1180
1180 in ThreadPThread.m3
(m3gdb) step
[Switching to Thread -1220281424 (LWP 8495)]
Breakpoint 3, SignalHandler (sig=64, sip=16_b743ef9c,
uap=16_b743f01c) at ThreadPThread.m3:1180
1180 in ThreadPThread.m3
(m3gdb) step
***
*** runtime error:
*** <*ASSERT*> failed.
*** file "../src/thread/PTHREAD/ThreadPThread.m3",
line 1184
***
***
*** runtime error:
*** <*ASSERT*> failed.
*** file "../src/thread/PTHREAD/ThreadPThread.m3",
line 1184
***
***
*** runtime error:
*** <*ASSERT*> failed.
*** file "../src/thread/PTHREAD/ThreadPThread.m3",
line 1184
***
Program received signal SIG64, Real-time event 64.
[Switching to Thread -1220008256 (LWP 8474)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) where
#0 0xffffe410 in __kernel_vsyscall ()
#1 0xb75dcc76 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/tls/i686/cmov/libpthread.so.0
#2 0xb7655ae0 in LockHeap () at ThreadPThread.m3:1370
#3 0xb76213ca in GetUntracedRef (def=16_b767af38) at
RTAllocator.m3:240
#4 0xb7620b4a in AllocateUntracedRef
(defn=16_b767af38) at RTAllocator.m3:146
#5 0xb7652003 in Fork (closure=16_b7447178) at
ThreadPThread.m3:575
#6 0x0804b8b6 in Fork () at NThreads.m3:33
#7 0x0804b928 in NThreads (mode=1) at NThreads.m3:39
#8 0xb763a87a in RunMainBody (m=16_0804dc60) at
RTLinker.m3:399
#9 0xb7639174 in AddUnitI (m=16_0804dc60) at
RTLinker.m3:113
#10 0xb763920b in AddUnit (b={"NThreads_M3", Declared
at: NThreads.m3:38}) at RTLinker.m3:122
#11 0x08048ea8 in main (argc=1, argv=0xbfce0c04,
envp=0xbfce0c0c) at _m3main.mc:4
(m3gdb) step
Single stepping until exit from function
__kernel_vsyscall,
which has no line number information.
SignalHandler (sig=64, sip=16_bfce042c,
uap=16_bfce04ac) at ThreadPThread.m3:1157
1157 in ThreadPThread.m3
(m3gdb) step
***
*** runtime error:
*** <*ASSERT*> failed.
*** file "../src/thread/PTHREAD/ThreadPThread.m3",
line 1184
***
1161 in ThreadPThread.m3
(m3gdb) step
m3_Cerrno_GetErrno () at ../src/C/Common/CerrnoC.c:10
10 ../src/C/Common/CerrnoC.c: No such file or
directory.
in ../src/C/Common/CerrnoC.c
Current language: auto; currently c
(m3gdb) step
11 in ../src/C/Common/CerrnoC.c
(m3gdb) step
SignalHandler (sig=64, sip=16_bfce042c,
uap=16_bfce04ac) at ThreadPThread.m3:1163
1163 ThreadPThread.m3: No such file or directory.
in ThreadPThread.m3
Current language: auto; currently Modula-3
(m3gdb) step
GetActivation () at ThreadPThread.m3:368
368 in ThreadPThread.m3
(m3gdb) step
369 in ThreadPThread.m3
(m3gdb) step
SignalHandler (sig=64, sip=16_bfce042c,
uap=16_bfce04ac) at ThreadPThread.m3:1166
1166 in ThreadPThread.m3
(m3gdb) step
1167 in ThreadPThread.m3
(m3gdb) step
1168 in ThreadPThread.m3
(m3gdb) step
1169 in ThreadPThread.m3
(m3gdb) step
1172 in ThreadPThread.m3
(m3gdb) step
1174 in ThreadPThread.m3
(m3gdb) step
1175 in ThreadPThread.m3
(m3gdb) step
1178 in ThreadPThread.m3
(m3gdb) step
4 4 4 4 4 4
Program received signal SIGABRT, Aborted.
[Switching to Thread -1237066832 (LWP 8497)]
0xffffe410 in __kernel_vsyscall ()
(m3gdb) step
Single stepping until exit from function
__kernel_vsyscall,
Thanks
--- "Daniel Alejandro Benavides D."
<dabenavidesd at yahoo.es> wrote:
> Hi:
>
> I debugged for a while the program with
> handle all nostop
> handle EXC_SOFTWARE stop
> handle EXC_BREAKPOINT stop
>
> getting this:
>
> Breakpoint 4, SignalHandler (sig=64,
> sip=16_b640ff9c,
> uap=16_b641001c) at ThreadPThread.m3:1180
> 1180 in ThreadPThread.m3
> (m3gdb) step
> [Switching to Thread -1254036560 (LWP 8072)]
>
> Breakpoint 3, SignalHandler (sig=64,
> sip=16_b540df8c,
> uap=16_b540e00c) at ThreadPThread.m3:1184
> 1184 in ThreadPThread.m3
> (m3gdb) step
> [Switching to Thread -1237251152 (LWP 8067)]
>
> Breakpoint 3, SignalHandler (sig=64,
> sip=16_b640ff9c,
> uap=16_b641001c) at ThreadPThread.m3:1184
> 1184 in ThreadPThread.m3
> (m3gdb) where
> #0 SignalHandler (sig=64, sip=16_b640ff9c,
> uap=16_b641001c) at ThreadPThread.m3:1184
> #1 <signal handler called>
> #2 0xffffe410 in __kernel_vsyscall ()
> #3 0xb7505b8c in sched_yield () from
> /lib/tls/i686/cmov/libc.so.6
> #4 0xb7625fce in Yield () at ThreadPThread.m3:712
> #5 0x0804b844 in PrintId (cl=16_b741b0a0) at
> NThreads.m3:25
> #6 0xb7624b21 in RunThread (me=16_08054560) at
> ThreadPThread.m3:540
> #7 0xb76247e6 in ThreadBase (param=16_08054560) at
> ThreadPThread.m3:521
> #8 0xb75ad341 in start_thread () from
> /lib/tls/i686/cmov/libpthread.so.0
> #9 0xb751f4ee in clone () from
> /lib/tls/i686/cmov/libc.so.6
> (m3gdb) step
>
>
> ***
> *** runtime error:
> *** <*ASSERT*> failed.
> *** file
> "../src/thread/PTHREAD/ThreadPThread.m3",
> line 1184
> ***
>
> [Switching to Thread -1228858448 (LWP 8066)]
>
> Breakpoint 4, SignalHandler (sig=64,
> sip=16_b6c10f9c,
> uap=16_b6c1101c) at ThreadPThread.m3:1180
> 1180 in ThreadPThread.m3
> (m3gdb) step
>
> Breakpoint 3, SignalHandler (sig=64,
> sip=16_b6c10f9c,
> uap=16_b6c1101c) at ThreadPThread.m3:1184
> 1184 in ThreadPThread.m3
> (m3gdb) step
>
>
> ***
> *** runtime error:
> *** <*ASSERT*> failed.
> *** file
> "../src/thread/PTHREAD/ThreadPThread.m3",
> line 1184
> ***
>
>
> Program received signal SIG64, Real-time event 64.
> [Switching to Thread -1220465744 (LWP 8065)]
>
> Breakpoint 4, SignalHandler (sig=64,
> sip=16_b7411f9c,
> uap=16_b741201c) at ThreadPThread.m3:1180
> 1180 in ThreadPThread.m3
> (m3gdb) step
> 4 4
> Program received signal SIGABRT, Aborted.
> 4Couldn't get registers: No such process.
> (m3gdb)
>
-----------------------------------------------------
> And then without modifying the signal set:
>
> (m3gdb) break NThreads.m3:10
> Breakpoint 1 at 0x804b934: file NThreads.m3, line
> 10.
> (m3gdb) break ThreadPThread.m3:1180
> No source file named ThreadPThread.m3.
> Make breakpoint pending on future shared library
> load?
> (y or [n]) y
> Breakpoint 2 (ThreadPThread.m3:1180) pending.
> (m3gdb) run
> Starting program:
> /home/danielb/code/m3/parallel/LINUXLIBC6/NThreads
> [Thread debugging using libthread_db enabled]
> [New Thread -1220532544 (LWP 8125)]
> Breakpoint 3 at 0xb75d4dba: file ThreadPThread.m3,
> line 1180.
> Pending breakpoint "ThreadPThread.m3:1180" resolved
> [Switching to Thread -1220532544 (LWP 8125)]
>
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c7010) at NThreads.m3:14
> warning: Source file is more recent than executable.
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
> [New Thread -1220805712 (LWP 8131)]
>
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c7058) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
> [New Thread -1229198416 (LWP 8132)]
> 1
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c70a0) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
> 1[New Thread -1237591120 (LWP 8133)]
> 2 1
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c70e8) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
> 2 1[New Thread -1245983824 (LWP 8134)]
> 3 2 1
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c7130) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
> 3 2 1[New Thread -1254376528 (LWP 8135)]
> 3 2 1
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c7178) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
>
> Program received signal SIG64, Real-time event 64.
> NThreads_M3_te29971a7_INIT (L_2=0xb73c7178) at
> NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
>
> Breakpoint 1, NThreads_M3_te29971a7_INIT
> (L_2=0xb73c7178) at NThreads.m3:14
> 14 Closure = Thread.Closure OBJECT
> (m3gdb) cont
> Continuing.
>
> Program received signal SIG64, Real-time event 64.
> [Switching to Thread -1254376528 (LWP 8135)]
> 0xffffe410 in __kernel_vsyscall ()
> (m3gdb) cont
> Continuing.
>
> Program received signal SIG64, Real-time event 64.
> [Switching to Thread -1237591120 (LWP 8133)]
> 0xffffe410 in __kernel_vsyscall ()
> (m3gdb) cont
> Continuing.
>
> Program received signal SIG64, Real-time event 64.
> [Switching to Thread -1229198416 (LWP 8132)]
> 0xffffe410 in __kernel_vsyscall ()
> (m3gdb) cont
> Continuing.
>
> Program received signal SIG64, Real-time event 64.
> [Switching to Thread -1220805712 (LWP 8131)]
> 0xffffe410 in __kernel_vsyscall ()
> (m3gdb) cont
> Continuing.
> [Switching to Thread -1254376528 (LWP 8135)]
>
> Breakpoint 3, SignalHandler (sig=64,
> sip=16_b53baf8c,
> uap=16_b53bb00c) at ThreadPThread.m3:1180
> 1180 ThreadPThread.m3: No such file or directory.
> in ThreadPThread.m3
> (m3gdb) where
> #0 SignalHandler (sig=64, sip=16_b53baf8c,
>
=== message truncated ===
____________________________________________________________________________________
Sé un Mejor Amante del Cine
¿Quieres saber cómo? ¡Deja que otras personas te ayuden!
http://advision.webevents.yahoo.com/reto/entretenimiento.html
More information about the M3devel
mailing list