Hello everyone,

Continuing my last email the deadlock in "gctest" originates from file
phtread_support.c:2007

#ifndef NO_PTHREAD_TRYLOCK
    if (1 == GC_nprocs || GC_collecting) {
      pthread_mutex_lock(&GC_allocate_ml)
    } else {
        GC_generic_lock(&GC_allocate_ml);
    }

When it tries to lock GC_allocate_ml, it's already used and so
pthread_mutex_lock locks the whole program.

(gdb) p GC_allocate_ml
$2 = {__held = 1, __lock = 0, __cthreadscompat1 = 0x0, __queue = 0x0,
__attr = 0x0, __data = 0x0, __owner = 0x0, __locks = 0}

This appears to happen after a thread switch.

I will report back when I have more.

Manolis

Reply via email to