[Bug 856072] [NEW] Bionic domain name functions are not thread-safe on pre-3.0 Android

Launchpad Bug Tracker 856072 at bugs.launchpad.net
Thu Sep 22 05:44:38 UTC 2011


You have been subscribed to a public bug:

In bionic (ugh), domain name functions (getaddrinfo, gethostbyname_r, et
al) are not thread-safe because stdio is not thread-safe... These
functions rely on stdio for reading from the /etc/hosts file.

AFAIK in Gecko, we launch worker threads which call these domain
functions, and we crash inside bionic when we run into such a race
condition in stdio. This is the #2 top crasher in 7.0 Beta and #1 in
6.0.

I haven't seen single-core devices running into these crashes, but on
dual-core devices they are a lot more severe. The ugly fix would be
using locks around getaddrinfo calls. Another workaround would be
setting the CPU affinity on worker threads; doesn't fix the issue, but
should make it a lot less common. Also, might be possible to not use
getaddrinfo, but that seems to have implications in IPv6 support (Bug
626866);

Complete thread on: https://bugzilla.mozilla.org/show_bug.cgi?id=687367

** Affects: linaro-android
     Importance: Undecided
         Status: New

** Affects: firefox
     Importance: Unknown
         Status: Unknown

-- 
Bionic domain name functions are not thread-safe on pre-3.0 Android
https://bugs.launchpad.net/bugs/856072
You received this bug notification because you are a member of Mozilla Bugs, which is subscribed to Mozilla.




More information about the Ubuntu-mozillateam-bugs mailing list