in bug 903212 it's suggested that a specific, not-cleanly-cherrypickable patchset might fix it. However, the rationale behind the patchset doesn't match the patchset. asctime_r etc *are* threadsafe. The only thing I can find in the source which isn't is one use of localtime (not localtime_r). It may be worth fixing that and seeing if it helps.