Open Bug 1885319 Opened 7 months ago Updated 5 months ago

Apply LLVM TSan fixes to both of our own clang and rust builds

Categories

(Core :: Gecko Profiler, task, P3)

task

Tracking

()

ASSIGNED

People

(Reporter: canova, Assigned: canova)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [fxp])

Attachments

(1 obsolete file)

Currently SIGPROF is an async signal on TSan codebase. TSan tries to delay the dispatch of async signals until it finds a blocking function call. It's very problematic for our case because some function calls are incorrectly marked as non-blocking: issue 1, issue 2.

Serge landed an LLVM patch to mark SIGPROF as sync function but I guess it'll take some time until it's released and we switch to it. And the same applies to Rust. We can patch our own clang and rust versions in the meantime.

Edit after updating the bug: The first patch I mentioned above is reverted by LLVM, so we need to fix it by applying https://github.com/llvm/llvm-project/pull/84162 and https://github.com/llvm/llvm-project/pull/86537 to both of our clang and rust builds.

Due to SIGPROF being async, it was hanging on some cases because some functions
were incorrectly marked non-blocking. This patch is merge to LLVM in:
https://github.com/llvm/llvm-project/pull/85188 But we want to patch our clang
here to start benefiting from that quickly.

Assignee: nobody → canaltinova
Status: NEW → ASSIGNED
Whiteboard: [fxp]
Attachment #9391258 - Attachment description: Bug 1885319 - Make SIGPROF a sync signal on TSan of our clang builds r?sergesanspaille! → Bug 1885319 - Make SIGPROF a sync signal on TSan of our clang and rust builds r?sergesanspaille!,glandium!
Pushed by canaltinova@gmail.com: https://hg.mozilla.org/integration/autoland/rev/d90b4451e543 Make SIGPROF a sync signal on TSan of our clang and rust builds r=sergesanspaille,glandium

Backed out for causing multiple xpcshell failures.
This only happened on linux tsan.

Flags: needinfo?(canaltinova)

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:canova, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sguelton)
Flags: needinfo?(canaltinova)
Attachment #9391258 - Attachment is obsolete: true

Abandoned the previous patch. That LLVM patch has been reverted so it means that we need to land the patches in https://github.com/llvm/llvm-project/pull/84162 and https://github.com/llvm/llvm-project/pull/86537 instead.

Flags: needinfo?(canaltinova)
Flags: needinfo?(sguelton)
Severity: -- → N/A
Priority: -- → P3
Flags: needinfo?(canaltinova)

Converting this bug to apply the patches in https://github.com/llvm/llvm-project/pull/84162 and https://github.com/llvm/llvm-project/pull/86537 instead of applying the older reverted patch.

Flags: needinfo?(canaltinova)
Summary: Make the `SIGPROF` a sync signal on TSan → Apply LLVM TSan fixes to both our own clang and rust builds
Summary: Apply LLVM TSan fixes to both our own clang and rust builds → Apply LLVM TSan fixes to both of our own clang and rust builds
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: