[M3devel] Assert failure in ThreadPThread.m3

Tony Hosking hosking at cs.purdue.edu
Sat Feb 21 02:29:05 CET 2009


Rodney,

I see what the problem is.  Please try with the latest version of  
ThreadPThread.m3.

-- Tony


On 21 Feb 2009, at 10:36, Rodney M. Bates wrote:

> I got an assertion failure in ThreadPThread.m3.
>
> Here is a transcript.  Below that is a more helpful backtrace I got by
> manually stopping it as quickly as I could after the assertion failure
> messages.  I think the second backtrace is not on the relevant thread
> however, because commenting out the Thread.Pause does not make the  
> failure
> go away, just makes it harder to catch.
>
> Note: I have a lot of weakref cleanups registered.  Executing
> RTCollector.Disable ( )  early in the program and leaving it
> disabled makes the problem go away.
>
>
> ---------------------------------------------------------------------------------------------------------------------
>
> rodney at yellowstone:~/proj/m3/cm3-new/cm3/m3-libs/m3core/tests/ 
> newtext/src$ m3gdb test
> GNU gdb plus Modula-3 6.4
> Copyright 2005 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and  
> you are
> welcome to change it and/or distribute copies of it under certain  
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for  
> details.
> This GDB was configured as "i686-pc-linux-gnu"...Using host  
> libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
>
> (m3gdb) run -nos
> Starting program: /home/rodney/proj/m3/cm3-new/cm3/m3-libs/m3core/ 
> tests/newtext/src/test -nos
> Signal        Stop      Print   Pass to program Description
> SIG64         No        No      Yes             Real-time event 64
> [Thread debugging using libthread_db enabled]
> [New LWP 32595]
> Estimating overhead of timing.
> Generating initial leaf strings.
> Generating initial leaf strings.
>
>      0\
> Garbage collection disabled for better timing.
>
>     62[New Thread -1220703344 (LWP 32598)]
> [New Thread -1220429104 (LWP 32595)]
> ....+....1....+....2....+....3....+....4....+....|
>   5000....+....6....+....7....+....8....+....9....+....|
>  10000....+....1....+....2....+....3....+....4....+....|
>  15000....+....6....+....7....+....8....+....9....+....|
>  20000....+....1....+....2....+....3....+....4....+....|
>  25000....+....6....+....7....+....8....+....9....+....|
>  30000....+....1....+....2....+....3....+....4....+....|
>  35000....+....6....+....7....+....8....+....9....+....|
>  40000....+....1....+....2....+....3....+....4....+....|
>  45000....+....6....+....7....+....8....+....9....+....|
>  50000
>
> Garbage collection enabled and triggered ...
>
> ***
> *** runtime error:
> ***    <*ASSERT*> failed.
> ***    file "../src/thread/PTHREAD/ThreadPThread.m3", line 1449
> ***
>
> Garbage collection completed.
>
> Program received signal SIGINT, Interrupt.
> [Switching to Thread -1220429104 (LWP 32595)]
> 0xb7f7d410 in __kernel_vsyscall ()
> (m3gdb) bt
> #0  0xb7f7d410 in __kernel_vsyscall ()
> #1  0xb7577589 in __lll_lock_wait () from /lib/tls/i686/cmov/ 
> libpthread.so.0
> #2  0xb7572ba6 in _L_lock_95 () from /lib/tls/i686/cmov/ 
> libpthread.so.0
> ../../gdb/gdb/dwarf2-frame.c:490: internal-error: Unknown CFI  
> encountered.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) y
> ../../gdb/gdb/dwarf2-frame.c:490: internal-error: Unknown CFI  
> encountered.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Create a core file of GDB? (y or n) y
> Aborted (core dumped)
> ---------------------------------------------------------------------------------------------------------------------
> Garbage collection enabled and triggered ...
>
> ***
> *** runtime error:
> ***    <*ASSERT*> failed.
> ***    file "../src/thread/PTHREAD/ThreadPThread.m3", line 1449
> ***
>
>
> Program received signal SIGINT, Interrupt.
> [Switching to Thread -1220732208 (LWP 32623)]
> 0xb7f33410 in __kernel_vsyscall ()
> (m3gdb) bt
> #0  0xb7f33410 in __kernel_vsyscall ()
> #1  0xb752e196 in __nanosleep_nocancel () from /lib/tls/i686/cmov/ 
> libpthread.so.0
> #2  0xb75cd016 in XPause (self=Invalid C/C++ type code 26 in symbol  
> table.
> ) at ../src/thread/PTHREAD/ThreadPThread.m3:651
> #3  0xb75cd193 in Pause (n=Invalid C/C++ type code 44 in symbol table.
> ) at ../src/thread/PTHREAD/ThreadPThread.m3:668
> Can't find child block 1, at level 1, of parent procedure  
> "Test__GetParams", for nested procedure  
> "Test__GetParams__1__1__NumArg.778"
> #4  0x08054c4c in ResumeCollection () at ../src/Test.m3:1354
> #5  0x0805631b in FillBase (N=Invalid C/C++ type code 40 in symbol  
> table.
> ) at ../src/Test.m3:1628
> #6  0x0805b764 in Work () at ../src/Test.m3:2536
> #7  0x0805d387 in Test (mode=Invalid C/C++ type code 39 in symbol  
> table.
> ) at ../src/Test.m3:2658
> #8  0xb75ba22c in RunMainBody (m=Invalid C/C++ type code 29 in  
> symbol table.
> ) at ../src/runtime/common/RTLinker.m3:399
> #9  0xb75b95e6 in AddUnitI (m=Invalid C/C++ type code 29 in symbol  
> table.
> ) at ../src/runtime/common/RTLinker.m3:113
> #10 0xb75b9674 in AddUnit (b=Invalid C/C++ type code 31 in symbol  
> table.
> ) at ../src/runtime/common/RTLinker.m3:122
> #11 0x08049f7e in main (argc=2, argv=0xbfdd4424, envp=0xbfdd4430) at  
> _m3main.mc:4
> #12 0xb73e8450 in __libc_start_main () from /lib/tls/i686/cmov/ 
> libc.so.6
> #13 0x08049ed1 in _start ()
> (m3gdb) frame 4
> #4  0x08054c4c in ResumeCollection () at ../src/Test.m3:1354
> 1354        ; Thread . Pause ( 2.0D0 )
> Current language:  auto; currently Modula-3
> (m3gdb) down
> #3  0xb75cd193 in Pause (n=Invalid C/C++ type code 44 in symbol table.
> ) at ../src/thread/PTHREAD/ThreadPThread.m3:668
> 668           XPause(self, n, alertable := FALSE);
> (m3gdb) down
> #2  0xb75cd016 in XPause (self=16_b66607ac, n=Invalid C/C++ type  
> code 44 in symbol table.
> ) at ../src/thread/PTHREAD/ThreadPThread.m3:651
> 651           WITH r = Utime.nanosleep(amount, remaining) DO
> (m3gdb) down
> #1  0xb752e196 in __nanosleep_nocancel () from /lib/tls/i686/cmov/ 
> libpthread.so.0
> (m3gdb) down
> #0  0xb7f33410 in __kernel_vsyscall ()
> (m3gdb)
>
>
> ---------------------------------------------------------------------------------------------------------------------




More information about the M3devel mailing list