<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
There is probably a bug in RTCollector.m3 or RTAllocator.m3.<br><br> - Jay<br><br><hr id="stopSpelling">Date: Thu, 3 Mar 2011 02:27:58 +0000<br>From: dabenavidesd@yahoo.es<br>Subject: Re: [M3devel] results of threadtest program on Windows7<br>To: rcolebur@scires.com; m3devel@elegosoft.com; jay.krell@cornell.edu<br><br><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font: inherit;" valign="top">Hi all:<br>I would doubt but there could be some source of problem in smp on the Win32 platform, since there was a SPINE implementation on an intelligent NIC with 2 embedded MIPS CPUs, perhaps this was just a driver RT but it was for real time and in such a case there should be no problem besides that of the scheduling policy, but thinking how about linking MS Win2k R is a kind of crazy not to believe there was some synchronization with CPU board threads and that component threading at some point I believe.<br><br>Even more in embedded systems, there was a MPU implementation of it in 80186 a decade ago, perhaps would be good to have a look of their Thread interface implementation it might be seem interesting if so.<br><br>But in any case there should be plenty of ways of implementing the threading tests incrementally of number of threads, besides you may
want to check some uniprocessors with hyperThreading technology (sort of thread physical divisions inside the cpu), they are presented to OS as 2 smp processors, it could be interesting, I remember to test time ago in this machines and anything weird happened, but quite time ago with ThreadPthread LINUXLIBC6 systems with normally distributed programs.<br> <br>What about results in Win2k ?<br>Thanks in advance<br><br>--- El <b>mié, 2/3/11, Jay K <i><jay.krell@cornell.edu></i></b> escribió:<br><blockquote style="margin-left: 5px; padding-left: 5px;"><br>De: Jay K <jay.krell@cornell.edu><br>Asunto: Re: [M3devel] results of threadtest program on Windows7<br>Para: rcolebur@scires.com, "m3devel" <m3devel@elegosoft.com><br>Fecha: miércoles, 2 de marzo, 2011 20:17<br><br><div id="ecxyiv891226996">
<style>
.ExternalClass #ecxyiv891226996 .ecxyiv891226996hmmessage P
{padding:0px;}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996hmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
Even with the change I made PutCard to PutInt?<br>
That's the only failure I've seen.<br>
I'll try on a non-virtual dual-proc machine later.<br>
<br>
Thanks,<br>
- Jay<br> <br>
<hr id="ecxyiv891226996stopSpelling">
From: rcolebur@SCIRES.COM<br>To: m3devel@elegosoft.com<br>Date: Wed, 2 Mar 2011 19:42:47 -0500<br>Subject: Re: [M3devel] results of threadtest program on Windows7<br><br>
<style>
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass p.ecxyiv891226996ecxMsoNormal, .ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass li.ecxyiv891226996ecxMsoNormal, .ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass div.ecxyiv891226996ecxMsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'serif';}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass a:link, .ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass span.ecxyiv891226996ecxMsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass a:visited, .ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass span.ecxyiv891226996ecxMsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass p
{margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:'serif';}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass span.ecxyiv891226996ecxEmailStyle18
{font-family:'sans-serif';color:#1F497D;}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass .ecxyiv891226996ecxMsoChpDefault
{font-size:10.0pt;}
.ExternalClass ecx_filtered #ecxyiv891226996
{;}
.ExternalClass #ecxyiv891226996 .ecxyiv891226996ExternalClass div.ecxyiv891226996ecxWordSection1
{;}
</style>
<div class="ecxyiv891226996ecxWordSection1">
<p class="ecxyiv891226996ecxMsoNormal"><span style="font-family: 'sans-serif'; color: rgb(31, 73, 125); font-size: 11pt;">Yes, it fails more often than it runs for me.</span></p>
<p class="ecxyiv891226996ecxMsoNormal"><span style="font-family: 'sans-serif'; color: rgb(31, 73, 125); font-size: 11pt;">Regards,</span></p>
<p class="ecxyiv891226996ecxMsoNormal"><span style="font-family: 'sans-serif'; color: rgb(31, 73, 125); font-size: 11pt;">Randy</span></p>
<p class="ecxyiv891226996ecxMsoNormal"><span style="font-family: 'sans-serif'; color: rgb(31, 73, 125); font-size: 11pt;"> </span></p>
<div>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p style="margin-left: 0.5in;" class="ecxyiv891226996ecxMsoNormal"><b><span style="font-family: 'sans-serif'; font-size: 10pt;">From:</span></b><span style="font-family: 'sans-serif'; font-size: 10pt;"> jayk123@hotmail.com [mailto:jayk123@hotmail.com] <b>On Behalf Of </b>Jay K<br><b>Sent:</b> Tuesday, March 01, 2011 5:59 AM<br><b>To:</b> Mika Nystrom; Coleburn, Randy<br><b>Cc:</b> m3devel<br><b>Subject:</b> RE: [M3devel] results of threadtest program on Windows7</span></p></div></div>
<p style="margin-left: 0.5in;" class="ecxyiv891226996ecxMsoNormal"> </p>
<p style="margin-left: 0.5in;" class="ecxyiv891226996ecxMsoNormal"><span style="font-family: 'sans-serif'; font-size: 10pt;">I haven't seen it fail on NT, except for PutCard in the test itself getting negative numbers.<br>I've run it just a few times now. One single and dual processor virtual machines.<br>Randy, has it failed many times for you?<br><br> - Jay<br><br>> To: rcolebur@SCIRES.COM<br>> Date: Sun, 27 Feb 2011 15:11:25 -0800<br>> From: mika@async.caltech.edu<br>> CC: m3devel@elegosoft.com<br>> Subject: Re: [M3devel] results of threadtest program on Windows7<br>> <br>> Ah, it just doesn't check command-line arguments that carefully.<br>> <br>> I think what you did is equivalent to "-tests STD".<br>> <br>> Mika<br>> <br>> "Coleburn, Randy" writes:<br>> >Mika:<br>> ><br>> >No change with "-tests POSIX".<br>> ><br>> >Interesting twist: On Windows 7, I thought I'd see what the
command line o=<br>> >ptions are, and I typed "threadtest -help" rather than reading the code.<br>> ><br>> >First time, it produced what appears to be a NIL deref crash. Then, I trie=<br>> >d it again and it ran to completion. Something seems non-deterministic her=<br>> >e. See below.<br>> ><br>> >C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -help<br>> >Writing file...done<br>> >Creating read threads...done<br>> >Creating fork threads...done<br>> >Creating alloc threads...done<br>> >Creating lock threads...done<br>> >running...printing oldest/median age/newest<br>> >.<br>> ><br>> >***<br>> >*** runtime error:<br>> >*** Attempt to reference an illegal memory location.<br>> >*** pc =3D 0x77762262<br>> >***<br>> ><br>> >Stack trace:<br>> > FP PC Procedure<br>> >--------- ---------
-------------------------------<br>> > 0xcdf998 0x130351b SystemError + 0x64 in ..\src\runtime\NT386\RTSignal.m=<br>> >3<br>> > 0xcdf9c0 0x77762262 <???><br>> > 0xcdf9d8 0x12e83b7 LockMutex + 0x4f in ..\src\thread\WIN32\ThreadWin32.m=<br>> >3<br>> > 0xcdfa00 0x12c7b08 GetChar + 0x28 in ..\src\rw\Rd.m3<br>> > 0xcdfb38 0x12c12e3 RApply + 0xd3 in ..\src\Main.m3<br>> > 0xcdfb74 0x12e971f ThreadBase + 0x254 in ..\src\thread\WIN32\ThreadWin32=<br>> >.m3<br>> > 0xcdfb80 0x76543677 <???><br>> > 0xcdfbc0 0x77779f02 <???><br>> >......... ......... ... more frames ...<br>> ><br>> >C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -help<br>> >Writing file...done<br>> >Creating read threads...done<br>> >Creating fork threads...done<br>> >Creating alloc threads...done<br>> >Creating lock threads...done<br>>
>running...printing oldest/median age/newest<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>>
>..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=<br>> > lock 0/0/0)<br>> >All tests complete. Congratulations.<br>> ><br>> >Regards,<br>> >Randy Coleburn<br>> ><br>> >-----Original Message-----<br>> >From: Mika Nystrom [mailto:mika@async.caltech.edu]=20<br>> >Sent: Sunday, February 27, 2011 3:30 PM<br>> >To: Coleburn, Randy<br>> >Cc: m3devel@elegosoft.com<br>> >Subject: Re: [M3devel] results of threadtest program on Windows7=20<br>> ><br>> >Hi Randy,<br>> ><br>> >You can try it with -tests POSIX as well.<br>> ><br>> >I find on user threads it runs very slowly (but it does run) because of how=<br>> > unfair<br>> >the thread scheduler is.<br>> ><br>> >Next step might be to whittle
down the tests and see if you can get a failu=<br>> >re with<br>> >a single test running and -n 2. That would likely be the simplest scenario=<br>> > to<br>> >start further debugging from.<br>> ><br>> > Mika<br>> ><br>> >"Coleburn, Randy" writes:<br>> >>Mika et al:<br>> >><br>> >>Thought I would try something else.<br>> >><br>> >>I took the sources of your thread test program to an older XP machine that=<br>> > =3D<br>> >>has CM3 circa August 2008. This is the machine and implementation I used =<br>> >w=3D<br>> >>hen building a major project I did a couple years back.<br>> >><br>> >>The thread test program does indeed build on this old system, but when I r=<br>> >u=3D<br>> >>n it, I get different results than with the latest HEAD branch code. =3D20<br>> >><br>> >>After it prints
"running...printing oldest/median age/newest", on the next=<br>> > =3D<br>> >>line I get two periods ".." and now the program seems hung. I'll let it "=<br>> >r=3D<br>> >>un" for a few more minutes to see if anything else happens before killing =<br>> >i=3D<br>> >>t.<br>> >><br>> >>At least we don't get the subscript and assertion failures on this older C=<br>> >M=3D<br>> >>3 platform.<br>> >><br>> >>Regards,<br>> >>Randy Coleburn<br>> >><br>> >><br>> >>-----Original Message-----<br>> >>From: Coleburn, Randy=3D20<br>> >>Sent: Sunday, February 27, 2011 2:09 PM<br>> >>To: m3devel@elegosoft.com<br>> >>Subject: Re: [M3devel] results of threadtest program on Windows7<br>> >><br>> >>Mika:<br>> >><br>> >>Ok, I've updated to latest HEAD and I've also built
Jay's m3sleep program.<br>> >><br>> >>Here is what happens now when I run your threadtest program on Windows 7.<br>> >><br>> >>C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest -tests ALL,-fo=<br>> >r=3D<br>> >>k<br>> >>Writing file...done<br>> >>Creating read threads...done<br>> >>Creating nxread threads...done<br>> >>Creating tryexcept threads...done<br>> >>Creating forktoomuch threads...done<br>> >>Creating alloc threads...done<br>> >>Creating creat threads...done<br>> >>Creating lock threads...done<br>> >>running...printing oldest/median age/newest<br>> >><br>> >><br>> >>***<br>> >>*** runtime error:<br>> >>*** An array subscript was out of range.<br>> >>*** file "..\src\runtime\common\RTCollector.m3", line 418<br>> >>***<br>>
>><br>> >><br>> >><br>> >>***<br>> >>*** runtime error:<br>> >>*** <*ASSERT*> failed.<br>> >>*** file "..\src\thread\WIN32\ThreadWin32.m3", line 841<br>> >>***<br>> >><br>> >>The last error repeats ad infinitum until I press CNTRL-C to abort.<br>> >><br>> >>I'll send more info on the Windows install of Modula3 in a subsequent post=<br>> >.<br>> >><br>> >>Regards,<br>> >>Randy Coleburn<br>> >><br>> >>-----Original Message-----<br>> >>From: Mika Nystrom [mailto:mika@async.caltech.edu]=3D20<br>> >>Sent: Saturday, February 26, 2011 12:55 PM<br>> >>To: Coleburn, Randy<br>> >>Cc: m3devel@elegosoft.com<br>> >>Subject: Re: [M3devel] results of threadtest program on Windows7=3D20<br>> >><br>> >>Hi Randy,<br>> >><br>> >>Hm
yes it looks like my Windows programming skills leave something<br>> >>to be desired.<br>> >><br>> >>You can run the thread tester while skipping a test as follows<br>> >><br>> >> threadtest -tests ALL,-fork<br>> >><br>> >>(for instance)<br>> >><br>> >>if you just run=3D20<br>> >><br>> >> threadtest -sadfassdaf<br>> >><br>> >>it'll print the tests that are available.<br>> >><br>> >>As it happens, I just had to upgrade my windows 2000 system to windows 7.<br>> >>Can you give me a very brief description of what you did to install Modula=<br>> >-=3D<br>> >>3<br>> >>on this system?<br>> >><br>> >> Mika<br>> >><br>> >>"Coleburn, Randy" writes:<br>> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_<br>> >>>Content-Type:
text/plain; charset=3D3D"us-ascii"<br>> >>>Content-Transfer-Encoding: quoted-printable<br>> >>><br>> >>>Mika:<br>> >>><br>> >>>I've finally managed to get cm3 rebuilt on Windows 7 again.<br>> >>><br>> >>>So, I ran your threadtest program.<br>> >>><br>> >>>Here are the results. Note the "..." is where I cut out a bunch of the r=<br>> >e=3D<br>> >>p=3D3D<br>> >>>eating "ERROR FApply" messages.<br>> >>><br>> >>>C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe<br>> >>>Writing file...done<br>> >>>Creating read threads...done<br>> >>>Creating fork threads...done<br>> >>>Creating alloc threads...done<br>> >>>Creating lock threads...done<br>> >>>running...printing oldest/median age/newest<br>> >>>ERROR
FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>.<br>> >>>.<br>> >>>.<br>> >>>***<br>> >>>*** runtime error:<br>> >>>*** An enumeration or subrange value was out of range.<br>> >>>*** file "..\src\Main.m3", line 340<br>> >>>***<br>> >>><br>> >>>laziest thread is 0/0/ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The sy=<br>> >ste=3D<br>> >>m c=3D3D<br>> >>>annot find the file
specified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>.<br>> >>>.<br>> >>>.<br>> >>>laziest thread is 0/0/ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The sy=<br>> >ste=3D<br>> >>m c=3D3D<br>> >>>annot find the file specified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply:
OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>.<br>> >>>.<br>> >>>.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=<br>> >ile=3D<br>> >> sp=3D3D<br>> >>>ecified.<br>> >>>Stack trace:<br>> >>> FP PC Procedure<br>> >>>--------- --------- -------------------------------<br>> >>>0x30fbd0 0x127218a PutStats + 0x1a3 in ..\src\Main.m3<br>> >>>0x30fcc0 0x1273825 Main_M3 +
0x11db(!) in ..\src\Main.m3<br>> >>><br>> >>>Regards,<br>> >>>Randy Coleburn<br>> >>><br>> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_<br>> >>>Content-Type: text/html; charset=3D3D"us-ascii"<br>> >>>Content-Transfer-Encoding: quoted-printable<br>> >>></span></p></div>
</div></blockquote></td></tr></tbody></table><br> </body>
</html>