<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
$ /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=stopSpelling>
From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Date: Fri, 20 Nov 2009 09:58:38 -0500<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] OpenBSD/x86 pthreads<BR><BR>
<DIV><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="WORD-WRAP: break-word"><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: 12px Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV><FONT class=ecxApple-style-span color=#0000ff face="'Gill Sans'"><SPAN style="FONT-SIZE: medium" class=ecxApple-style-span>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=ecxApple-style-span color=#0000ff face="'Gill Sans'"><SPAN style="FONT-SIZE: medium" class=ecxApple-style-span><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=ecxApple-interchange-newline>
<BLOCKQUOTE><SPAN style="TEXT-TRANSFORM: none; TEXT-INDENT: 0px; BORDER-COLLAPSE: separate; FONT: medium Helvetica; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(0,0,0); WORD-SPACING: 0px" class=ecxApple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=ecxhmmessage>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>                                      </body>
</html>