<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><span class="Apple-style-span" style="font-size: medium;"><font class="Apple-style-span" color="#0000FF" face="'Gill Sans'">This looks weird. How do you get from XWait to pthread_cond_signal? Unless perhaps that simply represents the fact that the signal has been fielded. In any case, I'd need to see backtraces from all the threads. This one looks to have successfully fielded a request to stop for GC.</font></span></div></span></span></span></span></span></span></span></span></div></span></div></span> </div><br><div><div>On 31 Oct 2009, at 12:15, Mika Nystrom wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>More details about the "catatonic" case. It's pretty bad. Even ctrl-\<br>won't wake it up properly. Ctrl-\ is supposed to cause the program to<br>abort and dump core. It does nothing to my program now! And I think<br>I've "lost threads" before, too.<br><br>Btw,<br><br>(90)ginger:~/t>uname -a<br>FreeBSD ginger 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 07:18:07 UTC 2009 <a href="mailto:root@driscoll.cse.buffalo.edu">root@driscoll.cse.buffalo.edu</a>:/usr/obj/usr/src/sys/GENERIC amd64<br><br>I'm happy to help debug if someone can give me some pointers...<br><br><br> Mika<br><br>^\<br>Program received signal SIGQUIT, Quit.<br>0x0000000804ca037c in sigsuspend () from /lib/libc.so.7<br>(m3gdb) cont<br>Continuing.<br><br><br>***<br>*** runtime error:<br>*** aborted<br><br><br><br><br>^\<br>Program received signal SIGQUIT, Quit.<br>0x0000000804ca037c in sigsuspend () from /lib/libc.so.7<br>(m3gdb) where<br>#0 0x0000000804ca037c in sigsuspend () from /lib/libc.so.7<br>#1 0x0000000804b41d0a in sigsuspend () from /lib/libthr.so.3<br>#2 0x0000000803780da0 in ThreadPThread__sigsuspend ()<br> at ../src/thread/PTHREAD/ThreadPThreadC.c:117<br>#3 0x000000080377ff6f in SignalHandler (sig=Invalid C/C++ type code 28 in symbol table.<br>) at ../src/thread/PTHREAD/ThreadPThread.m3:1261<br>#4 <signal handler called><br>#5 0x0000000804b4829c in __error () from /lib/libthr.so.3<br>#6 0x0000000804b46365 in pthread_cond_signal () from /lib/libthr.so.3<br>#7 0x000000080377a85d in XWait (self=Invalid C/C++ type code 26 in symbol table.<br>) at ../src/thread/PTHREAD/ThreadPThread.m3:227<br>#8 0x000000080377b026 in Wait (m=Invalid C/C++ type code 26 in symbol table.<br>) at ../src/thread/PTHREAD/ThreadPThread.m3:278<br>#9 0x000000080294a39c in WaitE (on=Invalid C/C++ type code 30 in symbol table.<br>) at ../src/SX.m3:217<br>#10 0x000000080294999a in Wait (on=Invalid C/C++ type code 30 in symbol table.<br>) at ../src/SX.m3:152<br>#11 0x00000008011ae748 in WaitLocked (t=Invalid C/C++ type code 26 in symbol table.<br>) at ../src/MktAsset.m3:117<br>#12 0x00000008011b4950 in RecApply (cl=Invalid C/C++ type code 26 in symbol table.<br>) at ../src/MktPlace.m3:469<br>#13 0x000000080377cdf3 in RunThread (me=Invalid C/C++ type code 29 in symbol table.<br>) at ../src/thread/PTHREAD/ThreadPThread.m3:547<br>#14 0x000000080377ca6a in ThreadBase (param=Invalid C/C++ type code 35 in symbol table.<br>) at ../src/thread/PTHREAD/ThreadPThread.m3:523<br>#15 0x0000000804b3e4d1 in pthread_getprio () from /lib/libthr.so.3<br>#16 0x0000000000000000 in ?? ()<br>(m3gdb) <br><br><br>Mika Nystrom writes:<br><blockquote type="cite">Hello m3devel,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm running into problems with the current release candidate.<br></blockquote><blockquote type="cite">I'm attaching a backtrace from one crash, but I think I also am seeing<br></blockquote><blockquote type="cite">deadlocks in the threading system---my application goes catatonic.<br></blockquote><blockquote type="cite">Of course it *is* possible it's a bug in my application, but it works<br></blockquote><blockquote type="cite">on PM3 and on CM3 on PPC_DARWIN.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Finally I'm still concerned about threading performance but in the light<br></blockquote><blockquote type="cite">of the bugs it's hard to say much about it yet, I think...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(The program in question is a highly multithreaded stock market<br></blockquote><blockquote type="cite">simulator.)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Mika<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">============================================================<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">***<br></blockquote><blockquote type="cite">*** runtime error:<br></blockquote><blockquote type="cite">*** <*ASSERT*> failed.<br></blockquote><blockquote type="cite">*** file "../src/thread/PTHREAD/ThreadPThread.m3", line 589<br></blockquote><blockquote type="cite">***<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Program received signal SIGABRT, Aborted.<br></blockquote><blockquote type="cite">0x0000000804c9fa9c in thr_kill () from /lib/libc.so.7<br></blockquote><blockquote type="cite">(m3gdb) show args<br></blockquote><blockquote type="cite">Argument list to give program being debugged when it is started is "@M3debugtrace=mktsim.out -tz America/New_York -bugbehavior None -symbology ric -symbology tws<br></blockquote><blockquote type="cite">-replay mktisolator090910.ticks 2009-09-10@13:30 -to 2009-09-10@15:59 -port 7001 -dp 0.05 7003 -dp 0.10 7005 -dp 0.15 7007 -dp 0.20 7009 -dp 0.25 7011 -dp 0.30 <br></blockquote><blockquote type="cite">7013 -sync 60 -unsolicitedfills 0.5 -cp 0.5 -xtimeport 7200 isolate90.src".<br></blockquote><blockquote type="cite">(m3gdb) where<br></blockquote><blockquote type="cite">#0 0x0000000804c9fa9c in thr_kill () from /lib/libc.so.7<br></blockquote><blockquote type="cite">#1 0x0000000804d2ef8b in abort () from /lib/libc.so.7<br></blockquote><blockquote type="cite">#2 0x0000000803777bf7 in Crash () at ../src/runtime/POSIX/RTOS.m3:20<br></blockquote><blockquote type="cite">#3 0x000000080376b615 in Crash (msg=Invalid C/C++ type code 26 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTProcess.m3:65<br></blockquote><blockquote type="cite">#4 0x0000000803768ab2 in EndError (crash=Invalid C/C++ type code 36 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTError.m3:118<br></blockquote><blockquote type="cite">#5 0x00000008037687aa in MsgS (file=Invalid C/C++ type code 35 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTError.m3:40<br></blockquote><blockquote type="cite">#6 0x0000000803768f85 in Crash (a=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTException.m3:79<br></blockquote><blockquote type="cite">#7 0x0000000803768c3c in DefaultBackstop (a=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTException.m3:39<br></blockquote><blockquote type="cite">#8 0x0000000803768b6e in InvokeBackstop (a=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTException.m3:25<br></blockquote><blockquote type="cite">#9 0x0000000803778eab in Raise (act=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/ex_frame/RTExFrame.m3:29<br></blockquote><blockquote type="cite">#10 0x0000000803768cee in DefaultBackstop (a=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTException.m3:47<br></blockquote><blockquote type="cite">#11 0x0000000803768b6e in InvokeBackstop (a=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTException.m3:25<br></blockquote><blockquote type="cite">#12 0x0000000803778eab in Raise (act=Invalid C/C++ type code 30 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/ex_frame/RTExFrame.m3:29<br></blockquote><blockquote type="cite">#13 0x0000000803750241 in ReportFault (module=Invalid C/C++ type code 35 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTHooks.m3:110<br></blockquote><blockquote type="cite">#14 0x0000000803780acf in _m3_fault (arg=Invalid C/C++ type code 39 in symbol table.<br></blockquote><blockquote type="cite">)<br></blockquote><blockquote type="cite"> from /usr/local/cm3/pkg/m3core/AMD64_FREEBSD/libm3core.so.5<br></blockquote><blockquote type="cite">#15 0x000000080377d1bc in Fork (closure=Invalid C/C++ type code 26 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/thread/PTHREAD/ThreadPThread.m3:589<br></blockquote><blockquote type="cite">#16 0x00000008011b1651 in AddAsset (t=Invalid C/C++ type code 26 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/MktPlace.m3:116<br></blockquote><blockquote type="cite">#17 0x00000000004085c6 in Init (t=Invalid C/C++ type code 26 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/MktIsolator.m3:514<br></blockquote><blockquote type="cite">#18 0x00000000004106af in Main (mode=Invalid C/C++ type code 39 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/Main.m3:734<br></blockquote><blockquote type="cite">#19 0x0000000803767c19 in RunMainBody (m=Invalid C/C++ type code 29 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTLinker.m3:400<br></blockquote><blockquote type="cite">#20 0x0000000803766e00 in AddUnitI (m=Invalid C/C++ type code 29 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTLinker.m3:114<br></blockquote><blockquote type="cite">#21 0x0000000803766e9e in AddUnit (b=Invalid C/C++ type code 31 in symbol table.<br></blockquote><blockquote type="cite">) at ../src/runtime/common/RTLinker.m3:123<br></blockquote><blockquote type="cite">---Type <return> to continue, or q <return> to quit---<br></blockquote><blockquote type="cite">#22 0x0000000000404194 in main (argc=44, argv=0x7fffffffdde8, envp=0x7fffffffdf50) at _m3main.mc:4<br></blockquote><blockquote type="cite">#23 0x00000000004040de in _start ()<br></blockquote><blockquote type="cite">(m3gdb) up 15<br></blockquote><blockquote type="cite">#15 0x000000080377d1bc in Fork (closure=16_00000008064c8930)<br></blockquote><blockquote type="cite"> at ../src/thread/PTHREAD/ThreadPThread.m3:589<br></blockquote><blockquote type="cite">589 WITH r = pthread_mutex_lock_active() DO <*ASSERT r=0*> END;<br></blockquote><blockquote type="cite">Current language: auto; currently Modula-3<br></blockquote><blockquote type="cite">(m3gdb) print r<br></blockquote><blockquote type="cite">$1 = 11<br></blockquote><blockquote type="cite">(m3gdb) <br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">============================================================<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote></div></blockquote></div><br></body></html>