<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 says we are getting completely bogus stack information from pthread_stackseg_np so the threads are not getting scanned properly by the collector. Let me look at your stack dump from earlier to decode.</font></span></div></span></span></span></span></span></span></span></span></div></span></div></span> </div><br><div><div>On 20 Nov 2009, at 15:22, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; 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: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">I tried:<br> <br>void<br>ThreadPThread__ProcessStopped (m3_pthread_t mt, char *start, char *end,<br> void (*p)(void *start, void *end))<br>{<br> stack_t sinfo;<br> char* ss_sp;<br> if (pthread_stackseg_np(PTHREAD_FROM_M3(mt), &sinfo) != 0) abort();<br> ss_sp = (char*)sinfo.ss_sp;<br> assert(start == 0);<br> assert((ss_sp - sinfo.ss_size) < end); /* man page says ss_sp is "top" */<br> assert(end < ss_sp);<br> /* we don't have a reliable sp, so... */<br> p((ss_sp - sinfo.ss_size), end);<br>}<br><br> <br>the C assertions don't trigger, but always:<br> <br> <br><br>Starting program: /home/jay/cm3/bin/Juno<br><br>***<br>*** runtime error:<br>*** <*ASSERT*> failed.<br>*** file "../src/runtime/common/RTCollector.m3", line 589<br>***<br><br>Program received signal SIGABRT, Aborted.<br>[Switching to process 6216, thread 0x7d6f5800]<br>0x0a58df81 in kill () from /usr/lib/libc.so.50.1<br>(gdb) bt<br>#0 0x0a58df81 in kill () from /usr/lib/libc.so.50.1<br>#1 0x0a5da907 in abort () at /usr/src/lib/libc/stdlib/abort.c:68<br>#2 0x01095cb2 in RTOS__Crash () at ../src/runtime/POSIX/RTOS.m3:20<br>#3 0x0108b77f in RTProcess__Crash (M3_Bd56fi_msg=0x0)<br> at ../src/runtime/common/RTProcess.m3:65<br>#4 0x010892da in RTError__EndError (M3_AicXUJ_crash=1 '\001')<br> at ../src/runtime/common/RTError.m3:118<br>#5 0x01088f9e in RTError__MsgS (M3_AJWxb1_file=0x210568c5,<br> M3_AcxOUs_line=589, M3_Bd56fi_msgA=0x21058368, M3_Bd56fi_msgB=0x210526d0,<br> M3_Bd56fi_msgC=0x21058368) at ../src/runtime/common/RTError.m3:40<br>#6 0x01089742 in RTException__Crash (M3_Cblw37_a=0xcfbd9658,<br> M3_AicXUJ_raises=0 '\0', M3_AJWxb1_rte=0x21052580)<br> at ../src/runtime/common/RTException.m3:79<br>#7 0x01089469 in RTException__DefaultBackstop (M3_Cblw37_a=0xcfbd9658,<br> M3_AicXUJ_raises=0 '\0') at ../src/runtime/common/RTException.m3:39<br>#8 0x010893a5 in RTException__InvokeBackstop (M3_Cblw37_a=0xcfbd9658,<br> M3_AicXUJ_raises=0 '\0') at ../src/runtime/common/RTException.m3:25<br>#9 0x010966bc in RTException__Raise (M3_Cblw37_act=0xcfbd9658)<br> at ../src/runtime/ex_frame/RTExFrame.m3:29<br>#10 0x01089502 in RTException__DefaultBackstop (M3_Cblw37_a=0xcfbd9658,<br> M3_AicXUJ_raises=0 '\0') at ../src/runtime/common/RTException.m3:47<br>#11 0x010893a5 in RTException__InvokeBackstop (M3_Cblw37_a=0xcfbd9658,<br> M3_AicXUJ_raises=0 '\0') at ../src/runtime/common/RTException.m3:25<br>#12 0x010966bc in RTException__Raise (M3_Cblw37_act=0xcfbd9658)<br>---Type <return> to continue, or q <return> to quit---<br> at ../src/runtime/ex_frame/RTExFrame.m3:29<br>#13 0x010742f6 in RTHooks__ReportFault (M3_AJWxb1_module=0x21056a40,<br> M3_AcxOUs_info=18848) at ../src/runtime/common/RTHooks.m3:110<br>#14 0x01086bb9 in _m3_fault (M3_AcxOUs_arg=18848) from /cm3/lib/libm3core.so.5<br>#15 0x0107dc9b in RTCollector__GrayBetween (M3_Edk2y1_h=0x7c7e5978,<br> M3_Edk2y1_he=0x7c7e6000, M3_AZrJv4_r=6 '\006')<br> at ../src/runtime/common/RTCollector.m3:589<br>#16 0x0107dbfc in RTCollector__PromotePage (M3_Cq39JE_page=0x7c7e4000,<br> M3_AZrJv4_r=6 '\006') at ../src/runtime/common/RTCollector.m3:578<br>#17 0x0107d7bb in RTCollector__NoteStackLocations (<br> M3_AJWxb1_start=0x89922000, M3_AJWxb1_stop=0x89935fac)<br> at ../src/runtime/common/RTCollector.m3:528<br>#18 0x0109cfc0 in ThreadPThread__ProcessStopped (mt=0x7d6f5000, start=0x0,<br> end=0x89935fb0 "", p=0x107d72c <RTCollector__NoteStackLocations>)<br> at ../src/thread/PTHREAD/ThreadPThreadC.c:185<br>#19 0x0109b8a3 in ThreadPThread__ProcessOther (M3_DKqeuR_act=0x7d9cc380,<br> M3_Ad3xEV_p=0x107d72c) at ../src/thread/PTHREAD/ThreadPThread.m3:1018<br>#20 0x0109b196 in ThreadInternal__ProcessStacks (M3_Ad3xEV_p=0x107d72c)<br> at ../src/thread/PTHREAD/ThreadPThread.m3:861<br>#21 0x0107e9a4 in RTCollector__CollectSomeInStateZero ()<br> at ../src/runtime/common/RTCollector.m3:819<br>#22 0x0107e412 in RTCollector__CollectSome ()<br> at ../src/runtime/common/RTCollector.m3:719<br>#23 0x0107dec5 in RTHeapRep__CollectEnough ()<br>---Type <return> to continue, or q <return> to quit---<br> at ../src/runtime/common/RTCollector.m3:653<br>#24 0x01075fc1 in RTAllocator__AllocTraced (M3_Cwb5VA_dataSize=12,<br> M3_Cwb5VA_dataAlignment=4, M3_AmBNir_thread=0x7d9cc544)<br> at ../src/runtime/common/RTAllocator.m3:365<br>#25 0x01074f70 in RTAllocator__GetTracedRef (M3_Eic7CK_def=0x23453ca0)<br> at ../src/runtime/common/RTAllocator.m3:202<br>#26 0x01074b8a in RTHooks__AllocateTracedRef (M3_AJWxb1_defn=0x23453ca0)<br> at ../src/runtime/common/RTAllocator.m3:113<br>#27 0x034c8196 in IntIntTbl__Put (M3_DTcOE5_tbl=0x7c7ea3f8,<br> M3_EN2A1V_key=0xcfbd9a3c, M3_EN2A1V_val=0xcfbd9a88)<br> at ../I386_OPENBSD/IntIntTbl.m3 => ../src/table/Table.mg:127<br>#28 0x08761656 in KeyFilter__Set (M3_Bkn9rd_a=45 '-', M3_Bkn9rd_b=111 'o',<br> M3_AcxOUs_c=245, M3_AicXUJ_bothCases=0 '\0', M3_AicXUJ_reversed=1 '\001')<br> at ../src/etext/KeyFilter.m3:288<br>#29 0x08761a0a in KeyFilter__Set (M3_Bkn9rd_a=111 'o', M3_Bkn9rd_b=45 '-',<br> M3_AcxOUs_c=245, M3_AicXUJ_bothCases=0 '\0', M3_AicXUJ_reversed=0 '\0')<br> at ../src/etext/KeyFilter.m3:304<br>#30 0x087620a2 in KeyFilter_M3 (M3_AcxOUs_mode=1)<br> at ../src/etext/KeyFilter.m3:437<br>#31 0x01088444 in RTLinker__RunMainBody (M3_DjPxE3_m=0x287046a0)<br> at ../src/runtime/common/RTLinker.m3:399<br>#32 0x010882e6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x287070c0)<br> at ../src/runtime/common/RTLinker.m3:379<br>#33 0x010882e6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x287094e0)<br>---Type <return> to continue, or q <return> to quit---<br> at ../src/runtime/common/RTLinker.m3:379<br>#34 0x010882e6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x28706b40)<br> at ../src/runtime/common/RTLinker.m3:379<br>#35 0x010882e6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x287060e0)<br> at ../src/runtime/common/RTLinker.m3:379<br>#36 0x010882e6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x3c010780)<br> at ../src/runtime/common/RTLinker.m3:379<br>#37 0x010877fe in RTLinker__AddUnitI (M3_DjPxE3_m=0x3c010780)<br> at ../src/runtime/common/RTLinker.m3:113<br>#38 0x0108788c in RTLinker__AddUnit (M3_DjPxE5_b=0x1c05c83a)<br> at ../src/runtime/common/RTLinker.m3:122<br>#39 0x1c008706 in main (argc=1, argv=0xcfbd9ebc, envp=0xcfbd9ec4)<br> at _m3main.mc:4<br>(gdb)<br><br><br><br>Presumably should look at the Java and Boehm stuff..later..<br> <br><br> - Jay<br> <br><hr id="stopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>Date: Fri, 20 Nov 2009 19:16:53 +0000<br>CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] OpenBSD/x86 pthreads<br><br>$ /cm3/bin/Juno<br>assertion "sinfo.ss_sp <= end" failed: file "../src/thread/PTHREAD/ThreadPThread<br>C.c", line 180, function "ThreadPThread__ProcessStopped"<br>Abort trap (core dumped)<br>$ gdb /cm3/bin/Juno<br>GNU gdb 6.3<br>...<br>(gdb) r<br>Starting program: /home/jay/cm3/bin/Juno<br>assertion "sinfo.ss_sp <= end" failed: file "../src/thread/PTHREAD/ThreadPThread<br>C.c", line 180, function "ThreadPThread__ProcessStopped"<br>Program received signal SIGABRT, Aborted.<br>[Switching to process 32202, thread 0x8ad0c000]<br>0x03931f81 in kill () from /usr/lib/libc.so.50.1<br>(gdb) up<br>#1 0x0397e907 in abort () at /usr/src/lib/libc/stdlib/abort.c:68<br>...<br>(gdb) up<br>#2 0x0390d85b in __assert2 (<br>...<br>(gdb) up<br>#3 0x04bfff34 in ThreadPThread__ProcessStopped (mt=0x8ad0c800, start=0x0,<br> end=0x864fefb0, p=0x4be06ec <RTCollector__NoteStackLocations>)<br> at ../src/thread/PTHREAD/ThreadPThreadC.c:180<br>180 assert(sinfo.ss_sp <= end); /* man page says ss_sp is "top" */<br><br>(gdb) info locals<br>sinfo = {ss_sp = 0x864ff000, ss_size = 81920, ss_flags = 0}<br><br>(gdb) thread apply all bt<br> <br>Appears to be this thread.<br> <br>Thread 4 (process 32202, thread 0x8ad0c800):<br>#0 _thread_kern_sched (scp=0x0)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:482<br>#1 0x05e01200 in _thread_kern_sched_state_unlock (state=PS_SIGTHREAD,<br> lock=0x8ad0c8b0, fname=0x1 <Address 0x1 out of bounds>, lineno=1)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:581<br>#2 0x05dfebc9 in pthread_cond_wait (cond=0x882737b0, mutex=0x88273870)<br> at /usr/src/lib/libpthread/uthread/uthread_cond.c:261<br>#3 0x04c003b4 in ThreadPThread__pthread_cond_wait (cond=0x882737b0,<br> mutex=0x88273870) at ../src/thread/PTHREAD/ThreadPThreadC.c:506<br>#4 0x04bfad66 in ThreadPThread__XWait (M3_DKqeuR_self=0x7f820500,<br> M3_AYIbX3_m=0x83281998, M3_Bl0jv4_c=0x832819a4,<br> M3_AicXUJ_alertable=0 '\0') at ../src/thread/PTHREAD/ThreadPThread.m3:209<br>#5 0x04bfae91 in Thread__Wait (M3_AYIbX3_m=0x83281998,<br> M3_Bl0jv4_c=0x832819a4) at ../src/thread/PTHREAD/ThreadPThread.m3:231<br>#6 0x0a7ad5bf in VBTRep__MeterMaid (M3_EMTrVz_self=0x832819cc)<br> at ../src/vbt/VBTRep.m3:439<br>#7 0x04bfc850 in ThreadPThread__RunThread (M3_DKqeuR_me=0x7f820500)<br> at ../src/thread/PTHREAD/ThreadPThread.m3:502<br>#8 0x04bfc55b in ThreadPThread__ThreadBase (M3_AJWxb1_param=0x7f820500)<br> at ../src/thread/PTHREAD/ThreadPThread.m3:476<br>#9 0x05df837f in _thread_start ()<br> at /usr/src/lib/libpthread/uthread/uthread_create.c:240<br>---Type <return> to continue, or q <return> to quit---<br>#10 0x0000002b in ?? ()<br>#11 0x00000000 in ?? ()<br> <br>Thread 3 (process 32202, thread 0x8aae0c00):<br>#0 _thread_kern_sched (scp=0x0)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:482<br>#1 0x05e01200 in _thread_kern_sched_state_unlock (state=PS_SIGTHREAD,<br> lock=0x8aae0cb0, fname=0x1 <Address 0x1 out of bounds>, lineno=1)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:581<br>#2 0x05dfee2d in pthread_cond_timedwait (cond=0x25df30e0, mutex=0x25df30dc,<br> abstime=0x7effafa8) at /usr/src/lib/libpthread/uthread/uthread_cond.c:431<br>#3 0x05df85a7 in _thread_gc (arg=0x0)<br> at /usr/src/lib/libpthread/uthread/uthread_gc.c:181<br>#4 0x05df837f in _thread_start ()<br> at /usr/src/lib/libpthread/uthread/uthread_create.c:240<br>#5 0x0000002b in ?? ()<br>#6 0x00000000 in ?? ()<br> <br>Thread 2 (process 32202, thread 0x8aae0800):<br>#0 _thread_start () at /usr/src/lib/libpthread/uthread/uthread_create.c:233<br>#1 0x0000002b in ?? ()<br>#2 0x00000000 in ?? ()<br> <br>Thread 1 (process 32202, thread 0x8ad0c000):<br>---Type <return> to continue, or q <return> to quit---<br>#0 0x03931f81 in kill () from /usr/lib/libc.so.50.1<br>#1 0x0397e907 in abort () at /usr/src/lib/libc/stdlib/abort.c:68<br>#2 0x0390d85b in __assert2 (<br> file=0x24bb2700 "../src/thread/PTHREAD/ThreadPThreadC.c", line=180,<br> func=0x24bb27cf "ThreadPThread__ProcessStopped",<br> failedexpr=0x24bb27f8 "sinfo.ss_sp <= end")<br> at /usr/src/lib/libc/gen/assert.c:52<br>#3 0x04bfff34 in ThreadPThread__ProcessStopped (mt=0x8ad0c800, start=0x0,<br> end=0x864fefb0, p=0x4be06ec <RTCollector__NoteStackLocations>)<br> at ../src/thread/PTHREAD/ThreadPThreadC.c:180<br>#4 0x04bfe85e in ThreadPThread__ProcessOther (M3_DKqeuR_act=0x7f820500,<br> M3_Ad3xEV_p=0x4be06ec) at ../src/thread/PTHREAD/ThreadPThread.m3:1017<br>#5 0x04bfe151 in ThreadInternal__ProcessStacks (M3_Ad3xEV_p=0x4be06ec)<br> at ../src/thread/PTHREAD/ThreadPThread.m3:860<br>#6 0x04be1964 in RTCollector__CollectSomeInStateZero ()<br> at ../src/runtime/common/RTCollector.m3:819<br>#7 0x04be13d2 in RTCollector__CollectSome ()<br> at ../src/runtime/common/RTCollector.m3:719<br>#8 0x04be0e85 in RTHeapRep__CollectEnough ()<br> at ../src/runtime/common/RTCollector.m3:653<br>#9 0x04bd8f81 in RTAllocator__AllocTraced (M3_Cwb5VA_dataSize=12,<br> M3_Cwb5VA_dataAlignment=4, M3_AmBNir_thread=0x7f820344)<br> at ../src/runtime/common/RTAllocator.m3:365<br>#10 0x04bd7f30 in RTAllocator__GetTracedRef (M3_Eic7CK_def=0x283aaca0)<br>---Type <return> to continue, or q <return> to quit---<br> at ../src/runtime/common/RTAllocator.m3:202<br>#11 0x04bd7b4a in RTHooks__AllocateTracedRef (M3_AJWxb1_defn=0x283aaca0)<br> at ../src/runtime/common/RTAllocator.m3:113<br>#12 0x0841f196 in IntIntTbl__Put (M3_DTcOE5_tbl=0x832863f8,<br> M3_EN2A1V_key=0xcfbfc1ec, M3_EN2A1V_val=0xcfbfc238)<br> at ../I386_OPENBSD/IntIntTbl.m3 => ../src/table/Table.mg:127<br>#13 0x0ad56656 in KeyFilter__Set (M3_Bkn9rd_a=45 '-', M3_Bkn9rd_b=111 'o',<br> M3_AcxOUs_c=245, M3_AicXUJ_bothCases=0 '\0', M3_AicXUJ_reversed=1 '\001')<br> at ../src/etext/KeyFilter.m3:288<br>#14 0x0ad56a0a in KeyFilter__Set (M3_Bkn9rd_a=111 'o', M3_Bkn9rd_b=45 '-',<br> M3_AcxOUs_c=245, M3_AicXUJ_bothCases=0 '\0', M3_AicXUJ_reversed=0 '\0')<br> at ../src/etext/KeyFilter.m3:304<br>#15 0x0ad570a2 in KeyFilter_M3 (M3_AcxOUs_mode=1)<br> at ../src/etext/KeyFilter.m3:437<br>#16 0x04beb404 in RTLinker__RunMainBody (M3_DjPxE3_m=0x2acf96a0)<br> at ../src/runtime/common/RTLinker.m3:399<br>#17 0x04beb2a6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x2acfc0c0)<br> at ../src/runtime/common/RTLinker.m3:379<br>#18 0x04beb2a6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x2acfe4e0)<br> at ../src/runtime/common/RTLinker.m3:379<br>#19 0x04beb2a6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x2acfbb40)<br> at ../src/runtime/common/RTLinker.m3:379<br>#20 0x04beb2a6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x2acfb0e0)<br> at ../src/runtime/common/RTLinker.m3:379<br>---Type <return> to continue, or q <return> to quit---<br>#21 0x04beb2a6 in RTLinker__RunMainBody (M3_DjPxE3_m=0x3c010780)<br> at ../src/runtime/common/RTLinker.m3:379<br>#22 0x04bea7be in RTLinker__AddUnitI (M3_DjPxE3_m=0x3c010780)<br> at ../src/runtime/common/RTLinker.m3:113<br>#23 0x04bea84c in RTLinker__AddUnit (M3_DjPxE5_b=0x1c05c83a)<br> at ../src/runtime/common/RTLinker.m3:122<br>#24 0x1c008706 in main (argc=1, argv=0xcfbfc66c, envp=0xcfbfc674)<br> at _m3main.mc:4<br>(gdb)<br><br> <br>(gdb) up<br>#4 0x04bfe85e in ThreadPThread__ProcessOther (M3_DKqeuR_act=0x7f820500,<br> M3_Ad3xEV_p=0x4be06ec) at ../src/thread/PTHREAD/ThreadPThread.m3:1017<br>1017 THEN ProcessStopped(act.handle, act.sp, act.stackbase, p);<br>(gdb) p M3_DKqeuR_act<br>$1 = (void *) 0x7f820500<br>(gdb) x 0x7f820500<br>0x7f820500: 0x88273870<br>(gdb) x<br>0x7f820504: 0x882737b0<br>(gdb)<br>0x7f820508: 0x00000000<br>(gdb)<br>0x7f82050c: 0x882738a0<br>(gdb)<br>0x7f820510: 0x00000000<br>(gdb)<br>0x7f820514: 0x7f820300<br>(gdb)<br>0x7f820518: 0x7f820300<br>(gdb)<br>0x7f82051c: 0x8ad0c800<br> <br> <br>(gdb) thread 4<br>[Switching to thread 4 (process 32202, thread 0x8ad0c800)]#0 _thread_kern_sched<br> (scp=0x0) at /usr/src/lib/libpthread/uthread/uthread_kern.c:482<br>482 /usr/src/lib/libpthread/uthread/uthread_kern.c: No such file or director<br>y.<br> in /usr/src/lib/libpthread/uthread/uthread_kern.c<br>(gdb) up<br>#1 0x05e01200 in _thread_kern_sched_state_unlock (state=PS_SIGTHREAD,<br> lock=0x8ad0c8b0, fname=0x1 <Address 0x1 out of bounds>, lineno=1)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:581<br>581 in /usr/src/lib/libpthread/uthread/uthread_kern.c<br>(gdb) up<br>#2 0x05dfebc9 in pthread_cond_wait (cond=0x882737b0, mutex=0x88273870)<br> at /usr/src/lib/libpthread/uthread/uthread_cond.c:261<br>261 /usr/src/lib/libpthread/uthread/uthread_cond.c: No such file or director<br>y.<br> in /usr/src/lib/libpthread/uthread/uthread_cond.c<br>(gdb) up<br>#3 0x04c003b4 in ThreadPThread__pthread_cond_wait (cond=0x882737b0,<br> mutex=0x88273870) at ../src/thread/PTHREAD/ThreadPThreadC.c:506<br>506 return pthread_cond_wait(cond, mutex);<br>(gdb) info frame<br>Stack level 3, frame at 0x864fee50:<br> eip = 0x4c003b4 in ThreadPThread__pthread_cond_wait<br> (../src/thread/PTHREAD/ThreadPThreadC.c:506); saved eip 0x4bfad66<br> called by frame at 0x864feea0, caller of frame at 0x864fee30<br> source language c.<br> Arglist at 0x864fee48, args: cond=0x882737b0, mutex=0x88273870<br> Locals at 0x864fee48, Previous frame's sp is 0x864fee50<br> Saved registers:<br> ebx at 0x864fee44, ebp at 0x864fee48, esi at 0x864fee20, edi at 0x864fee24,<br> eip at 0x864fee4c<br>(gdb)<br> <br>(gdb) down<br>#1 0x05e01200 in _thread_kern_sched_state_unlock (state=PS_SIGTHREAD,<br> lock=0x8ad0c8b0, fname=0x1 <Address 0x1 out of bounds>, lineno=1)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:581<br>581 /usr/src/lib/libpthread/uthread/uthread_kern.c: No such file or director<br>y.<br> in /usr/src/lib/libpthread/uthread/uthread_kern.c<br>(gdb) down<br>#0 _thread_kern_sched (scp=0x0)<br> at /usr/src/lib/libpthread/uthread/uthread_kern.c:482<br>482 in /usr/src/lib/libpthread/uthread/uthread_kern.c<br>(gdb) down<br>Bottom (i.e., innermost) frame selected; you cannot go down.<br>(gdb) info frame<br>Stack level 0, frame at 0x864fedd0:<br> eip = 0x5e00f70 in _thread_kern_sched<br> (/usr/src/lib/libpthread/uthread/uthread_kern.c:482); saved eip 0x5e01200<br> called by frame at 0x864fedf0<br> source language c.<br> Arglist at 0x864fedc8, args: scp=0x0<br> Locals at 0x864fedc8, Previous frame's sp is 0x864fedd0<br> Saved registers:<br> ebx at 0x864fedbc, ebp at 0x864fedc8, esi at 0x864fedc0, edi at 0x864fedc4,<br> eip at 0x864fedcc<br> <br>I'll try reversing the assert?<br><br> - Jay<br><br> <br><hr id="ecxstopSpelling">From:<span class="Apple-converted-space"> </span><a href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</a><br>To:<span class="Apple-converted-space"> </span><a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a><br>Date: Fri, 20 Nov 2009 09:58:38 -0500<br>CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Subject: Re: [M3devel] OpenBSD/x86 pthreads<br><br><div><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div style="word-wrap: break-word; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div style="word-wrap: break-word; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal 12px/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div><font class="ecxecxApple-style-span" color="#0000ff" face="'Gill Sans'"><span class="ecxecxApple-style-span" style="font-size: medium; ">This looks odd -- the assertion should not fail. It is reporting that recorded stack base is not is not in range of the reported stack info. What exactly does OpenBSD report in the sinfo? Which thread is this? I need a full stack trace of all the threads to understand what is going on here.</span></font></div><div><font class="ecxecxApple-style-span" color="#0000ff" face="'Gill Sans'"><span class="ecxecxApple-style-span" style="font-size: medium; "><br></span></font></div></span></span></span></span></span></span></span></span></div></span></div></span></div><div><div>On 20 Nov 2009, at 04:01, Jay K wrote:</div><br class="ecxecxApple-interchange-newline"><blockquote><span class="ecxecxApple-style-span" style="text-transform: none; text-indent: 0px; border-collapse: separate; font: normal normal normal medium/normal Helvetica; white-space: normal; letter-spacing: normal; color: rgb(0, 0, 0); word-spacing: 0px; "><div class="ecxecxhmmessage" style="font-family: Verdana; font-size: 10pt; ">Tony, I'm not sure we really care, but:<br> <br>(gdb) r<br>The program being debugged has been started already.<br>Start it from the beginning? (y or n) y<br>Starting program: /home/jay/cm3/bin/Juno<br>assertion "end >= sinfo.ss_sp" failed: file "../src/thread/PTHREAD/ThreadPThread<br>C.c", line 180, function "ThreadPThread__ProcessStopped"<br>Program received signal SIGABRT, Aborted.<br>[Switching to process 5091, thread 0x85a73400]<br>0x042d5f81 in kill () from /usr/lib/libc.so.50.1<br>(gdb) up<br>#1 0x04322907 in abort () at /usr/src/lib/libc/stdlib/abort.c:68<br>...<br>(gdb) up<br>#2 0x042b185b in __assert2 (<br>...<br>(gdb) up<br>#3 0x00b92f24 in ThreadPThread__ProcessStopped (mt=0x85a73800, start=0x0,<br> end=0x7fe80fb0, p=0xb736dc <RTCollector__NoteStackLocations>)<br> at ../src/thread/PTHREAD/ThreadPThreadC.c:180<br>180 assert(end >= sinfo.ss_sp);<br>(gdb) info locals<br>sinfo = {ss_sp = 0x7fe81000, ss_size = 81920, ss_flags = 0}<br>(gdb)<br><br><br> - Jay<br></div></span></blockquote></div><br></div></span><br class="Apple-interchange-newline"></blockquote></div><br></body></html>