[M3devel] results of threadtest program on Windows7

Mika Nystrom mika at async.caltech.edu
Tue Mar 1 19:17:18 CET 2011


Hi Jay,

1. I think you should get forward progress no matter what, although it
might be very slow on some systems.

2. Not sure how you could get negative timings.  That would suggest that
Time.Now() is decreasing---which seems contrary to its specification.
Although the code is doing some nasty stuff with the timings, mainly
reading and writing them without locks.  But it's using INTEGER for
the results so I don't think there can be an atomicity problem there.
Even if there were coherence problems between processors (is this
technically possible?) the "now" value has to be coherent since it's
from the thread that prints the results, and the "then" values could
only be getting older, not newer...

3. Note that there are systems (FreeBSD 4 is an example) that have a
"pthreads" library but where the pthreads library is implemented with
user threads.  Could that be related to why OpenBSD is working?

4. Hm.  I think I am only using multiprocessor systems, yes.  Hard to
find single-CPU systems nowadays!  I think actually the only one I have
is PPC_DARWIN, and I haven't tried the code on that.  So yes this is a
possibility as far as explaining differences...

     Mika

Jay K writes:
>--_93dad88e-7ca3-48ac-a7dc-f4777a03b794_
>Content-Type: text/plain; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>
>I also haven't seen it fail on OpenBSD/x86/4.7. I'm pretty sure using pthre=
>ads there.
>But on Solaris/5.10/sparc it hangs=2C for many hours.
>
>-bash-4.1$ ./threadtest=20
>Writing file...done
>Creating read threads...done
>Creating fork threads...done
>Creating alloc threads...done
>Creating lock threads...done
>running...printing oldest/median age/newest
>.
>
>Are we guranteed forward progress in suspending all threads?
>
>I do see it fail usually on Darwin. e.g.:
>........pthread_mutex_destroy:EBUSY
>pthread_mutex_destroy:EBUSY
>..laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0 lock 0/=
>0/0)
>...
>
>***
>*** runtime error:
>***    An array subscript was out of range.
>***    file "../src/runtime/common/RTCollector.m3"=2C line 418
>***
>
>I haven't tried Linux yet.
>Do note that we have some variance in the pthreads implementation.
>The "portable" implementation is used on Linux=2C Solaris=2C NetBSD.
>And then OpenBSD=2C Darwin=2C FreeBSD each have slight differences.
>
>Mika are your machines all multiprocessors?
>I do wonder if that helps increase the stress and if I should be sure to us=
>e multiprocessors.
>
>I'm also considering taking the time to try various historical versions=2C =
>either releases or dates in CVS.
>
> - Jay
>
>From: jay.krell at cornell.edu
>To: mika at async.caltech.edu=3B rcolebur at scires.com
>Date: Tue=2C 1 Mar 2011 10:59:29 +0000
>CC: m3devel at elegosoft.com
>Subject: Re: [M3devel] results of threadtest program on Windows7
>
>
>
>
>
>
>
>
>I haven't seen it fail on NT=2C except for PutCard in the test itself getti=
>ng negative numbers.
>I've run it just a few times now. One single and dual processor virtual mac=
>hines.
>Randy=2C has it failed many times for you?
>
> - Jay
>
>> To: rcolebur at SCIRES.COM
>> Date: Sun=2C 27 Feb 2011 15:11:25 -0800
>> From: mika at async.caltech.edu
>> CC: m3devel at elegosoft.com
>> Subject: Re: [M3devel] results of threadtest program on Windows7
>>=20
>> Ah=2C it just doesn't check command-line arguments that carefully.
>>=20
>> I think what you did is equivalent to "-tests STD".
>=20
>>      Mika
>>=20
>> "Coleburn=2C Randy" writes:
>> >Mika:
>> >
>> >No change with "-tests POSIX".
>> >
>> >Interesting twist:  On Windows 7=2C I thought I'd see what the command l=
>ine o=3D
>> >ptions are=2C and I typed "threadtest -help" rather than reading the cod=
>e.
>> >
>> >First time=2C it produced what appears to be a NIL deref crash.  Then=2C=
> I trie=3D
>> >d it again and it ran to completion.  Something seems non-deterministic =
>her=3D
>> >e.  See below.
>> >
>> >C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -help
>> >Writing file...done
>> >Creating read threads...done
>> >Creating fork threads...done
>> >Creating alloc threads...done
>> >Creating lock threads...done
>> >running...printing oldest/median age/newest
>> >.
>> >
>> >***
>> >*** runtime error:
>> >***    Attempt to reference an illegal memory location.
>> >***    pc =3D3D 0x77762262
>> >***
>> >
>> >Stack trace:
>> >   FP         PC      Procedure
>> >---------  ---------  -------------------------------
>> > 0xcdf998  0x130351b  SystemError + 0x64 in ..\src\runtime\NT386\RTSigna=
>l.m=3D
>> >3
>> > 0xcdf9c0  0x77762262  <???>
>> > 0xcdf9d8  0x12e83b7  LockMutex + 0x4f in ..\src\thread\WIN32\ThreadWin3=
>2.m=3D
>> >3
>> > 0xcdfa00  0x12c7b08  GetChar + 0x28 in ..\src\rw\Rd.m3
>> > 0xcdfb38  0x12c12e3  RApply + 0xd3 in ..\src\Main.m3
>> > 0xcdfb74  0x12e971f  ThreadBase + 0x254 in ..\src\thread\WIN32\ThreadWi=
>n32=3D
>> >.m3
>> > 0xcdfb80  0x76543677  <???>
>> > 0xcdfbc0  0x77779f02  <???>
>> >.........  .........  ... more frames ...
>> >
>> >C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe -help
>> >Writing file...done
>> >Creating read threads...done
>> >Creating fork threads...done
>> >Creating alloc threads...done
>> >Creating lock threads...done
>> >running...printing oldest/median age/newest
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/=
>0/0=3D
>> > lock 0/0/0)
>> >All tests complete.  Congratulations.
>> >
>> >Regards=2C
>> >Randy Coleburn
>> >
>> >-----Original Message-----
>> >From: Mika Nystrom [mailto:mika at async.caltech.edu]=3D20
>> >Sent: Sunday=2C February 27=2C 2011 3:30 PM
>> >To: Coleburn=2C Randy
>> >Cc: m3devel at elegosoft.com
>> >Subject: Re: [M3devel] results of threadtest program on Windows7=3D20
>> >
>> >Hi Randy=2C
>> >
>> >You can try it with -tests POSIX as well.
>> >
>> >I find on user threads it runs very slowly (but it does run) because of =
>how=3D
>> > unfair
>> >the thread scheduler is.
>> >
>> >Next step might be to whittle down the tests and see if you can get a fa=
>ilu=3D
>> >re with
>> >a single test running and -n 2.  That would likely be the simplest scena=
>rio=3D
>> > to
>> >start further debugging from.
>> >
>> >     Mika
>> >
>> >"Coleburn=2C Randy" writes:
>> >>Mika et al:
>> >>
>> >>Thought I would try something else.
>> >>
>> >>I took the sources of your thread test program to an older XP machine t=
>hat=3D
>> > =3D3D
>> >>has CM3 circa August 2008.  This is the machine and implementation I us=
>ed =3D
>> >w=3D3D
>> >>hen building a major project I did a couple years back.
>> >>
>> >>The thread test program does indeed build on this old system=2C but whe=
>n I r=3D
>> >u=3D3D
>> >>n it=2C I get different results than with the latest HEAD branch code. =
>=3D3D20
>> >>
>> >>After it prints "running...printing oldest/median age/newest"=2C on the=
> next=3D
>> > =3D3D
>> >>line I get two periods ".." and now the program seems hung.  I'll let i=
>t "=3D
>> >r=3D3D
>> >>un" for a few more minutes to see if anything else happens before killi=
>ng =3D
>> >i=3D3D
>> >>t.
>> >>
>> >>At least we don't get the subscript and assertion failures on this olde=
>r C=3D
>> >M=3D3D
>> >>3 platform.
>> >>
>> >>Regards=2C
>> >>Randy Coleburn
>> >>
>> >>
>> >>-----Original Message-----
>> >>From: Coleburn=2C Randy=3D3D20
>> >>Sent: Sunday=2C February 27=2C 2011 2:09 PM
>> >>To: m3devel at elegosoft.com
>> >>Subject: Re: [M3devel] results of threadtest program on Windows7
>> >>
>> >>Mika:
>> >>
>> >>Ok=2C I've updated to latest HEAD and I've also built Jay's m3sleep pro=
>gram.
>> >>
>> >>Here is what happens now when I run your threadtest program on Windows =
>7.
>> >>
>> >>C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest -tests ALL=
>=2C-fo=3D
>> >r=3D3D
>> >>k
>> >>Writing file...done
>> >>Creating read threads...done
>> >>Creating nxread threads...done
>> >>Creating tryexcept threads...done
>> >>Creating forktoomuch threads...done
>> >>Creating alloc threads...done
>> >>Creating creat threads...done
>> >>Creating lock threads...done
>> >>running...printing oldest/median age/newest
>> >>
>> >>
>> >>***
>> >>*** runtime error:
>> >>***    An array subscript was out of range.
>> >>***    file "..\src\runtime\common\RTCollector.m3"=2C line 418
>> >>***
>> >>
>> >>
>> >>
>> >>***
>> >>*** runtime error:
>> >>***    <*ASSERT*> failed.
>> >>***    file "..\src\thread\WIN32\ThreadWin32.m3"=2C line 841
>> >>***
>> >>
>> >>The last error repeats ad infinitum until I press CNTRL-C to abort.
>> >>
>> >>I'll send more info on the Windows install of Modula3 in a subsequent p=
>ost=3D
>> >.
>> >>
>> >>Regards=2C
>> >>Randy Coleburn
>> >>
>> >>-----Original Message-----
>> >>From: Mika Nystrom [mailto:mika at async.caltech.edu]=3D3D20
>> >>Sent: Saturday=2C February 26=2C 2011 12:55 PM
>> >>To: Coleburn=2C Randy
>> >>Cc: m3devel at elegosoft.com
>> >>Subject: Re: [M3devel] results of threadtest program on Windows7=3D3D20
>> >>
>> >>Hi Randy=2C
>> >>
>> >>Hm yes it looks like my Windows programming skills leave something
>> >>to be desired.
>> >>
>> >>You can run the thread tester while skipping a test as follows
>> >>
>> >>   threadtest -tests ALL=2C-fork
>> >>
>> >>(for instance)
>> >>
>> >>if you just run=3D3D20
>> >>
>> >>   threadtest -sadfassdaf
>> >>
>> >>it'll print the tests that are available.
>> >>
>> >>As it happens=2C I just had to upgrade my windows 2000 system to window=
>s 7.
>> >>Can you give me a very brief description of what you did to install Mod=
>ula=3D
>> >-=3D3D
>> >>3
>> >>on this system?
>> >>
>> >>     Mika
>> >>
>> >>"Coleburn=2C Randy" writes:
>> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_
>> >>>Content-Type: text/plain=3B charset=3D3D3D"us-ascii"
>> >>>Content-Transfer-Encoding: quoted-printable
>> >>>
>> >>>Mika:
>> >>>
>> >>>I've finally managed to get cm3 rebuilt on Windows 7 again.
>> >>>
>> >>>So=2C I ran your threadtest program.
>> >>>
>> >>>Here are the results.  Note the "..." is where I cut out a bunch of th=
>e r=3D
>> >e=3D3D
>> >>p=3D3D3D
>> >>>eating "ERROR FApply" messages.
>> >>>
>> >>>C:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386>threadtest.exe
>> >>>Writing file...done
>> >>>Creating read threads...done
>> >>>Creating fork threads...done
>> >>>Creating alloc threads...done
>> >>>Creating lock threads...done
>> >>>running...printing oldest/median age/newest
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>.
>> >>>.
>> >>>.
>> >>>***
>> >>>*** runtime error:
>> >>>***    An enumeration or subrange value was out of range.
>> >>>***    file "..\src\Main.m3"=2C line 340
>> >>>***
>> >>>
>> >>>laziest thread is 0/0/ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: T=
>he sy=3D
>> >ste=3D3D
>> >>m c=3D3D3D
>> >>>annot find the file specified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>.
>> >>>.
>> >>>.
>> >>>laziest thread is 0/0/ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: T=
>he sy=3D
>> >ste=3D3D
>> >>m c=3D3D3D
>> >>>annot find the file specified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>.
>> >>>.
>> >>>.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find =
>the f=3D
>> >ile=3D3D
>> >> sp=3D3D3D
>> >>>ecified.
>> >>>Stack trace:
>> >>>   FP         PC      Procedure
>> >>>---------  ---------  -------------------------------
>> >>>0x30fbd0  0x127218a  PutStats + 0x1a3 in ..\src\Main.m3
>> >>>0x30fcc0  0x1273825  Main_M3 + 0x11db(!) in ..\src\Main.m3
>> >>>
>> >>>Regards=2C
>> >>>Randy Coleburn
>> >>>
>> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_
>> >>>Content-Type: text/html=3B charset=3D3D3D"us-ascii"
>> >>>Content-Transfer-Encoding: quoted-printable
>> >>>
> 		 	   		  =
>
>--_93dad88e-7ca3-48ac-a7dc-f4777a03b794_
>Content-Type: text/html; charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
><html>
><head>
><style><!--
>.hmmessage P
>{
>margin:0px=3B
>padding:0px
>}
>body.hmmessage
>{
>font-size: 10pt=3B
>font-family:Tahoma
>}
>--></style>
></head>
><body class=3D'hmmessage'>
>I also haven't seen it fail on OpenBSD/x86/4.7. I'm pretty sure using pthre=
>ads there.<br>But on Solaris/5.10/sparc it hangs=2C for many hours.<br><br>=
>-bash-4.1$ ./threadtest <br>Writing file...done<br>Creating read threads...=
>done<br>Creating fork threads...done<br>Creating alloc threads...done<br>Cr=
>eating lock threads...done<br>running...printing oldest/median age/newest<b=
>r>.<br><br>Are we guranteed forward progress in suspending all threads?<br>=
><br>I do see it fail usually on Darwin. e.g.:<br>........pthread_mutex_dest=
>roy:EBUSY<br>pthread_mutex_destroy:EBUSY<br>..laziest thread is 0/0/0 (test=
>s: read 0/0/0 fork 0/0/0 alloc 0/0/0 lock 0/0/0)<br>...<br><br>***<br>*** r=
>untime error:<br>***&nbsp=3B&nbsp=3B&nbsp=3B An array subscript was out of =
>range.<br>***&nbsp=3B&nbsp=3B&nbsp=3B file "../src/runtime/common/RTCollect=
>or.m3"=2C line 418<br>***<br><br>I haven't tried Linux yet.<br>Do note that=
> we have some variance in the pthreads implementation.<br>The "portable" im=
>plementation is used on Linux=2C Solaris=2C NetBSD.<br>And then OpenBSD=2C =
>Darwin=2C FreeBSD each have slight differences.<br><br>Mika are your machin=
>es all multiprocessors?<br>I do wonder if that helps increase the stress an=
>d if I should be sure to use multiprocessors.<br><br>I'm also considering t=
>aking the time to try various historical versions=2C either releases or dat=
>es in CVS.<br><br>&nbsp=3B- Jay<br><br><hr id=3D"stopSpelling">From: jay.kr=
>ell at cornell.edu<br>To: mika at async.caltech.edu=3B rcolebur at scires.com<br>Dat=
>e: Tue=2C 1 Mar 2011 10:59:29 +0000<br>CC: m3devel at elegosoft.com<br>Subject=
>: Re: [M3devel] results of threadtest program on Windows7<br><br>
>
><meta http-equiv=3D"Content-Type" content=3D"text/html=3B charset=3Dunicode=
>">
><meta name=3D"Generator" content=3D"Microsoft SafeHTML">
><style>
>.ExternalClass .ecxhmmessage P
>{padding:0px=3B}
>.ExternalClass body.ecxhmmessage
>{font-size:10pt=3Bfont-family:Tahoma=3B}
>
></style>
>
>
>I haven't seen it fail on NT=2C except for PutCard in the test itself getti=
>ng negative numbers.<br>I've run it just a few times now. One single and du=
>al processor virtual machines.<br>Randy=2C has it failed many times for you=
>?<br><br>&nbsp=3B- Jay<br><br>&gt=3B To: rcolebur at SCIRES.COM<br>&gt=3B Date=
>: Sun=2C 27 Feb 2011 15:11:25 -0800<br>&gt=3B From: mika at async.caltech.edu<=
>br>&gt=3B CC: m3devel at elegosoft.com<br>&gt=3B Subject: Re: [M3devel] result=
>s of threadtest program on Windows7<br>&gt=3B <br>&gt=3B Ah=2C it just does=
>n't check command-line arguments that carefully.<br>&gt=3B <br>&gt=3B I thi=
>nk what you did is equivalent to "-tests STD".<br>&gt=3B <br>&gt=3B      Mi=
>ka<br>&gt=3B <br>&gt=3B "Coleburn=2C Randy" writes:<br>&gt=3B &gt=3BMika:<b=
>r>&gt=3B &gt=3B<br>&gt=3B &gt=3BNo change with "-tests POSIX".<br>&gt=3B &g=
>t=3B<br>&gt=3B &gt=3BInteresting twist:  On Windows 7=2C I thought I'd see =
>what the command line o=3D<br>&gt=3B &gt=3Bptions are=2C and I typed "threa=
>dtest -help" rather than reading the code.<br>&gt=3B &gt=3B<br>&gt=3B &gt=
>=3BFirst time=2C it produced what appears to be a NIL deref crash.  Then=2C=
> I trie=3D<br>&gt=3B &gt=3Bd it again and it ran to completion.  Something =
>seems non-deterministic her=3D<br>&gt=3B &gt=3Be.  See below.<br>&gt=3B &gt=
>=3B<br>&gt=3B &gt=3BC:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386&gt=3Bt=
>hreadtest.exe -help<br>&gt=3B &gt=3BWriting file...done<br>&gt=3B &gt=3BCre=
>ating read threads...done<br>&gt=3B &gt=3BCreating fork threads...done<br>&=
>gt=3B &gt=3BCreating alloc threads...done<br>&gt=3B &gt=3BCreating lock thr=
>eads...done<br>&gt=3B &gt=3Brunning...printing oldest/median age/newest<br>=
>&gt=3B &gt=3B.<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B***<br>&gt=3B &gt=3B*** run=
>time error:<br>&gt=3B &gt=3B***    Attempt to reference an illegal memory l=
>ocation.<br>&gt=3B &gt=3B***    pc =3D3D 0x77762262<br>&gt=3B &gt=3B***<br>=
>&gt=3B &gt=3B<br>&gt=3B &gt=3BStack trace:<br>&gt=3B &gt=3B   FP         PC=
>      Procedure<br>&gt=3B &gt=3B---------  ---------  ---------------------=
>----------<br>&gt=3B &gt=3B 0xcdf998  0x130351b  SystemError + 0x64 in ..\s=
>rc\runtime\NT386\RTSignal.m=3D<br>&gt=3B &gt=3B3<br>&gt=3B &gt=3B 0xcdf9c0 =
> 0x77762262  &lt=3B???&gt=3B<br>&gt=3B &gt=3B 0xcdf9d8  0x12e83b7  LockMute=
>x + 0x4f in ..\src\thread\WIN32\ThreadWin32.m=3D<br>&gt=3B &gt=3B3<br>&gt=
>=3B &gt=3B 0xcdfa00  0x12c7b08  GetChar + 0x28 in ..\src\rw\Rd.m3<br>&gt=3B=
> &gt=3B 0xcdfb38  0x12c12e3  RApply + 0xd3 in ..\src\Main.m3<br>&gt=3B &gt=
>=3B 0xcdfb74  0x12e971f  ThreadBase + 0x254 in ..\src\thread\WIN32\ThreadWi=
>n32=3D<br>&gt=3B &gt=3B.m3<br>&gt=3B &gt=3B 0xcdfb80  0x76543677  &lt=3B???=
>&gt=3B<br>&gt=3B &gt=3B 0xcdfbc0  0x77779f02  &lt=3B???&gt=3B<br>&gt=3B &gt=
>=3B.........  .........  ... more frames ...<br>&gt=3B &gt=3B<br>&gt=3B &gt=
>=3BC:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386&gt=3Bthreadtest.exe -he=
>lp<br>&gt=3B &gt=3BWriting file...done<br>&gt=3B &gt=3BCreating read thread=
>s...done<br>&gt=3B &gt=3BCreating fork threads...done<br>&gt=3B &gt=3BCreat=
>ing alloc threads...done<br>&gt=3B &gt=3BCreating lock threads...done<br>&g=
>t=3B &gt=3Brunning...printing oldest/median age/newest<br>&gt=3B &gt=3B....=
>......laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<=
>br>&gt=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B..........laziest thread is 0/=
>0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/=
>0)<br>&gt=3B &gt=3B..........laziest thread is 0/0/0 (tests: read 0/0/0 for=
>k 0/0/0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B.......=
>...laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>=
>&gt=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B..........laziest thread is 0/0/0=
> (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/0)<=
>br>&gt=3B &gt=3B..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0=
>/0/0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B..........=
>laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>&gt=
>=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B..........laziest thread is 0/0/0 (t=
ests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/0)<br>=
>&gt=3B &gt=3B..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/=
>0 alloc 0/0/0=3D<br>&gt=3B &gt=3B lock 0/0/0)<br>&gt=3B &gt=3B..........laz=
>iest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=3D<br>&gt=3B=
> &gt=3B lock 0/0/0)<br>&gt=3B &gt=3BAll tests complete.  Congratulations.<b=
>r>&gt=3B &gt=3B<br>&gt=3B &gt=3BRegards=2C<br>&gt=3B &gt=3BRandy Coleburn<b=
>r>&gt=3B &gt=3B<br>&gt=3B &gt=3B-----Original Message-----<br>&gt=3B &gt=3B=
>From: Mika Nystrom [mailto:mika at async.caltech.edu]=3D20<br>&gt=3B &gt=3BSen=
>t: Sunday=2C February 27=2C 2011 3:30 PM<br>&gt=3B &gt=3BTo: Coleburn=2C Ra=
>ndy<br>&gt=3B &gt=3BCc: m3devel at elegosoft.com<br>&gt=3B &gt=3BSubject: Re: =
>[M3devel] results of threadtest program on Windows7=3D20<br>&gt=3B &gt=3B<b=
>r>&gt=3B &gt=3BHi Randy=2C<br>&gt=3B &gt=3B<br>&gt=3B &gt=3BYou can try it =
>with -tests POSIX as well.<br>&gt=3B &gt=3B<br>&gt=3B &gt=3BI find on user =
>threads it runs very slowly (but it does run) because of how=3D<br>&gt=3B &=
>gt=3B unfair<br>&gt=3B &gt=3Bthe thread scheduler is.<br>&gt=3B &gt=3B<br>&=
>gt=3B &gt=3BNext step might be to whittle down the tests and see if you can=
> get a failu=3D<br>&gt=3B &gt=3Bre with<br>&gt=3B &gt=3Ba single test runni=
>ng and -n 2.  That would likely be the simplest scenario=3D<br>&gt=3B &gt=
>=3B to<br>&gt=3B &gt=3Bstart further debugging from.<br>&gt=3B &gt=3B<br>&g=
>t=3B &gt=3B     Mika<br>&gt=3B &gt=3B<br>&gt=3B &gt=3B"Coleburn=2C Randy" w=
>rites:<br>&gt=3B &gt=3B&gt=3BMika et al:<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &=
>gt=3B&gt=3BThought I would try something else.<br>&gt=3B &gt=3B&gt=3B<br>&g=
>t=3B &gt=3B&gt=3BI took the sources of your thread test program to an older=
> XP machine that=3D<br>&gt=3B &gt=3B =3D3D<br>&gt=3B &gt=3B&gt=3Bhas CM3 ci=
>rca August 2008.  This is the machine and implementation I used =3D<br>&gt=
>=3B &gt=3Bw=3D3D<br>&gt=3B &gt=3B&gt=3Bhen building a major project I did a=
> couple years back.<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BThe thread=
> test program does indeed build on this old system=2C but when I r=3D<br>&g=
>t=3B &gt=3Bu=3D3D<br>&gt=3B &gt=3B&gt=3Bn it=2C I get different results tha=
>n with the latest HEAD branch code. =3D3D20<br>&gt=3B &gt=3B&gt=3B<br>&gt=
>=3B &gt=3B&gt=3BAfter it prints "running...printing oldest/median age/newes=
>t"=2C on the next=3D<br>&gt=3B &gt=3B =3D3D<br>&gt=3B &gt=3B&gt=3Bline I ge=
>t two periods ".." and now the program seems hung.  I'll let it "=3D<br>&gt=
>=3B &gt=3Br=3D3D<br>&gt=3B &gt=3B&gt=3Bun" for a few more minutes to see if=
> anything else happens before killing =3D<br>&gt=3B &gt=3Bi=3D3D<br>&gt=3B =
>&gt=3B&gt=3Bt.<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BAt least we don=
>'t get the subscript and assertion failures on this older C=3D<br>&gt=3B &g=
>t=3BM=3D3D<br>&gt=3B &gt=3B&gt=3B3 platform.<br>&gt=3B &gt=3B&gt=3B<br>&gt=
>=3B &gt=3B&gt=3BRegards=2C<br>&gt=3B &gt=3B&gt=3BRandy Coleburn<br>&gt=3B &=
>gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B-----Original Mess=
>age-----<br>&gt=3B &gt=3B&gt=3BFrom: Coleburn=2C Randy=3D3D20<br>&gt=3B &gt=
>=3B&gt=3BSent: Sunday=2C February 27=2C 2011 2:09 PM<br>&gt=3B &gt=3B&gt=3B=
>To: m3devel at elegosoft.com<br>&gt=3B &gt=3B&gt=3BSubject: Re: [M3devel] resu=
>lts of threadtest program on Windows7<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=
>=3B&gt=3BMika:<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BOk=2C I've upda=
>ted to latest HEAD and I've also built Jay's m3sleep program.<br>&gt=3B &gt=
>=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BHere is what happens now when I run your th=
>readtest program on Windows 7.<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=
>=3BC:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386&gt=3Bthreadtest -tests =
>ALL=2C-fo=3D<br>&gt=3B &gt=3Br=3D3D<br>&gt=3B &gt=3B&gt=3Bk<br>&gt=3B &gt=
>=3B&gt=3BWriting file...done<br>&gt=3B &gt=3B&gt=3BCreating read threads...=
>done<br>&gt=3B &gt=3B&gt=3BCreating nxread threads...done<br>&gt=3B &gt=3B&=
>gt=3BCreating tryexcept threads...done<br>&gt=3B &gt=3B&gt=3BCreating forkt=
>oomuch threads...done<br>&gt=3B &gt=3B&gt=3BCreating alloc threads...done<b=
>r>&gt=3B &gt=3B&gt=3BCreating creat threads...done<br>&gt=3B &gt=3B&gt=3BCr=
>eating lock threads...done<br>&gt=3B &gt=3B&gt=3Brunning...printing oldest/=
>median age/newest<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &=
>gt=3B&gt=3B***<br>&gt=3B &gt=3B&gt=3B*** runtime error:<br>&gt=3B &gt=3B&gt=
>=3B***    An array subscript was out of range.<br>&gt=3B &gt=3B&gt=3B***   =
> file "..\src\runtime\common\RTCollector.m3"=2C line 418<br>&gt=3B &gt=3B&g=
>t=3B***<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=
>=3B<br>&gt=3B &gt=3B&gt=3B***<br>&gt=3B &gt=3B&gt=3B*** runtime error:<br>&=
>gt=3B &gt=3B&gt=3B***    &lt=3B*ASSERT*&gt=3B failed.<br>&gt=3B &gt=3B&gt=
>=3B***    file "..\src\thread\WIN32\ThreadWin32.m3"=2C line 841<br>&gt=3B &=
>gt=3B&gt=3B***<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BThe last error =
>repeats ad infinitum until I press CNTRL-C to abort.<br>&gt=3B &gt=3B&gt=3B=
><br>&gt=3B &gt=3B&gt=3BI'll send more info on the Windows install of Modula=
>3 in a subsequent post=3D<br>&gt=3B &gt=3B.<br>&gt=3B &gt=3B&gt=3B<br>&gt=
>=3B &gt=3B&gt=3BRegards=2C<br>&gt=3B &gt=3B&gt=3BRandy Coleburn<br>&gt=3B &=
>gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B-----Original Message-----<br>&gt=3B &gt=
>=3B&gt=3BFrom: Mika Nystrom [mailto:mika at async.caltech.edu]=3D3D20<br>&gt=
>=3B &gt=3B&gt=3BSent: Saturday=2C February 26=2C 2011 12:55 PM<br>&gt=3B &g=
>t=3B&gt=3BTo: Coleburn=2C Randy<br>&gt=3B &gt=3B&gt=3BCc: m3devel at elegosoft=
>.com<br>&gt=3B &gt=3B&gt=3BSubject: Re: [M3devel] results of threadtest pro=
>gram on Windows7=3D3D20<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BHi Ran=
>dy=2C<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BHm yes it looks like my =
>Windows programming skills leave something<br>&gt=3B &gt=3B&gt=3Bto be desi=
>red.<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BYou can run the thread te=
>ster while skipping a test as follows<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=
>=3B&gt=3B   threadtest -tests ALL=2C-fork<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B =
>&gt=3B&gt=3B(for instance)<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3Bif =
>you just run=3D3D20<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B   threadt=
>est -sadfassdaf<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3Bit'll print th=
>e tests that are available.<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3BAs=
> it happens=2C I just had to upgrade my windows 2000 system to windows 7.<b=
>r>&gt=3B &gt=3B&gt=3BCan you give me a very brief description of what you d=
>id to install Modula=3D<br>&gt=3B &gt=3B-=3D3D<br>&gt=3B &gt=3B&gt=3B3<br>&=
>gt=3B &gt=3B&gt=3Bon this system?<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&g=
>t=3B     Mika<br>&gt=3B &gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B"Coleburn=2C Ran=
>dy" writes:<br>&gt=3B &gt=3B&gt=3B&gt=3B--_000_D67F02DDC62F7545A6B84C285F88=
>F3E6EE25C849atlex02srv_<br>&gt=3B &gt=3B&gt=3B&gt=3BContent-Type: text/plai=
>n=3B charset=3D3D3D"us-ascii"<br>&gt=3B &gt=3B&gt=3B&gt=3BContent-Transfer-=
>Encoding: quoted-printable<br>&gt=3B &gt=3B&gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=
>=3B&gt=3BMika:<br>&gt=3B &gt=3B&gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B&gt=3BI'v=
>e finally managed to get cm3 rebuilt on Windows 7 again.<br>&gt=3B &gt=3B&g=
>t=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B&gt=3BSo=2C I ran your threadtest program.=
><br>&gt=3B &gt=3B&gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B&gt=3BHere are the resu=
>lts.  Note the "..." is where I cut out a bunch of the r=3D<br>&gt=3B &gt=
>=3Be=3D3D<br>&gt=3B &gt=3B&gt=3Bp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Beating=
> "ERROR FApply" messages.<br>&gt=3B &gt=3B&gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=
>=3B&gt=3BC:\cm3\Sandbox\m3-libs\m3core\tests\thread\NT386&gt=3Bthreadtest.e=
>xe<br>&gt=3B &gt=3B&gt=3B&gt=3BWriting file...done<br>&gt=3B &gt=3B&gt=3B&g=
>t=3BCreating read threads...done<br>&gt=3B &gt=3B&gt=3B&gt=3BCreating fork =
>threads...done<br>&gt=3B &gt=3B&gt=3B&gt=3BCreating alloc threads...done<br=
>>&gt=3B &gt=3B&gt=3B&gt=3BCreating lock threads...done<br>&gt=3B &gt=3B&gt=
>=3B&gt=3Brunning...printing oldest/median age/newest<br>&gt=3B &gt=3B&gt=3B=
>&gt=3BERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find=
> the f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=
>=3B &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OS=
>Error.E:  ErrorCode=3D3D3D3D2: The system cannot find the f=3D<br>&gt=3B &g=
>t=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Be=
>cified.<br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSError.E:  ErrorCode=3D3=
>D3D3D2: The system cannot find the f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B =
>&gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=
>=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3B=
>.<br>&gt=3B &gt=3B&gt=3B&gt=3B***<br>&gt=3B &gt=3B&gt=3B&gt=3B*** runtime e=
>rror:<br>&gt=3B &gt=3B&gt=3B&gt=3B***    An enumeration or subrange value w=
>as out of range.<br>&gt=3B &gt=3B&gt=3B&gt=3B***    file "..\src\Main.m3"=
>=2C line 340<br>&gt=3B &gt=3B&gt=3B&gt=3B***<br>&gt=3B &gt=3B&gt=3B&gt=3B<b=
>r>&gt=3B &gt=3B&gt=3B&gt=3Blaziest thread is 0/0/ERROR FApply: OSError.E:  =
>ErrorCode=3D3D3D3D2: The sy=3D<br>&gt=3B &gt=3Bste=3D3D<br>&gt=3B &gt=3B&gt=
>=3Bm c=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Bannot find the file specified.<br=
>>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: Th=
>e system cannot find the f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&gt=
>=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B&g=
>t=3BERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find t=
>he f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B=
> &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSErr=
>or.E:  ErrorCode=3D3D3D3D2: The system cannot find the f=3D<br>&gt=3B &gt=
>=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Bec=
>ified.<br>&gt=3B &gt=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3B.<br>&gt=
>=3B &gt=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3Blaziest thread is 0/0/E=
>RROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The sy=3D<br>&gt=3B &gt=3Bste=
>=3D3D<br>&gt=3B &gt=3B&gt=3Bm c=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Bannot fi=
>nd the file specified.<br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSError.E:=
>  ErrorCode=3D3D3D3D2: The system cannot find the f=3D<br>&gt=3B &gt=3Bile=
>=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Becified.=
><br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2:=
> The system cannot find the f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&=
>gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B=
>&gt=3BERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find=
> the f=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=
>=3B &gt=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B&gt=3B.<br>&gt=3B &gt=
>=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3B.<br>&gt=3B &gt=3B&gt=3B&gt=3B=
>ERROR FApply: OSError.E:  ErrorCode=3D3D3D3D2: The system cannot find the f=
>=3D<br>&gt=3B &gt=3Bile=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=
>=3B&gt=3B&gt=3Becified.<br>&gt=3B &gt=3B&gt=3B&gt=3BERROR FApply: OSError.E=
>:  ErrorCode=3D3D3D3D2: The system cannot find the f=3D<br>&gt=3B &gt=3Bile=
>=3D3D<br>&gt=3B &gt=3B&gt=3B sp=3D3D3D<br>&gt=3B &gt=3B&gt=3B&gt=3Becified.=
><br>&gt=3B &gt=3B&gt=3B&gt=3BStack trace:<br>&gt=3B &gt=3B&gt=3B&gt=3B   FP=
>         PC      Procedure<br>&gt=3B &gt=3B&gt=3B&gt=3B---------  ---------=
>  -------------------------------<br>&gt=3B &gt=3B&gt=3B&gt=3B0x30fbd0  0x1=
>27218a  PutStats + 0x1a3 in ..\src\Main.m3<br>&gt=3B &gt=3B&gt=3B&gt=3B0x30=
>fcc0  0x1273825  Main_M3 + 0x11db(!) in ..\src\Main.m3<br>&gt=3B &gt=3B&gt=
>=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B&gt=3BRegards=2C<br>&gt=3B &gt=3B&gt=3B&gt=
>=3BRandy Coleburn<br>&gt=3B &gt=3B&gt=3B&gt=3B<br>&gt=3B &gt=3B&gt=3B&gt=3B=
>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_<br>&gt=3B &gt=3B=
>&gt=3B&gt=3BContent-Type: text/html=3B charset=3D3D3D"us-ascii"<br>&gt=3B &=
>gt=3B&gt=3B&gt=3BContent-Transfer-Encoding: quoted-printable<br>&gt=3B &gt=
>=3B&gt=3B&gt=3B<br> 		 	   		  </body>
></html>=
>
>--_93dad88e-7ca3-48ac-a7dc-f4777a03b794_--



More information about the M3devel mailing list