Skip to content

intel-qpl: disable ThreadSanitizer in release build#17384

Merged
christopherco merged 1 commit into
4.0from
users/reubeno/qpl-tsan
May 21, 2026
Merged

intel-qpl: disable ThreadSanitizer in release build#17384
christopherco merged 1 commit into
4.0from
users/reubeno/qpl-tsan

Conversation

@reubeno
Copy link
Copy Markdown
Member

@reubeno reubeno commented May 21, 2026

Drops -DSANITIZE_THREADS=ON from the cmake invocation. Enabling ThreadSanitizer in a shipped build adds 2x-10x runtime overhead and 5x-20x memory overhead per the LLVM TSan documentation (https://clang.llvm.org/docs/ThreadSanitizer.html).

It also breaks at load time in many container configurations: the TSan runtime re-execs the process with personality(ADDR_NO_RANDOMIZE) to disable ASLR (see ReExec()/ADDR_NO_RANDOMIZE in compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp in llvm/llvm-project), and the personality(2) syscall is blocked by Docker's default seccomp profile. Without ASLR disabled, TSan aborts with 'FATAL: ThreadSanitizer: unexpected memory mapping ...' (e.g. google/sanitizers#1716) when libqpl is loaded inside an unprivileged container.

Mirrors upstream fix:
https://src.fedoraproject.org/rpms/intel-qpl/c/7a433cf7338f7922f90b8819bcfd3b9fb9d4cb35

Validation

  • Built intel-qpl RPM locally using azldev
  • Ran 4.0 container in docker.
  • Installed erofs-utils from PMC.
  • Ran mkfs.erofs --help and saw error + segfault:

ThreadSanitizer: CHECK failed: tsan_platform_linux.cpp:290 "((personality(old_personality | ADDR_NO_RANDOMIZE))) != ((-1))" (0xffffffffffffffff, 0xffffffffffffffff) (tid=20)

  • Installed privately built intel-qpl RPM.
  • Re-ran mkfs.erofs and saw it worked as expected.

Drops -DSANITIZE_THREADS=ON from the cmake invocation. Enabling
ThreadSanitizer in a shipped build adds 2x-10x runtime overhead and
5x-20x memory overhead per the LLVM TSan documentation
(https://clang.llvm.org/docs/ThreadSanitizer.html).

It also breaks at load time in many container configurations: the
TSan runtime re-execs the process with personality(ADDR_NO_RANDOMIZE)
to disable ASLR (see ReExec()/ADDR_NO_RANDOMIZE in
compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp in
llvm/llvm-project), and the personality(2) syscall is blocked by
Docker's default seccomp profile. Without ASLR disabled, TSan aborts
with 'FATAL: ThreadSanitizer: unexpected memory mapping ...' (e.g.
google/sanitizers#1716) when libqpl is loaded inside an unprivileged
container.

Mirrors upstream fix:
https://src.fedoraproject.org/rpms/intel-qpl/c/7a433cf7338f7922f90b8819bcfd3b9fb9d4cb35

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@reubeno reubeno force-pushed the users/reubeno/qpl-tsan branch from 48043bb to ef53551 Compare May 21, 2026 06:11
@reubeno reubeno marked this pull request as ready for review May 21, 2026 06:19
Copilot AI review requested due to automatic review settings May 21, 2026 06:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR disables ThreadSanitizer in the shipped intel-qpl build by changing the CMake configure flag from -DSANITIZE_THREADS=ON to OFF, addressing major runtime/memory overhead and container load-time failures under Docker’s default seccomp profile.

Changes:

  • Added a dedicated intel-qpl component definition with an overlay to flip -DSANITIZE_THREADS to OFF.
  • Regenerated the rendered spec to reflect the new CMake flag (and updated rpmautospec release/changelog).
  • Updated the intel-qpl lock fingerprint and removed the inline component entry from components.toml.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
specs/i/intel-qpl/intel-qpl.spec Rendered spec now configures -DSANITIZE_THREADS=OFF; release/changelog updated via rpmautospec.
locks/intel-qpl.lock Updates input-fingerprint to match the new component configuration.
base/comps/intel-qpl/intel-qpl.comp.toml New component overlay drives the spec change without forking.
base/comps/components.toml Removes the inline intel-qpl entry now that it has a dedicated component file.

# https://src.fedoraproject.org/rpms/intel-qpl/c/7a433cf7338f7922f90b8819bcfd3b9fb9d4cb35
[[components.intel-qpl.overlays]]
description = "Disable ThreadSanitizer in release build (perf overhead + breaks under Docker seccomp)."
type = "spec-search-replace"
@christopherco christopherco merged commit 4a33419 into 4.0 May 21, 2026
15 checks passed
@christopherco christopherco deleted the users/reubeno/qpl-tsan branch May 21, 2026 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants