[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL

STINNER Victor report at bugs.python.org
Sat Jun 12 02:20:21 CEST 2010

STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> I understand your last comment as wanting to keep the GIL while calling
> tzset(), but release it around the strftime() call.


> You still want to apply your patch, right?

http://sourceware.org/bugzilla/show_bug.cgi?id=4350 describes a crash. This issue is not a crash but a concurrency problem. I don't know if my patch fixes the initial problem: dorontal didn't try it and he doesn't explain us how to reproduce it.

I also not sure that releasing the GIL may not introduce a new concurrency issue: it might crash if a thread calls strftime() and another thread calls setenv("TZ", "...") (if I understood correctly the GNU libc bug 4350).


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list