[M3devel] results of threadtest program on Windows7

Jay K jay.krell at cornell.edu
Thu Mar 3 07:37:49 CET 2011


Here is another failure also I386_DARWIN.


(gdb) break RTError__MsgS
Breakpoint 2 at 0x3b65f: file ../src/runtime/common/RTError.m3, line 30.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /Users/jay/dev2/cm3/m3-libs/m3core/tests/thread/I386_DARWIN/threadtest 
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
..[Switching to process 86430 thread 0x1503]

Breakpoint 2, RTError__MsgS (file=0x7f441, line=418, msgA=0x800e8, msgB=0x7d250, msgC=0x800e8) at ../src/runtime/common/RTError.m3:30
30        StartError (msgA, msgB, msgC);
(gdb) bt
#0  RTError__MsgS (file=0x7f441, line=418, msgA=0x800e8, msgB=0x7d250, msgC=0x800e8) at ../src/runtime/common/RTError.m3:30
#1  0x0003bdc7 in RTException__Crash (a=0xb040ea64, raises=0 '\0', rte=0x7d100) at ../src/runtime/common/RTException.m3:79
#2  0x0003bb21 in RTException__DefaultBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:39
#3  0x0003ba7c in RTException__InvokeBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#4  0x00043ca5 in RTException__Raise (act=0xb040ea64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#5  0x0003bbb4 in RTException__DefaultBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:47
#6  0x0003ba7c in RTException__InvokeBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#7  0x00043ca5 in RTException__Raise (act=0xb040ea64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#8  0x0002b102 in RTHooks__ReportFault (module=0x70f80, info=13378) at ../src/runtime/common/RTHooks.m3:111
#9  0x000394c5 in _m3_fault (arg=13378) at ../src/runtime/common/RTCollector.m3:393
#10 0x0002fdd2 in RTCollector__Move (self=0xb4000c, cp=0xba0014) at ../src/runtime/common/RTCollector.m3:418
#11 0x0002e503 in RTHeapMap__Walk (x=0xba0014, pc=0x79928, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:202
#12 0x0002dc9c in RTHeapMap__DoWalkRef (t=0x6de54, a=0xba0014, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:62
#13 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e3f4, a=0xba000c, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:57
#14 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e508, a=0xba000c, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:57
#15 0x0002dc2e in RTHeapMap__WalkRef (h=0xba0008, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:47
#16 0x00032279 in RTCollector__CleanBetween (h=0xba0008, he=0xbb0000, clean=0 '\0') at ../src/runtime/common/RTCollector.m3:1091
#17 0x00032098 in RTCollector__CleanPage (page=0xba0000) at ../src/runtime/common/RTCollector.m3:1064
#18 0x00031798 in RTCollector__CollectSomeInStateZero () at ../src/runtime/common/RTCollector.m3:885
#19 0x00030e75 in RTCollector__CollectSome () at ../src/runtime/common/RTCollector.m3:720
#20 0x00030a97 in RTHeapRep__CollectEnough () at ../src/runtime/common/RTCollector.m3:654
#21 0x0002cb85 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00e74) at ../src/runtime/common/RTAllocator.m3:367
#22 0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:296
#23 0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:143
#24 0x00003b5f in Main__AApply (cl=0x9556c0) at ../src/Main.m3:260
#25 0x00046ee2 in ThreadPThread__RunThread (me=0xa00e30) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#26 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00e30) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#27 0x93889155 in _pthread_start ()
#28 0x93889012 in thread_start ()
(gdb) threads apply all bt
Undefined command: "threads".  Try "help".
(gdb) thread apply all bt

Thread 13 (process 86430 thread 0x1903):
#0  0x9388a6f1 in semaphore_wait_signal ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa00880) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x9557d8) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa010f0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa010f0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 12 (process 86430 thread 0x1803):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa00880) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x9557a0) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa01040) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa01040) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 11 (process 86430 thread 0x1703):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa00880) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x955768) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa00f90) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00f90) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 10 (process 86430 thread 0x1603):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00f24) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb0490e78) at ../src/runtime/common/RTAllocator.m3:296
#6  0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb0490e78) at ../src/runtime/common/RTAllocator.m3:143
#7  0x00003b5f in Main__AApply (cl=0x9556f8) at ../src/Main.m3:260
#8  0x00046ee2 in ThreadPThread__RunThread (me=0xa00ee0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#9  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00ee0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#10 0x93889155 in _pthread_start ()
#11 0x93889012 in thread_start ()

Thread 9 (process 86430 thread 0x1503):
#0  RTError__MsgS (file=0x7f441, line=418, msgA=0x800e8, msgB=0x7d250, msgC=0x800e8) at ../src/runtime/common/RTError.m3:30
#1  0x0003bdc7 in RTException__Crash (a=0xb040ea64, raises=0 '\0', rte=0x7d100) at ../src/runtime/common/RTException.m3:79
#2  0x0003bb21 in RTException__DefaultBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:39
#3  0x0003ba7c in RTException__InvokeBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#4  0x00043ca5 in RTException__Raise (act=0xb040ea64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#5  0x0003bbb4 in RTException__DefaultBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:47
#6  0x0003ba7c in RTException__InvokeBackstop (a=0xb040ea64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#7  0x00043ca5 in RTException__Raise (act=0xb040ea64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#8  0x0002b102 in RTHooks__ReportFault (module=0x70f80, info=13378) at ../src/runtime/common/RTHooks.m3:111
#9  0x000394c5 in _m3_fault (arg=13378) at ../src/runtime/common/RTCollector.m3:393
#10 0x0002fdd2 in RTCollector__Move (self=0xb4000c, cp=0xba0014) at ../src/runtime/common/RTCollector.m3:418
#11 0x0002e503 in RTHeapMap__Walk (x=0xba0014, pc=0x79928, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:202
#12 0x0002dc9c in RTHeapMap__DoWalkRef (t=0x6de54, a=0xba0014, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:62
#13 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e3f4, a=0xba000c, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:57
#14 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e508, a=0xba000c, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:57
#15 0x0002dc2e in RTHeapMap__WalkRef (h=0xba0008, v=0xb4000c) at ../src/runtime/common/RTHeapMap.m3:47
#16 0x00032279 in RTCollector__CleanBetween (h=0xba0008, he=0xbb0000, clean=0 '\0') at ../src/runtime/common/RTCollector.m3:1091
#17 0x00032098 in RTCollector__CleanPage (page=0xba0000) at ../src/runtime/common/RTCollector.m3:1064
#18 0x00031798 in RTCollector__CollectSomeInStateZero () at ../src/runtime/common/RTCollector.m3:885
#19 0x00030e75 in RTCollector__CollectSome () at ../src/runtime/common/RTCollector.m3:720
#20 0x00030a97 in RTHeapRep__CollectEnough () at ../src/runtime/common/RTCollector.m3:654
#21 0x0002cb85 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00e74) at ../src/runtime/common/RTAllocator.m3:367
#22 0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:296
#23 0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:143
#24 0x00003b5f in Main__AApply (cl=0x9556c0) at ../src/Main.m3:260
#25 0x00046ee2 in ThreadPThread__RunThread (me=0xa00e30) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#26 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00e30) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#27 0x93889155 in _pthread_start ()
#28 0x93889012 in thread_start ()

Thread 8 (process 86430 thread 0x1403):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00dc4) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb038ce78) at ../src/runtime/common/RTAllocator.m3:296
#6  0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb038ce78) at ../src/runtime/common/RTAllocator.m3:143
#7  0x00003b5f in Main__AApply (cl=0x955688) at ../src/Main.m3:260
#8  0x00046ee2 in ThreadPThread__RunThread (me=0xa00d80) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#9  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00d80) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#10 0x93889155 in _pthread_start ()
#11 0x93889012 in thread_start ()

Thread 7 (process 86430 thread 0x1303):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86436, j=0xb030ad9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86436, status=0xb030ad9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0xb00018) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x955618) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00d20) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00d20) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 6 (process 86430 thread 0x1203):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86437, j=0xb0288d9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86437, status=0xb0288d9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0xbd0018) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x9555e0) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00b30) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00b30) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 5 (process 86430 thread 0x1103):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86435, j=0xb0206d9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86435, status=0xb0206d9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0xc2000c) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x9555a8) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00a80) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00a80) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 4 (process 86430 thread 0x1003):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=12, dataAlignment=4, thread=0xa00a14) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002bf13 in RTAllocator__GetTracedObj (def=0x6d1b4) at ../src/runtime/common/RTAllocator.m3:224
#6  0x0002b98a in RTHooks__AllocateTracedObj (defn=0x6d1b4) at ../src/runtime/common/RTAllocator.m3:122
#7  0x00008eeb in FilePosix__New (fd=5, ds=1) at ../src/os/POSIX/FilePosix.m3:63
#8  0x0000a4eb in FS__OpenFileReadonly (pn=0x775b8) at ../src/os/POSIX/FSPosix.m3:182
#9  0x00014dfa in FileRd__Open (p=0x775b8) at ../src/rw/FileRd.m3:16
#10 0x00003046 in Main__RApply (cl=0x955538) at ../src/Main.m3:174
#11 0x00046ee2 in ThreadPThread__RunThread (me=0xa009d0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#12 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa009d0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#13 0x93889155 in _pthread_start ()
#14 0x93889012 in thread_start ()

Thread 3 (process 86430 thread 0x117):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x74220) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00044f3a in ThreadPThread__InitMutex (m=0x960010, root=0x96000c, Clean=0x44dac) at ../src/thread/PTHREAD/ThreadPThread.m3:101
#4  0x0004500b in ThreadPThread__LockMutex (m=0x96000c) at ../src/thread/PTHREAD/ThreadPThread.m3:117
#5  0x0000e060 in Rd__GetChar (rd=0x96000c) at ../src/rw/Rd.m3:33
#6  0x000030b5 in Main__RApply (cl=0x955500) at ../src/Main.m3:177
#7  0x00046ee2 in ThreadPThread__RunThread (me=0xa00920) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#8  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00920) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#9  0x93889155 in _pthread_start ()
#10 0x93889012 in thread_start ()

Thread 2 (process 86430 thread 0x313):
#0  0x938582a2 in semaphore_wait_trap ()
#1  0x9385fd92 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x00036509 in RTHeapRep__RegisterFinalCleanup (r=0x9b1050, p=0x44dac) at ../src/runtime/common/RTCollector.m3:2148
#5  0x00044fa2 in ThreadPThread__InitMutex (m=0x9b1054, root=0x9b1050, Clean=0x44dac) at ../src/thread/PTHREAD/ThreadPThread.m3:106
#6  0x0004500b in ThreadPThread__LockMutex (m=0x9b1050) at ../src/thread/PTHREAD/ThreadPThread.m3:117
#7  0x0000e060 in Rd__GetChar (rd=0x9b1050) at ../src/rw/Rd.m3:33
#8  0x000030b5 in Main__RApply (cl=0x9554c8) at ../src/Main.m3:177
#9  0x00046ee2 in ThreadPThread__RunThread (me=0xa007f0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#10 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa007f0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#11 0x93889155 in _pthread_start ()
#12 0x93889012 in thread_start ()

Thread 1 (process 86430 local thread 0x4507):
#0  0x9385f44e in __semwait_signal ()
#1  0x9388a3e6 in _pthread_cond_wait ()
#2  0x938af9f8 in pthread_cond_timedwait$UNIX2003 ()
#3  0x0004a99a in ThreadPThread__pthread_cond_timedwait (cond=0xa003e0, mutex=0xa003b0, m3timeout=1299134070.4957981) at ../src/thread/PTHREAD/ThreadPThreadC.c:451
#4  0x000477a0 in ThreadPThread__XPause (self=0xa00350, n=1, alertable=0 '\0') at ../src/thread/PTHREAD/ThreadPThread.m3:552
#5  0x00047877 in Thread__Pause (n=1) at ../src/thread/PTHREAD/ThreadPThread.m3:567
#6  0x00005d5f in Main_M3 (mode=1) at ../src/Main.m3:494
#7  0x0003ab84 in RTLinker__RunMainBody (m=0x6c020) at ../src/runtime/common/RTLinker.m3:406
#8  0x00039fb9 in RTLinker__AddUnitI (m=0x6c020) at ../src/runtime/common/RTLinker.m3:113
#9  0x0003a03d in RTLinker__AddUnit (b=0x4a6e) at ../src/runtime/common/RTLinker.m3:122
#10 0x00002d32 in main (argc=1, argv=0xbffff8d8, envp=0xbffff8e0) at _m3main.c:16

 - Jay


From: jay.krell at cornell.edu
To: dabenavidesd at yahoo.es; rcolebur at scires.com; m3devel at elegosoft.com
Subject: RE: [M3devel] results of threadtest program on Windows7
Date: Thu, 3 Mar 2011 06:32:50 +0000








Solaris doesn't hang now. I didn't change anything. And it succeeds.
Here are some stacks for a failure on I386_DARWIN.
Notice that it *should* abort right after the EBUSY print, but it still run a while.
Possibly too much information is lost.


(gdb) run
Starting program: /Users/jay/dev2/cm3/m3-libs/m3core/tests/thread/I386_DARWIN/threadtest 
Reading symbols for shared libraries ++. done
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 1/0/0 (tests: read 0/0/0 fork 1/1/1 alloc 0/0/0 lock 0/0/0)
.........pthread_mutex_destroy:EBUSY (0)
.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", line 418
***


Program received signal SIGABRT, Aborted.
0x9385f44e in __semwait_signal ()
(gdb) bt
#0  0x9385f44e in __semwait_signal ()
#1  0x9388a3e6 in _pthread_cond_wait ()
#2  0x938af9f8 in pthread_cond_timedwait$UNIX2003 ()
#3  0x0004a99a in ThreadPThread__pthread_cond_timedwait (cond=0xa003e0, mutex=0xa003b0, m3timeout=1299133562.375689) at ../src/thread/PTHREAD/ThreadPThreadC.c:451
#4  0x000477a0 in ThreadPThread__XPause (self=0xa00350, n=1, alertable=0 '\0') at ../src/thread/PTHREAD/ThreadPThread.m3:552
#5  0x00047877 in Thread__Pause (n=1) at ../src/thread/PTHREAD/ThreadPThread.m3:567
#6  0x00005d5f in Main_M3 (mode=1) at ../src/Main.m3:494
#7  0x0003ab84 in RTLinker__RunMainBody (m=0x6c020) at ../src/runtime/common/RTLinker.m3:406
#8  0x00039fb9 in RTLinker__AddUnitI (m=0x6c020) at ../src/runtime/common/RTLinker.m3:113
#9  0x0003a03d in RTLinker__AddUnit (b=0x4a6e) at ../src/runtime/common/RTLinker.m3:122
#10 0x00002d32 in main (argc=1, argv=0xbffff8d8, envp=0xbffff8e0) at _m3main.c:16


(gdb) thread apply all bt

Thread 13 (process 86311 thread 0x2a03):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa008f0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x9557d8) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa01130) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa01130) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 12 (process 86311 thread 0x1f03):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa008f0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x9557a0) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa01080) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa01080) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 11 (process 86311 thread 0x1e03):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa008f0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x0004503c in ThreadPThread__LockMutex (m=0x9542b8) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#4  0x00003ed8 in Main__LApply (cl=0x955768) at ../src/Main.m3:290
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa00fd0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00fd0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 10 (process 86311 thread 0x1d03):
#0  0x93934136 in __semwait_signal_nocancel ()
#1  0x93933d1b in nanosleep$NOCANCEL$UNIX2003 ()
#2  0x9392d013 in usleep$NOCANCEL$UNIX2003 ()
#3  0x93944685 in abort ()
#4  0x0004b5e6 in Cstdlib__abort () at ../src/C/Common/CstdlibC.c:21
#5  0x000434dd in RTOS__Crash () at ../src/runtime/POSIX/RTOS.m3:20
#6  0x0003d51f in RTProcess__Crash (msg=0x0) at ../src/runtime/common/RTProcess.m3:65
#7  0x0003b9d3 in RTError__EndError (crash=1 '\001') at ../src/runtime/common/RTError.m3:118
#8  0x0003b6e6 in RTError__MsgS (file=0x7f441, line=418, msgA=0x800e8, msgB=0x7d250, msgC=0x800e8) at ../src/runtime/common/RTError.m3:40
#9  0x0003bdc7 in RTException__Crash (a=0xb0490a64, raises=0 '\0', rte=0x7d100) at ../src/runtime/common/RTException.m3:79
#10 0x0003bb21 in RTException__DefaultBackstop (a=0xb0490a64, raises=0 '\0') at ../src/runtime/common/RTException.m3:39
#11 0x0003ba7c in RTException__InvokeBackstop (a=0xb0490a64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#12 0x00043ca5 in RTException__Raise (act=0xb0490a64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#13 0x0003bbb4 in RTException__DefaultBackstop (a=0xb0490a64, raises=0 '\0') at ../src/runtime/common/RTException.m3:47
#14 0x0003ba7c in RTException__InvokeBackstop (a=0xb0490a64, raises=0 '\0') at ../src/runtime/common/RTException.m3:25
#15 0x00043ca5 in RTException__Raise (act=0xb0490a64) at ../src/runtime/ex_frame/RTExFrame.m3:85
#16 0x0002b102 in RTHooks__ReportFault (module=0x70f80, info=13378) at ../src/runtime/common/RTHooks.m3:111
#17 0x000394c5 in _m3_fault (arg=13378) at ../src/runtime/common/RTCollector.m3:393
#18 0x0002fdd2 in RTCollector__Move (self=0xb3000c, cp=0x9a0014) at ../src/runtime/common/RTCollector.m3:418
#19 0x0002e503 in RTHeapMap__Walk (x=0x9a0014, pc=0x79928, v=0xb3000c) at ../src/runtime/common/RTHeapMap.m3:202
#20 0x0002dc9c in RTHeapMap__DoWalkRef (t=0x6de54, a=0x9a0014, v=0xb3000c) at ../src/runtime/common/RTHeapMap.m3:62
#21 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e3f4, a=0x9a000c, v=0xb3000c) at ../src/runtime/common/RTHeapMap.m3:57
#22 0x0002dc77 in RTHeapMap__DoWalkRef (t=0x6e508, a=0x9a000c, v=0xb3000c) at ../src/runtime/common/RTHeapMap.m3:57
#23 0x0002dc2e in RTHeapMap__WalkRef (h=0x9a0008, v=0xb3000c) at ../src/runtime/common/RTHeapMap.m3:47
#24 0x00032279 in RTCollector__CleanBetween (h=0x9a0008, he=0x9b0000, clean=0 '\0') at ../src/runtime/common/RTCollector.m3:1091
#25 0x00032098 in RTCollector__CleanPage (page=0x9a0000) at ../src/runtime/common/RTCollector.m3:1064
#26 0x00031798 in RTCollector__CollectSomeInStateZero () at ../src/runtime/common/RTCollector.m3:885
#27 0x00030e75 in RTCollector__CollectSome () at ../src/runtime/common/RTCollector.m3:720
#28 0x00030a97 in RTHeapRep__CollectEnough () at ../src/runtime/common/RTCollector.m3:654
#29 0x0002cb85 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00f64) at ../src/runtime/common/RTAllocator.m3:367
#30 0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb0490e78) at ../src/runtime/common/RTAllocator.m3:296
#31 0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb0490e78) at ../src/runtime/common/RTAllocator.m3:143
#32 0x00003b5f in Main__AApply (cl=0x9556f8) at ../src/Main.m3:260
#33 0x00046ee2 in ThreadPThread__RunThread (me=0xa00f20) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#34 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00f20) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#35 0x93889155 in _pthread_start ()
#36 0x93889012 in thread_start ()

Thread 9 (process 86311 thread 0x1c03):
#0  0x938582a2 in semaphore_wait_trap ()
#1  0x9385fd92 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00eb4) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:296
#6  0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb040ee78) at ../src/runtime/common/RTAllocator.m3:143
#7  0x00003b5f in Main__AApply (cl=0x9556c0) at ../src/Main.m3:260
#8  0x00046ee2 in ThreadPThread__RunThread (me=0xa00e70) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#9  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00e70) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#10 0x93889155 in _pthread_start ()
#11 0x93889012 in thread_start ()

Thread 8 (process 86311 thread 0x1b03):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=4108, dataAlignment=4, thread=0xa00e04) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002c5d6 in RTAllocator__GetOpenArray (def=0x6fe30, s=0xb038ce78) at ../src/runtime/common/RTAllocator.m3:296
#6  0x0002ba2d in RTHooks__AllocateOpenArray (defn=0x6fe30, s=0xb038ce78) at ../src/runtime/common/RTAllocator.m3:143
#7  0x00003b5f in Main__AApply (cl=0x955688) at ../src/Main.m3:260
#8  0x00046ee2 in ThreadPThread__RunThread (me=0xa00dc0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#9  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00dc0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#10 0x93889155 in _pthread_start ()
#11 0x93889012 in thread_start ()

Thread 7 (process 86311 thread 0x1a03):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86384, j=0xb030ad9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86384, status=0xb030ad9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0xb00018) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x955618) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00d60) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00d60) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 6 (process 86311 thread 0x1903):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86385, j=0xb0288d9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86385, status=0xb0288d9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0xbd000c) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x9555e0) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00b70) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00b70) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 5 (process 86311 thread 0x1803):
#0  0x9389c856 in __wait4 ()
#1  0x9389c847 in waitpid$UNIX2003 ()
#2  0x0004b222 in Uexec__waitpid (i=86386, j=0xb0206d9c, k=0) at ../src/unix/Common/Uexec.c:67
#3  0x00047d6e in SchedulerPosix__WaitProcess (pid=86386, status=0xb0206d9c) at ../src/thread/PTHREAD/ThreadPThread.m3:657
#4  0x0000d66a in Process__Wait (p=0x9d0018) at ../src/os/POSIX/ProcessPosixCommon.m3:275
#5  0x00003719 in Main__FApply (cl=0x9555a8) at ../src/Main.m3:230
#6  0x00046ee2 in ThreadPThread__RunThread (me=0xa00ac0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#7  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00ac0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#8  0x93889155 in _pthread_start ()
#9  0x93889012 in thread_start ()

