<html><head><base href="x-msg://272/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">In the face of these crashes it would be best to run all tests with the @M3paranoidgc flag at all times.<div>
<br><div><div>On Mar 14, 2011, at 9:40 PM, Coleburn, Randy wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; font-size: medium; "><div lang="EN-US" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Mika et al:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">I didn’t want to check in a modified version of your program without everyone agreeing my modifications are desired.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Attached is my modified source code. See if you think the modifications are worthy of adding to the program, or feel free to adjust further, or just tell me you don’t want to add them. If you want me to check in the modified source, let me know.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Basically, I’ve done 2 things:<br><br><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in; "><span>1.<span style="font: normal normal normal 7pt/normal 'Times New Roman'; "> <span class="Apple-converted-space"> </span></span></span>Added<span class="Apple-converted-space"> </span><b>pp.finish()</b><span class="Apple-converted-space"> </span>in command line parsing so that if you put extra arguments on command line that aren’t parsed, you will get an error message. For example, I keep finding I sometimes separate the test names with space instead of comma, only to realize after program starts that the extra arguments were ignored. (We could also change the specs to allow for comma to be used as a test name separator.)<br><br><o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in; "><span>2.<span style="font: normal normal normal 7pt/normal 'Times New Roman'; "> <span class="Apple-converted-space"> </span></span></span>Added “<b>–verbose</b>” command line option. If you choose this option, extra information is printed, namely: as threads are created, their “id” is printed and then for each iteration, the number of times each thread executed its main loop is printed. Also, if a thread doesn’t make any progress on an iteration, a notice that the thread may be starved or deadlocked is printed.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Unless you use –verbose, the program output is the same as your version, except that if you give extra command line arguments, the program will abort and notify you. For example,<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -tests read lock<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">ParseParams: parameter 4 = "lock" extraneous or misplaced.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** Couldnt parse cmd-line args.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Now, running on Windows 7 (64-bit), I still get non-deterministic behavior and some crashes. For example:<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -verbose -tests read,lock<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">Writing file...done<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">Creating read threads...<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read=0<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read=1<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read=2<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">done<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">Creating lock threads...<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock=21<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock=22<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock=23<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">done<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">running...printing oldest/median age/newest<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">..........laziest thread is 0/0/0 (tests: read 0/0/0 lock 0/0/0)<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 0 completed 1670 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 1 completed 1692 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 2 completed 1849 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 21 completed 11788253 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 22 completed 9448889 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 23 completed 9480853 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">..........laziest thread is 0/0/0 (tests: read 0/0/0 lock 0/0/0)<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 0 completed 2148 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 1 completed 2113 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> read Thread 2 completed 2343 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 21 completed 13326765 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 22 completed 11327588 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "> lock Thread 23 completed 12743882 loops.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">.......<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** Attempt to reference an illegal memory location.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** Attempt to reference an illegal memory location.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** Attempt to reference an illegal memory location.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** pc = 0x126e37d = Move + 0x50 in ..\src\runtime\common\RTCollector.m3<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** <*ASSERT*> failed.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** file "..\src\thread\WIN32\ThreadWin32.m3", line 841<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** <*ASSERT*> failed.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** file "..\src\thread\WIN32\ThreadWin32.m3", line 841<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** runtime error:<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** <*ASSERT*> failed.<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">*** file "..\src\thread\WIN32\ThreadWin32.m3", line 841<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; "><span style="font-family: 'Courier New'; ">***<o:p></o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">I’ll try on 32-bit XP soon and report.<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Regards,<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; ">Randy Coleburn<o:p></o:p></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 11pt; font-family: Calibri, sans-serif; "><o:p> </o:p></div></div><span><Main.m3></span></div></span></blockquote></div><br></div></body></html>