• Nils Goroll's avatar
    Do not short-cut the mutex protecting node->subreq.done · 067c16e0
    Nils Goroll authored
    A follow-up issue has been reported in #13:
    
    Assert error in Lck_Delete(), cache/cache_lck.c line 309:
      Condition((pthread_mutex_destroy(&ilck->mtx)) == 0) not true.
    
    triggered from Lck_Delete(&bytes_tree->nodes_lock) at the bottom of
    bytes_tree_fini().
    
    Assuming everything else working correctly, the only scenario I
    can see the moment is that we see the node->subreq.done == 1
    earlier than Lck_Unlock() returned in vped_task(). In this
    case, we could advance to destroying the lock while the other
    thread still holds it.
    
    The other use case of the shared lock is in fini_final(), where
    we already go through an explicit lock/unlock.
    
    Hopefully fixes #13 for real
    067c16e0
Name
Last commit
Last update
misc/coccinelle Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
CONTRIBUTING.rst Loading commit data...
INSTALL.rst Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...