[M3devel] pthreads still broken

mika at async.caltech.edu mika at async.caltech.edu
Fri Jan 3 06:57:18 CET 2014

On my new AMD64_LINUX build...

The thread tester still crashes.

First, it prints a couple of extraneous diagnostics.  These look like
they come from the threading code?

Then it segfaults.

(141)truffles:~/cm3-cvs-anon/cm3/m3-libs/m3core/tests/thread/AMD64_LINUX>gdb threadtest
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /big/home2/mika/2/cm3-cvs/cm3/m3-libs/m3core/tests/thread/AMD64_LINUX/threadtest...done.
(gdb) run 
Starting program: /big/home2/mika/2/cm3-cvs/cm3/m3-libs/m3core/tests/thread/AMD64_LINUX/threadtest 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Writing file...done
Creating read threads...[New Thread 0x2aaaab6f8700 (LWP 23996)]
[New Thread 0x2aaaab8f9700 (LWP 23997)]
[New Thread 0x2aaaabafa700 (LWP 23998)]
Creating fork threads...[New Thread 0x2aaaabcfb700 (LWP 23999)]
[New Thread 0x2aaaabefc700 (LWP 24000)]
[New Thread 0x2aaaac0fd700 (LWP 24001)]
Creating alloc threads...[New Thread 0x2aaaac2fe700 (LWP 24002)]
[New Thread 0x2aaaac4ff700 (LWP 24003)]
[New Thread 0x2aaaac700700 (LWP 24004)]
Creating lock threads...[New Thread 0x2aaaac901700 (LWP 24005)]
[New Thread 0x2aaaacb02700 (LWP 24006)]
[New Thread 0x2aaaacd03700 (LWP 24007)]
running...printing oldest/median age/newest

Program received signal SIG64, Real-time event 64.
[Switching to Thread 0x2aaaac901700 (LWP 24005)]
0x00002aaaaaf5b64b in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) handle SIG64 nostop noprint
Signal        Stop      Print   Pass to program Description
SIG64         No        No      Yes             Real-time event 64
(gdb) cont

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2aaaab6f8700 (LWP 23996)]
0x0000000000416de6 in FileRd__Init (M3_DaDE31_rd=<error reading variable>, M3_EQj1Bs_h=<error reading variable>) at ../src/rw/FileRd.m3:44
44          IF (rd.buff = NIL) THEN
(gdb) where
#0  0x0000000000416de6 in FileRd__Init (M3_DaDE31_rd=<error reading variable>, M3_EQj1Bs_h=<error reading variable>) at ../src/rw/FileRd.m3:44
#1  0x0000000000416d3a in FileRd__Open (M3_Bd56fi_p=<error reading variable>) at ../src/rw/FileRd.m3:16
#2  0x0000000000405424 in Main__RApply (M3_AP7a1g_cl=<error reading variable>) at ../src/Main.m3:182
#3  0x000000000044c23b in ThreadPThread__RunThread (M3_DMxDjQ_me=<error reading variable>) at ../src/thread/PTHREAD/ThreadPThread.m3:449
#4  0x000000000044bef8 in ThreadPThread__ThreadBase (M3_AJWxb1_param=<error reading variable>) at ../src/thread/PTHREAD/ThreadPThread.m3:422
#5  0x00002aaaaaf56b50 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6  0x00002aaaab246a7d in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7  0x0000000000000000 in ?? ()

The reason I even ran it was because I found that running the parallel compiler backend was unstable. 
Do user threads work on AMD64_LINUX?


More information about the M3devel mailing list