Closed Bug 1824768 Opened 3 years ago Closed 3 years ago

TSan startup failures due to external (gfx related) libs

Categories

(Core :: Sanitizers, task)

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: tsmith, Assigned: tsmith)

References

(Blocks 1 open bug)

Details

Attachments

(10 files, 1 obsolete file)

Attached file tsan.txt

This is a start up crash on Ubuntu 22.04.

I believe this will require a suppression.

Jonathan, is this the TSan report you were seeing when working on bug 1824200? If not could you please add the log and I will add a suppression if needed.

Hmm, I'm going to assume that is a bugzilla issues since I've seen a few others do the exact same thing...

(In reply to Tyson Smith [:tsmith] from comment #1)

Jonathan, is this the TSan report you were seeing when working on bug 1824200? If not could you please add the log and I will add a suppression if needed.

No, mine's "unlock of an unlocked mutex (or by a wrong thread)" inside of libappmenu-gtk3-parser.so.0. I'll attach a log.

(Note that I'm on an older Ubuntu, so I expect all the system libs are different versions than yours.)

Blocks: tsan
Summary: ThreadSanitizer: data race (libfontconfig.so.1) → TSan failures due to external libs (libappmenu-gtk3-parser.so.0 and libfontconfig.so.1)
Assignee: nobody → twsmith
Status: NEW → ASSIGNED

Jonathan: Would you mind testing the patch locally?

Or the try build (https://treeherder.mozilla.org/#/jobs?repo=try&revision=87a88b05de781c414298c2db6981af4548d68260)

Attachment #9325297 - Attachment is obsolete: true

With the current patch applied I am still getting this error. I though the libwayland-client.so.0 entry would have prevented this, not sure what I am missing.

(In reply to Tyson Smith [:tsmith] from comment #6)

Jonathan: Would you mind testing the patch locally?

Or the try build (https://treeherder.mozilla.org/#/jobs?repo=try&revision=87a88b05de781c414298c2db6981af4548d68260)

I tried the current patch in my local build, and it does avoid the error from comment 4; startup seems to get somewhat further, but then it dies with a new issue. This time it looks like a data race inside a Radeon driver, afaics. I'll attach a new log.

I was able to start the browser successfully after adding

+    "called_from_lib:libEGL_mesa\n"                 \
+    "called_from_lib:radeonsi_dri\n"                \

to the list, but I don't really know the significance of what I'm suppressing here... :)

Is the called_from_lib:libEGL_mesa\n line required? It is already in https://searchfox.org/mozilla-central/source/mozglue/build/TsanOptions.cpp#56

I see this when I add that line:
==12521==ThreadSanitizer: library '/lib/x86_64-linux-gnu/libEGL_mesa.so.0' that was matched against called_from_lib suppression 'libEGL_mesa' is unloaded

Flags: needinfo?(jfkthame)

Without that line, it dies with the attached errors.

(Initially, I tried adding libLLVM-12 to the list, but still hit a problem, so then tried libEGL_mesa and that seems to have resolved it for me -- and then I didn't need libLLVM-12.)

Flags: needinfo?(jfkthame)

I'll add Wayland related suppressions in Bug 1825171

Depends on: 1825171

Attached launch failure log on Debian with NVidia driver 525.116.03 (X11).

Summary: TSan failures due to external libs (libappmenu-gtk3-parser.so.0 and libfontconfig.so.1) → TSan startup failures due to external (gfx related) libs

Crash with https://treeherder.mozilla.org/jobs?repo=try&revision=31935bd64d0fbfa423901f955a488505d9ab8969 on NVidia.
This trace doesn't seem to have any NVidia libs in it.

The build is now able to launch in VMs with Wayland, X11 and hardware using Intel and AMD cards. nvidia crashes for other reasons and I will log a follow up bug.

Attachment #9325341 - Attachment description: Bug 1824768 - Add TSan suppresions for extenal libs. r=decoder → Bug 1824768 - Add TSan suppressions for external libs. r=decoder
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c26206463772 Add TSan suppressions for external libs. r=decoder
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: