Skip to content

[CI-fix, throwaway] profiler-hub ASAN launcher + DEB packaging catch-and-continue#6780

Draft
avansick-amd wants to merge 6 commits into
mainfrom
users/avansick-amd/6734-ci-fix-1
Draft

[CI-fix, throwaway] profiler-hub ASAN launcher + DEB packaging catch-and-continue#6780
avansick-amd wants to merge 6 commits into
mainfrom
users/avansick-amd/6734-ci-fix-1

Conversation

@avansick-amd

Copy link
Copy Markdown

Purpose

Throwaway validation branch for two independent CI-fix candidates targeting PR #6734
(profiler-hub subproject). Not intended to merge. Draft, for CI signal only.

Fix A — profiler-hub ASAN unit-test build failure

Wires THEROCK_SANITIZER_LAUNCHER into gtest_discover_tests() via
CROSSCOMPILING_EMULATOR in rocm-systems/profilers/profiler-hub/tests/unit/CMakeLists.txt.
Already merged upstream in ROCm/rocm-systems at 9202096b16
(users/avansick-amd/6734-ci-fix-1 branch there). This PR bumps the rocm-systems
submodule pin to pick it up so the ASAN CI stage here actually exercises the fix.

Fix B — DEB packaging break

  • debian_rules.j2: exclude .co fixtures from dh_makeshlibs (mirrors existing
    dh_dwz exclusion) to skip hip-tests' deliberately-corrupted elf_bad_shoff.co.
  • deb_package.py / build_package.py: sequential packaging loop now catches
    per-package CalledProcessError and continues instead of aborting the entire
    ~74-package run on first failure.

What to watch

  • Multi-Arch CI ASAN — should go green on the profiler-hub unit test stage.
  • Multi-Arch CI — DEB packaging stage should complete without aborting early.

Once both are confirmed green, the fixes will be cherry-picked onto PR #6734 itself;
this branch/PR will then be closed.

adjordje-amd and others added 4 commits July 21, 2026 16:48
profiler-hub is a general-purpose, schema-versioned data storage library
for profiling/tracing tools (writer/reader API over a common on-disk
schema), living in the rocm-systems submodule's profilers/profiler-hub
subdirectory. It is designed to be built and consumed standalone, not as
an implementation detail of any one tool - so wire it into TheRock as
its own independent subproject and artifact, not as a follow-on of any
specific consumer.

Changes:
- profiler/CMakeLists.txt: new top-level if(THEROCK_ENABLE_PROFILER_HUB)
  block (sibling to ROCPROFV3 / ROCPROFILER_COMPUTE / ROCPROFSYS) with
  therock_cmake_subproject_declare for profiler-hub. BUILD_DEPS:
  therock-{nlohmann-json,spdlog,fmt} (+ therock-googletest when
  THEROCK_BUILD_TESTING). RUNTIME_DEPS: rocprofiler-sdk (load-bearing:
  profiler-hub's schema comes from rocprofiler-sdk-rocpd's sql.h),
  THEROCK_BUNDLED_SQLITE3. Declares DISABLE_AMDGPU_TARGETS, since
  profiler-hub is pure host C++ with no GPU/HIP code - without it, any
  CI stage that builds with zero AMDGPU targets selected (e.g. the
  compiler-runtime stage) hits a hard CMake configure error.
- profiler/artifact-profiler-hub.toml: new artifact manifest covering
  shared + static libs, headers, cmake config package. The 'run'
  component is deliberately omitted rather than declared bare: 'run'
  has no default include patterns in this codebase's artifact tooling,
  so a bare entry acts as a catch-all that would otherwise claim the
  headers/static-lib/cmake files meant for 'dev' (see
  build_tools/_therock_utils/artifact_builder.py ComponentDefaults).
- BUILD_TOPOLOGY.toml: new [artifacts.profiler-hub] with
  feature_name = "PROFILER_HUB" (creates THEROCK_ENABLE_PROFILER_HUB
  knob).
- rocm-systems submodule: bump to 0e57a383b0 - the exact rocm-systems
  develop commit (PR #8610) that fixes a schema-API signature drift
  between profiler-hub and rocprofiler-sdk-rocpd (rocpd_sql_load_schema
  grew a schema_version parameter via PR #5267; profiler-hub's call
  site wasn't updated until #8610). Anything before this commit fails
  to compile profiler-hub against rocprofiler-sdk-rocpd. Pinned to this
  exact commit rather than a later develop HEAD, to keep the bump
  minimal and reproducible - it is the earliest point that has both
  emulation/mirage (already required by TheRock main's
  emulation/CMakeLists.txt, unrelated to this change) and the fix.

Verified: `ninja profiler-hub` builds standalone (libprofiler-hub.so.0,
clean configure + build, no warnings) without touching rocprofiler-systems.
Artifact components (lib/dev/run/doc/dbg/test) rebuilt and checked for
correct file placement. Deliberately does not touch rocprofiler-systems
in any way - that migration (ROCm/rocm-systems#5808, split into #8607
and #8608) is tracked separately and will be wired into TheRock once it
lands.
profiler-hub is a reusable, schema-versioned trace storage library, not
an implementation detail of any single consumer. Its Linux deb/rpm
manifest entries were missing, so no shipped package included
libprofiler-hub.so regardless of what else was selected.

Add profiler-hub as a standalone Artifactory entry in
amdrocm-profiler-base (the foundational-libraries package, sibling to
the existing aqlprofile entry - no dependency on amdrocm-amdsmi or any
tool-level package, matching profiler-hub's own RUNTIME_DEPS of
rocprofiler-sdk + system sqlite3, both already satisfied there), and a
matching test-component entry in amdrocm-profiler-test.

Deliberately does not touch rocprofiler-systems packaging or
install_rocm_from_artifacts.py.
…; harden deb packaging loop to catch-and-continue

hip-tests ships elf_bad_shoff.co, an intentionally-corrupted ELF fixture used by
its OOB bounds-check tests. dh_makeshlibs cannot parse it during Debian
packaging and aborts dpkg-buildpackage outright, mirroring the existing
-X.co/-X.hsaco exclusion already used for override_dh_dwz.

Separately, deb_package.py's package_with_dpkg_build() called sys.exit()
directly on a dpkg-buildpackage failure, which propagated as an uncaught
SystemExit and killed the entire sequential packaging run, marking all
not-yet-attempted packages as failed without ever trying them. Re-raise the
CalledProcessError instead and catch it per-package in build_package.py's run()
loop so one broken package no longer takes the rest of the queue down with it;
the existing built/failed summary and non-zero exit-on-any-failure behavior are
preserved.
…er fix

Points the submodule at 9202096b16 (rocm-systems#users/avansick-amd/6734-ci-fix-1,
now merged to ROCm/rocm-systems), which wires THEROCK_SANITIZER_LAUNCHER into
profiler-hub's gtest_discover_tests(). Required so this branch's own
Multi-Arch CI ASAN run actually exercises the fix.
@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ❌ Fail Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: build_tools/packaging/linux/build_package.py, build_tools/packaging/linux/deb_package.py; no test file found
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ Unit Test

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 22, 2026
@therock-pr-bot

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ Unit Test

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

…itizer instrumentation

profiler-hub declares no COMPILER_TOOLCHAIN, so therock_sanitizer_configure()
takes the system-toolchain branch and profiler-hub_unit_tests is built with
system gcc, never -fsanitize=address compiled/linked. Under the ASAN CI
variant it only gets ASan transitively via the clang-built
librocprofiler-sdk-rocpd.so on its link line, which is fragile (broke at
runtime on one CI runner pool, at link on another). This is an experimental
A/B on the throwaway branch users/avansick-amd/6734-ci-fix-1: adding
COMPILER_TOOLCHAIN amd-llvm (matching therock-spdlog/therock-elfio precedent
for pure-host C++ subprojects) should make profiler-hub self-sanitized. Real
CI on ROCm/TheRock draft PR #6780 is the empirical test.
…letest TLS symbols under clang/lld

profiler-hub_unit_tests links TheRock's in-tree GTest::gtest/gmock targets, but that
in-tree googletest build does not propagate Threads::Threads through those interface
targets. Under system gcc this was masked because gcc's driver links libpthread
implicitly; now that profiler-hub is routed through amd-llvm/clang+lld
(COMPILER_TOOLCHAIN amd-llvm, fd5af7b), lld does not do this implicitly and gtest's
pthread TLS symbols (pthread_getspecific/setspecific/key_create/key_delete) go
unresolved at link time. This is an experimental single-variable A/B on the throwaway
branch users/avansick-amd/6734-ci-fix-1, injecting -pthread via CMAKE_EXE_LINKER_FLAGS
as the fast TheRock-side equivalent of the proper long-term fix (adding
Threads::Threads to profiler-hub_unit_tests upstream in rocm-systems, not editable
from this branch without a re-pin). Real CI on ROCm/TheRock draft PR #6780 is the
empirical test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not ready to Review PR has unresolved policy failures — reviews blocked

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

2 participants