On Sun, 13 Jun 2010 02:31:52 +0200 Stefan Keller stefan.keller@isaco.de wrote:
Hi,
I used the shm_regex functions from lib in one of my own modules and noticed that it is dead-locking (it hangs in FUTEX_WAIT). The code hangs in regexec() when trying to acquire the lock. This was a bit hard to find out as I couldn't reproduce it in a virtual machine with some test code I wrote. It turns out this only happens if the machine has more than one physical CPU core. Reproducable on x86_64 with two CPU cores, glibc 2.3.6 (from Debian Etch) and glibc 2.11.1 (from Ubuntu Jaunty).
Sorry, I meant to write Ubuntu Lucid (10.04).
Attached is a patch which does its own locking and thus works around this problem.
Best regards, Stefan