<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Tony,<BR>
 - You didn't like how I factored InitMutex and InitCondition via InitMutexHelper?<BR>
 - XWait doesn't have to initialize the mutex, because it must already<BR>
   be locked, and therefore initialized? Or is that a "safety hole"?<BR>
   Unsafe module trusting safe caller to have adhered to its interface<BR>
   but it might not have to so unsafe code has to do extra work to preserve safety?<BR>
   Reasonable to ASSERT instead? Or are asserts allowed to be removed<BR>
   and can't be used to guarantee safety?<BR>
   (I put them in C code used by Modula-3, but I can perhaps make the rules there.)<BR>
 <BR>
 - Jay<BR><BR><BR><BR><BR><BR> <BR>
<HR id=stopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu<BR>Date: Sat, 12 Sep 2009 08:53:01 +0000<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<BR><BR>
<STYLE>
.ExternalClass .EC_hmmessage P
{padding:0px;}
.ExternalClass body.EC_hmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
I believe it was this 30 minute window, 2009-02-16 02:00 - 2009-02-16 02:30:<BR> <BR>2009-02-16 02:30  hosking<BR><BR>  * m3-libs/m3core/src/runtime/POSIX/: RTProcessPosixC.c,<BR>    RTProcessPosixC.i3:<BR><BR>  Tidy up.<BR><BR>2009-02-16 02:20  hosking<BR><BR>  * m3-libs/m3core/src/: Csupport/VAX/dtoa.c, Csupport/big-endian/dtoa.c,<BR>    Csupport/little-endian/dtoa.c, convert/CConvert.i3,<BR>    convert/CConvert.m3, runtime/I386_DARWIN/RTThread.m3,<BR>    runtime/common/RTCollector.m3, runtime/common/RTHeapRep.i3,<BR>    runtime/common/RTOS.i3, thread/POSIX/ThreadPosix.m3,<BR>    thread/PTHREAD/ThreadF.i3, thread/PTHREAD/ThreadPThread.m3,<BR>    thread/PTHREAD/ThreadPThreadC.c, thread/PTHREAD/ThreadPThreadC.i3,<BR>    thread/WIN32/ThreadWin32.m3:<BR><BR>  Clean up RTOS.LockHeap/RTOS.UnlockHeap implementations to better match underlying pthread semantics.<BR>  This means that RTOS.WaitHeap must be called while RTOS.LockHeap is held.<BR>  RTOS.BroadcastHeap can be called whether RTOS.LockHeap is held or not.<BR><BR>2009-02-16 02:02  hosking<BR><BR>  * m3-libs/m3core/src/runtime/common/RTHeapMap.i3:<BR><BR>  Expose DoWalkRef.<BR><BR><BR> - Jay<BR><BR> <BR>
<HR id=EC_stopSpelling>
From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Date: Fri, 11 Sep 2009 22:21:44 -0400<BR>CC: m3devel@elegosoft.com<BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-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=EC_EC_Apple-style-span>
<DIV><SPAN style="FONT-SIZE: medium" class=EC_EC_Apple-style-span><FONT class=EC_EC_Apple-style-span color=#0000ff face="'Gill Sans'">Hmmm.  Not sure.  Do you have the code diffs?</FONT></SPAN></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 11 Sep 2009, at 17:28, Jay K wrote:</DIV><BR class=EC_EC_Apple-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=EC_EC_Apple-style-span>
<DIV style="FONT-FAMILY: Verdana; FONT-SIZE: 10pt" class=EC_EC_hmmessage>They aren't really in Trestle or ThreadWin32.<BR>Well, right, often they are in ThreadWin32.<BR>But not always.<BR>I think it is, like, classic heap/stack corruption, via non-classic "locking not working" and gc moving stuff when it shouldn't.<BR>I don't have good evidence, but it usually NOT a hang/deadlock or assertion failure, it is usually an access violation (aka SEGSIGV) which as I understand must be the result of bugs in unsafe code.<BR><BR>I did narrow it down a 30 minute window.<BR><BR> - Jay<BR><BR><BR>
<HR id=EC_EC_stopSpelling>
From:<SPAN class=EC_EC_Apple-converted-space> </SPAN><A href="mailto:hosking@cs.purdue.edu">hosking@cs.purdue.edu</A><BR>To:<SPAN class=EC_EC_Apple-converted-space> </SPAN><A href="mailto:rcoleburn@scires.com">rcoleburn@scires.com</A><BR>Date: Fri, 11 Sep 2009 17:05:57 -0400<BR>CC:<SPAN class=EC_EC_Apple-converted-space> </SPAN><A href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</A><BR>Subject: Re: [M3devel] [M3commit] CVS Update: cm3<BR><BR>I have my suspicions that ThreadWin32 may have similar latent bugs in synchronization similar to those I have recently shaken out of the pthreads implementation.  The good thing is that my implementation there is based in part on ThreadWin32, so it can't be too far off.  It is inevitable with concurrent code that you will get different behavior at each run.  The easiest things to debug are thread lockups, which can usually be diagnosed by staring at dumps of all the thread state.  Harder is actual crashes like you are observing.  If assertions can be used to monitor program invariants then it usually can be narrowed down.  Unfortunately, I am not in a position to debug the ThreadWin32 code.  Any help would be appreciated.  The question is whether the crashes you see are in Trestle or ThreadWin32. 
<DIV>
<DIV><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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-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=EC_EC_EC_Apple-style-span>
<DIV><FONT class=EC_EC_EC_Apple-style-span color=#0000ff><FONT class=EC_EC_EC_Apple-style-span face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span>Antony Hosking</SPAN></SPAN></FONT></FONT><FONT class=EC_EC_EC_Apple-style-span face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span><SPAN class=EC_EC_EC_Apple-converted-space> </SPAN>|<SPAN class=EC_EC_EC_Apple-converted-space> </SPAN></SPAN></SPAN><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span>Associate Professor</SPAN></SPAN><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'" class=EC_EC_EC_Apple-style-span> | Computer Science | Purdue University</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=EC_EC_EC_Apple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=EC_EC_EC_Apple-style-span>305 N. University Street | West Lafayette | IN 47907 | USA</SPAN></FONT></DIV>
<DIV><FONT class=EC_EC_EC_Apple-style-span color=#0000ff face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span>Office</SPAN></SPAN></FONT><FONT class=EC_EC_EC_Apple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: GillSans-Light" class=EC_EC_EC_Apple-style-span> +1 765 494 6001 |<SPAN class=EC_EC_EC_Apple-converted-space> </SPAN></SPAN></SPAN></FONT><FONT class=EC_EC_EC_Apple-style-span color=#0000ff face="Gill Sans"><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: 'Gill Sans'; COLOR: rgb(0,0,255)" class=EC_EC_EC_Apple-style-span>Mobile</SPAN></SPAN></FONT><FONT class=EC_EC_EC_Apple-style-span face=GillSans-Light><SPAN style="FONT-FAMILY: GillSans-Light" class=EC_EC_EC_Apple-style-span><SPAN style="FONT-FAMILY: GillSans-Light" class=EC_EC_EC_Apple-style-span><SPAN class=EC_EC_EC_Apple-converted-space> </SPAN>+1 765 427 5484</SPAN></SPAN></FONT></DIV>
<DIV><FONT class=EC_EC_EC_Apple-style-span face=GillSans-Light><BR class=EC_EC_EC_khtml-block-placeholder></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN><BR class=EC_EC_EC_Apple-interchange-newline></SPAN></DIV></SPAN></DIV></SPAN><BR class=EC_EC_EC_Apple-interchange-newline></DIV><BR>
<DIV>
<DIV>On 11 Sep 2009, at 16:54, Randy Coleburn wrote:</DIV><BR class=EC_EC_EC_Apple-interchange-newline>
<BLOCKQUOTE>
<DIV>
<DIV>Tony:</DIV>
<DIV> </DIV>
<DIV>Will any of this make any difference on Windows platform?</DIV>
<DIV> </DIV>
<DIV>I tried a couple of days ago to update all sources and rebuild.  Both Juno and Mentor still crash on both XP and Vista.  If you run multiple times, you get different crash results.  (So much for deterministic behavior.)  Let me know if there is anything I can do to help debug/test.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Randy<BR><BR>>>> Antony Hosking <<A href="mailto:hosking@elego.de">hosking@elego.de</A>> 9/11/2009 10:48 PM >>><BR>CVSROOT:/usr/cvs<BR>Changes by:<A href="mailto:hosking@birch.09">hosking@birch.09</A>/09/11 22:48:37<BR><BR>Modified files:<BR>cm3/m3-libs/m3core/src/thread/PTHREAD/: ThreadPThread.m3<SPAN class=EC_EC_Apple-converted-space> </SPAN><BR><BR>Log message:<BR>Mentor and Juno finally work on I386_DARWIN.<BR>***Significant overhaul of thread alerting.***<BR>Invariant now is that all waiting is done on the thread's own condition<BR>variable.  This cleanly permits signals and alerts from any other thread.<BR><BR>Need  to set DISPLAY=:0.0 and xhost+ to get around problems with<BR>DISPLAY=/tmp/launch-XXXXXX/:0.<BR><BR></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></SPAN><BR class=EC_EC_Apple-interchange-newline></BLOCKQUOTE></DIV><BR></body>
</html>