blocked on futex

msoulier msoulier at
Wed Mar 11 13:32:41 CET 2009


I'm using the Python packaged with CentOS 4.7, which is a patched
2.3.4. Yes, ancient but I can't do anything about it.

The problem is that my long-running process, which talks to PostgreSQL
via Django models, does a lot of reading and writing to and from the
disk and writes to a Unix domain socket is randomly locking up. I have
not found a consistent place in my code where this lock-up occurs, but
every time it does, an strace shows that it is sitting at an futex()
call, apparently waiting forever.

My first guess is that futex() is being used by pthread_mutex_lock()
for thread-safety. I'm not using threads but the interpreter was built
with threaded support AFAIK.

A step in the right direction would be appreciated, I'm at a loss on
this one. I'm currently trying to strace the entire run of the program
to gain some context when it locks up to find out what it was doing at
the time.

Cheers and thanks,

More information about the Python-list mailing list