Closed Bug 1100911 Opened 5 years ago Closed 5 years ago

For MacOS builds running on Valgrind, make ThreadStackHelper::GetStack be a no-op

Categories

(Core :: XPCOM, defect)

All
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jseward, Assigned: jseward)

Details

Attachments

(1 file)

When running Firefox on Valgrind on MacOSX 10.9 and possibily 10.10,
the syscalls thread_suspend and thread_resume cause Valgrind to hang,
in ThreadStackHelper::GetStack(Stack& aStack) in ThreadStackHelper.cpp.
Despite considerable investigation, the reasons for the hang are unknown.
There is no problem when not running on Valgrind, so I assume this is
a problem in Valgrind itself.

Proposed fix is to make GetStack return without doing anything when
running on MacOS *and* this is a --enable-valgrind build.  Will have no
effect on release builds, nor on --enable-valgrind builds running "natively".
That sounds reasonable. You can also return false from ThreadStackHelper::PrepareStackBuffer to make GetStack return early.

Do we run tests under Valgrind? If we do, you may have to disable test_ThreadHangStats.js.
Attachment #8525212 - Flags: review?(nchen)
Attachment #8525212 - Flags: review?(nchen) → review+
https://hg.mozilla.org/mozilla-central/rev/ffca01c1afea
Assignee: nobody → jseward
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.