[ZODB-Dev] Race condition in basestorage commit locks?

Tim Peters tim.one at comcast.net
Fri Oct 7 14:44:04 EDT 2005


[Christian Theune]
> It looks like we have been bitten by a bug in a C-Module for MySQL
> access. Sometimes it led to a segfault, a halt, or the hang. We can't
> reproduce it after switching that C-Module anymore.

Any theory for how that could make all four threads appear to be blocked on
an attempt to get the commit lock?  Bad code at the C level can cause any
kind of "impossible" behavior, but there's usually a more-or-less clear
connection to the impossible symptom observed.  Without such a connection,
it remains plausible that, e.g., some _other_ bad C-level code is really at
fault, and switching an irrelevant bit of C code just happened to mask it
for the time being.

> I really hate C-Modules for Python right now.

They're no worse than C code written for other purposes.  I just noticed
that doing a Google search on

    mysql segfault

gives over 200000 hits.  That's about average for C code <wink>.




More information about the ZODB-Dev mailing list