Thread 4 (process 86311 thread 0x1103):
#0  0x9385fb99 in pthread_mutex_lock ()
#1  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0xa00c20) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#2  0x0004503c in ThreadPThread__LockMutex (m=0xb6000c) at ../src/thread/PTHREAD/ThreadPThread.m3:119
#3  0x0000e060 in Rd__GetChar (rd=0xb6000c) at ../src/rw/Rd.m3:33
#4  0x000030b5 in Main__RApply (cl=0x955538) at ../src/Main.m3:177
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa009d0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa009d0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 3 (process 86311 thread 0x117):
#0  0x93859304 in pthread_getspecific ()
#1  0x0004a529 in ThreadPThread__GetActivation () at ../src/thread/PTHREAD/ThreadPThreadC.c:309
#2  0x00049f52 in RTHooks__PushEFrame (frame=0xb0102d20) at ../src/thread/PTHREAD/ThreadPThread.m3:1385
#3  0x0000e07b in Rd__GetChar (rd=0x99000c) at ../src/rw/Rd.m3:33
#4  0x000030b5 in Main__RApply (cl=0x955500) at ../src/Main.m3:177
#5  0x00046ee2 in ThreadPThread__RunThread (me=0xa00920) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#6  0x00046bd7 in ThreadPThread__ThreadBase (param=0xa00920) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#7  0x93889155 in _pthread_start ()
#8  0x93889012 in thread_start ()

Thread 2 (process 86311 thread 0x313):
#0  0x938582ae in semaphore_wait_signal_trap ()
#1  0x9385fd85 in pthread_mutex_lock ()
#2  0x0004aa18 in ThreadPThread__pthread_mutex_lock (mutex=0x742a0) at ../src/thread/PTHREAD/ThreadPThreadC.c:487
#3  0x00049c56 in RTOS__LockHeap () at ../src/thread/PTHREAD/ThreadPThread.m3:1334
#4  0x0002cb80 in RTAllocator__AllocTraced (dataSize=12, dataAlignment=4, thread=0xa00834) at ../src/runtime/common/RTAllocator.m3:365
#5  0x0002bf13 in RTAllocator__GetTracedObj (def=0x6d1b4) at ../src/runtime/common/RTAllocator.m3:224
#6  0x0002b98a in RTHooks__AllocateTracedObj (defn=0x6d1b4) at ../src/runtime/common/RTAllocator.m3:122
#7  0x00008eeb in FilePosix__New (fd=5, ds=1) at ../src/os/POSIX/FilePosix.m3:63
#8  0x0000a4eb in FS__OpenFileReadonly (pn=0x775b8) at ../src/os/POSIX/FSPosix.m3:182
#9  0x00014dfa in FileRd__Open (p=0x775b8) at ../src/rw/FileRd.m3:16
#10 0x00003046 in Main__RApply (cl=0x9554c8) at ../src/Main.m3:174
#11 0x00046ee2 in ThreadPThread__RunThread (me=0xa007f0) at ../src/thread/PTHREAD/ThreadPThread.m3:450
#12 0x00046bd7 in ThreadPThread__ThreadBase (param=0xa007f0) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#13 0x93889155 in _pthread_start ()
#14 0x93889012 in thread_start ()

Thread 1 (process 86311 local thread 0x2e03):
#0  0x9385f44e in __semwait_signal ()
#1  0x9388a3e6 in _pthread_cond_wait ()
#2  0x938af9f8 in pthread_cond_timedwait$UNIX2003 ()
#3  0x0004a99a in ThreadPThread__pthread_cond_timedwait (cond=0xa003e0, mutex=0xa003b0, m3timeout=1299133562.375689) at ../src/thread/PTHREAD/ThreadPThreadC.c:451
#4  0x000477a0 in ThreadPThread__XPause (self=0xa00350, n=1, alertable=0 '\0') at ../src/thread/PTHREAD/ThreadPThread.m3:552
#5  0x00047877 in Thread__Pause (n=1) at ../src/thread/PTHREAD/ThreadPThread.m3:567
#6  0x00005d5f in Main_M3 (mode=1) at ../src/Main.m3:494
#7  0x0003ab84 in RTLinker__RunMainBody (m=0x6c020) at ../src/runtime/common/RTLinker.m3:406
#8  0x00039fb9 in RTLinker__AddUnitI (m=0x6c020) at ../src/runtime/common/RTLinker.m3:113
#9  0x0003a03d in RTLinker__AddUnit (b=0x4a6e) at ../src/runtime/common/RTLinker.m3:122
#10 0x00002d32 in main (argc=1, argv=0xbffff8d8, envp=0xbffff8e0) at _m3main.c:16







