<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
The corruption is gone now.<BR>
<BR>
The combination of fixing Enter vs. Leave, and disabling/removing the idle threads solved the corruption.<BR>
Neither alone seemed to work. The Enter/Leave problem was obvious, my fault. The idle threads I didn't dig into. Maybe you didn't realize waitSema was dual purpose???? Or maybe it was just the Enter/Leave? If anyone wants, certainly retest it with each change independently.<BR>
<BR>
<BR>
Whenever I look, the Juno hang is on "untilDone" condition variable in Juno.<BR>
RTIO shows it usually signals it in Misc:<BR>
C:\dev2\cm3.2\m3-ui\juno-2\juno-app\src\Juno.m3(806): Thread.Signal(w.untilDone)<BR>
<BR>
<BR>
but it doesn't seem to always, either when it hangs or sometimes when it doesn't hang.<BR>
<BR>
<BR>
This /could/ be a bug in Juno or Trestle..except, and this isn't conclusive:<BR>
<BR>
I ran Juno @M3no-trestle-await-delete in a loop on Mac and it seemed to go forever.<BR>
I'll leave it a few hours when I'm not home to see the screen flashing.<BR>
<BR>
<BR>
Of course that switch merits review and/or implementation in a different place.<BR>
Very useful for testing, very dubious otherwise.<BR>
<BR>
<BR>
We need some sort of stress or fault-injection or variation-injection tests.<BR>
Run threads deterministically in every combination of order, for example.<BR>
<BR>
<BR>
- Jay<BR> <BR>
<HR id=stopSpelling>
CC: m3devel@elegosoft.com<BR>From: hosking@cs.purdue.edu<BR>To: jay.krell@cornell.edu<BR>Subject: Re: win32 threads...now Juno sometimes hangs..<BR>Date: Tue, 29 Sep 2009 10:01:16 -0400<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>None of what you say rings any bells. I don't think any of this is in the BroadcastHeap stuff. It *may* be similar to the POSIX hang that I fixed. I'll need to look more closely at the ThreadWin32 code. But you are getting corruption, not a hang, right?</SPAN></FONT></DIV></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></DIV></SPAN></DIV></SPAN></DIV><BR>
<DIV>
<DIV>On 29 Sep 2009, at 07:19, 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>Hi Tony. Sorry, I had made one large error in ThreadWin32.m3.<BR>At least. The Enter/Leave mechanical replacement error.<BR> <BR>However even with that, the idle thread stuff seemed to cause problems.<BR>It was there forever, I realize.<BR> <BR>Also, I should have done this first, but anyway, later, I tried merging back in your changes from Feb 16.<BR>Somewhat they are moot (lock vs. LockMutex).<BR>Somewhat they are already there (WaitHeap, heapCond => condition).<BR>Somewhat they are trivial (fixing error messages).<BR> <BR>That leaves, in my analysis, the BroadcastHeap change.<BR> <BR>With this change however, /sometimes/ Juno hangs.<BR>Is this, like, somehow equivalent to the Posix hang?<BR>Is the current code the "best"?<BR> <BR>Oh darn..it hangs either way. Just not often.<BR>Could that be "similar" to the pthread problem?<BR>Any chance you can look at it?<BR> <BR>Thanks,<BR> - Jay<BR><BR><BR><BR><BR><BR></DIV></SPAN></BLOCKQUOTE></DIV><BR> </body>
</html>