[gambit-list] SMP Gambit

Marc Feeley feeley at iro.umontreal.ca
Sun Jan 29 15:20:39 EST 2017


I found the cause of this issue. There is a deadlock possible in the program termination logic (which is non-trivial because all OS threads have to be terminated cleanly and memory deallocated).  The problem disappears when a “exit(0);” is added at line 4577 of lib/setup.c (but of course this does not perform the usual cleanup).

I’ll investigate later but I think this is a sufficiently infrequent issue that should not block experimentation of the smp branch.

Marc


> On Jan 29, 2017, at 1:28 PM, Marc Feeley <feeley at iro.umontreal.ca> wrote:
> 
> Another debugging idea is to add CC="gcc -D___DEBUG_TICKETLOCK" to the configure options.
> 
> This will add a deadlock check to the ticket lock implementation, so if it busy waits too long in a “lock” operation it will show the location of the lock operation and the other lock operation that locked the lock.
> 
> Marc
> 
> 
>> On Jan 29, 2017, at 12:32 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
>> 
>> On 01/29/2017 11:18 AM, Marc Feeley wrote:
>>> OK… on the smaller machine (which actually has 24 processors), after *many* “make ut” I finally see a deadlock of some sort, so I will investigate.  It seems to coincide with starting to do something else on the machine (like typing in emacs) but not consistently.  It takes several hundred “make ut” to get a deadlock.  The CPUs are “Intel(R) Xeon(R) X5650  @ 2.67GHz”.
>>> 
>>> Can you reproduce the issue more consistently on your machine?  Does it happen every second or so “make ut”?
>> 
>> I updated and rebooted my linux box at work (so nothing else was running) and made Gambit with your new instructions.  Ran make ut a dozen or so times and got nothing.
>> 
>> But after I started an emacs window it hung with
>> 
>> 
>> LD_LIBRARY_PATH=../lib:../gsi:../gsc:/usr/local/libimobiledevice/lib:/usr/local/Gambit/current/lib:/usr/local/netpbm10/lib: ../gsi/gsi -:p1,tl,~~bin=../bin,~~lib=../lib,~~include=../include -f ./run-unit-tests.scm
>> 
>> first time!  That was with
>> 
>> ./configure 'CC=gcc -march=native -D___CAN_IMPORT_CLIB_DYNAMICALLY' '--enable-single-host' '--enable-multiple-versions' '--enable-shared' --enable-multiple-threaded-vms
>> 
>> 
>> On my home box (with a lot of other things running) it didn't finish the "make -j 8 from-scratch", hanging at
>> 
>> LD_LIBRARY_PATH=..:/usr/local/libimobiledevice/lib:/pkgs/chicken-4.10.0/lib:/usr/local/Gambit/current/lib:/usr/local/netpbm10/lib: ../gsc-boot -:~~bin=../bin,~~lib=../lib,~~include=../include -f -warnings -link -flat -o _gambit.c -preload _kernel.c _system.c _num.c _std.c _eval.c _io.c _nonstd.c _thread.c _repl.c
>> 
>> That was configured with
>> 
>> ./configure 'CC=gcc -march=native -D___CAN_IMPORT_CLIB_DYNAMICALLY' '--enable-single-host' '--enable-shared' '--enable-multiple-versions' '--enable-multiple-threaded-vms'
>> 
>> I'll look at your suggestions for debugging this.
>> 
>> Brad
> 




More information about the Gambit-list mailing list