From: jay.krell at cornell.edu
To: dabenavidesd at yahoo.es; rcolebur at scires.com; m3devel at elegosoft.com
Subject: RE: [M3devel] results of threadtest program on Windows7
Date: Thu, 3 Mar 2011 02:46:39 +0000








There is probably a bug in RTCollector.m3 or RTAllocator.m3.

 - Jay

Date: Thu, 3 Mar 2011 02:27:58 +0000
From: dabenavidesd at yahoo.es
Subject: Re: [M3devel] results of threadtest program on Windows7
To: rcolebur at scires.com; m3devel at elegosoft.com; jay.krell at cornell.edu

Hi all:
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.

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.

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.
 
What about results in Win2k ?
Thanks in advance

--- El mié, 2/3/11, Jay K <jay.krell at cornell.edu> escribió:

De: Jay K <jay.krell at cornell.edu>
Asunto: Re: [M3devel] results of threadtest program on Windows7
Para: rcolebur at scires.com, "m3devel" <m3devel at elegosoft.com>
Fecha: miércoles, 2 de marzo, 2011 20:17




Even with the change I made PutCard to PutInt?

That's the only failure I've seen.

I'll try on a non-virtual dual-proc machine later.

 

Thanks,

 - Jay
 



From: rcolebur at SCIRES.COM
To: m3devel at elegosoft.com
Date: Wed, 2 Mar 2011 19:42:47 -0500
Subject: Re: [M3devel] results of threadtest program on Windows7


 



Yes, it fails more often than it runs for me.
Regards,
Randy
 


From: jayk123 at hotmail.com [mailto:jayk123 at hotmail.com] On Behalf Of Jay K
Sent: Tuesday, March 01, 2011 5:59 AM
To: Mika Nystrom; Coleburn, Randy
Cc: m3devel
Subject: RE: [M3devel] results of threadtest program on Windows7
 
I haven't seen it fail on NT, except for PutCard in the test itself getting negative numbers.
I've run it just a few times now. One single and dual processor virtual machines.
Randy, has it failed many times for you?

 - Jay

> To: rcolebur at SCIRES.COM
> Date: Sun, 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
> 
> Ah, it just doesn't check command-line arguments that carefully.
> 
> I think what you did is equivalent to "-tests STD".
> 
> Mika
> 
> "Coleburn, Randy" writes:
> >Mika:
> >
> >No change with "-tests POSIX".
> >
> >Interesting twist: On Windows 7, I thought I'd see what the
 command line o=
> >ptions are, and I typed "threadtest -help" rather than reading the code.
> >
> >First time, it produced what appears to be a NIL deref crash. Then, I trie=
> >d it again and it ran to completion. Something seems non-deterministic her=
> >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 =3D 0x77762262
> >***
> >
> >Stack trace:
> > FP PC Procedure
> >--------- ---------
 -------------------------------
> > 0xcdf998 0x130351b SystemError + 0x64 in ..\src\runtime\NT386\RTSignal.m=
> >3
> > 0xcdf9c0 0x77762262 <???>
> > 0xcdf9d8 0x12e83b7 LockMutex + 0x4f in ..\src\thread\WIN32\ThreadWin32.m=
> >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\ThreadWin32=
> >.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=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
>
 >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >..........laziest thread is 0/0/0 (tests: read 0/0/0 fork 0/0/0 alloc 0/0/0=
> > lock 0/0/0)
> >All tests complete. Congratulations.
> >
> >Regards,
> >Randy Coleburn
> >
> >-----Original Message-----
> >From: Mika Nystrom [mailto:mika at async.caltech.edu]=20
> >Sent: Sunday, February 27, 2011 3:30 PM
> >To: Coleburn, Randy
> >Cc: m3devel at elegosoft.com
> >Subject: Re: [M3devel] results of threadtest program on Windows7=20
> >
> >Hi Randy,
> >
> >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=
> > unfair
> >the thread scheduler is.
> >
> >Next step might be to whittle
 down the tests and see if you can get a failu=
