Comment 35 for bug 903212

Revision history for this message
In , Steven (steven-redhat-bugs) wrote :

Daniel,

Thanks for a pointer to the upstream fixes. I'll apply them on the fedora 16 rpm, build a scratch rpm, and see if that fixes the problem.

As I recall, what happened in our case was both the localtime_r problem you describe as well as the following:

getenv/setenv take a lock in the timezone code (I am not sure why it does this, read the glibc code for more details).
another thread forks (with the timezeone thread locked)
getenv/setenv do not have at_fork handlers for getenv/setenv leaving the lock locked in the child process.
getlocaltime_r takes lock and deadlocks (because it uses the same tzget lock)

Regards
-steve