> >re with
> >a single test running and -n 2. That would likely be the simplest scenario=
> > to
> >start further debugging from.
> >
> > Mika
> >
> >"Coleburn, 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 that=
> > =3D
> >>has CM3 circa August 2008. This is the machine and implementation I used =
> >w=3D
> >>hen building a major project I did a couple years back.
> >>
> >>The thread test program does indeed build on this old system, but when I r=
> >u=3D
> >>n it, I get different results than with the latest HEAD branch code. =3D20
> >>
> >>After it prints
 "running...printing oldest/median age/newest", on the next=
> > =3D
> >>line I get two periods ".." and now the program seems hung. I'll let it "=
> >r=3D
> >>un" for a few more minutes to see if anything else happens before killing =
> >i=3D
> >>t.
> >>
> >>At least we don't get the subscript and assertion failures on this older C=
> >M=3D
> >>3 platform.
> >>
> >>Regards,
> >>Randy Coleburn
> >>
> >>
> >>-----Original Message-----
> >>From: Coleburn, Randy=3D20
> >>Sent: Sunday, February 27, 2011 2:09 PM
> >>To: m3devel at elegosoft.com
> >>Subject: Re: [M3devel] results of threadtest program on Windows7
> >>
> >>Mika:
> >>
> >>Ok, I've updated to latest HEAD and I've also built
 Jay's m3sleep program.
> >>
> >>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,-fo=
> >r=3D
> >>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", line 418
> >>***
>
 >>
> >>
> >>
> >>***
> >>*** runtime error:
> >>*** <*ASSERT*> failed.
> >>*** file "..\src\thread\WIN32\ThreadWin32.m3", 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 post=
> >.
> >>
> >>Regards,
> >>Randy Coleburn
> >>
> >>-----Original Message-----
> >>From: Mika Nystrom [mailto:mika at async.caltech.edu]=3D20
> >>Sent: Saturday, February 26, 2011 12:55 PM
> >>To: Coleburn, Randy
> >>Cc: m3devel at elegosoft.com
> >>Subject: Re: [M3devel] results of threadtest program on Windows7=3D20
> >>
> >>Hi Randy,
> >>
> >>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,-fork
> >>
> >>(for instance)
> >>
> >>if you just run=3D20
> >>
> >> threadtest -sadfassdaf
> >>
> >>it'll print the tests that are available.
> >>
> >>As it happens, I just had to upgrade my windows 2000 system to windows 7.
> >>Can you give me a very brief description of what you did to install Modula=
> >-=3D
> >>3
> >>on this system?
> >>
> >> Mika
> >>
> >>"Coleburn, Randy" writes:
> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_
> >>>Content-Type:
 text/plain; charset=3D3D"us-ascii"
> >>>Content-Transfer-Encoding: quoted-printable
> >>>
> >>>Mika:
> >>>
> >>>I've finally managed to get cm3 rebuilt on Windows 7 again.
> >>>
> >>>So, I ran your threadtest program.
> >>>
> >>>Here are the results. Note the "..." is where I cut out a bunch of the r=
> >e=3D
> >>p=3D3D
> >>>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=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>.
> >>>.
> >>>.
> >>>***
> >>>*** runtime error:
> >>>*** An enumeration or subrange value was out of range.
> >>>*** file "..\src\Main.m3", line 340
> >>>***
> >>>
> >>>laziest thread is 0/0/ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The sy=
> >ste=3D
> >>m c=3D3D
> >>>annot find the file
 specified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>.
> >>>.
> >>>.
> >>>laziest thread is 0/0/ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The sy=
> >ste=3D
> >>m c=3D3D
> >>>annot find the file specified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply:
 OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>.
> >>>.
> >>>.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>ERROR FApply: OSError.E: ErrorCode=3D3D3D2: The system cannot find the f=
> >ile=3D
> >> sp=3D3D
> >>>ecified.
> >>>Stack trace:
> >>> FP PC Procedure
> >>>--------- --------- -------------------------------
> >>>0x30fbd0 0x127218a PutStats + 0x1a3 in ..\src\Main.m3
> >>>0x30fcc0 0x1273825 Main_M3 +
 0x11db(!) in ..\src\Main.m3
> >>>
> >>>Regards,
> >>>Randy Coleburn
> >>>
> >>>--_000_D67F02DDC62F7545A6B84C285F88F3E6EE25C849atlex02srv_
> >>>Content-Type: text/html; charset=3D3D"us-ascii"
> >>>Content-Transfer-Encoding: quoted-printable
> >>> 		 	   		  

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110303/e4e568c3/attachment-0002.html>


More information about the M3devel mailing list