[CI-fix, throwaway] profiler-hub ASAN launcher + DEB packaging catch-and-continue#6780
Draft
avansick-amd wants to merge 6 commits into
Draft
[CI-fix, throwaway] profiler-hub ASAN launcher + DEB packaging catch-and-continue#6780avansick-amd wants to merge 6 commits into
avansick-amd wants to merge 6 commits into
Conversation
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.
❌ PR Check — Action Required
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🚫 Please fix the failed policies before requesting reviews. The following policy checks failed:
The |
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_LAUNCHERintogtest_discover_tests()viaCROSSCOMPILING_EMULATORinrocm-systems/profilers/profiler-hub/tests/unit/CMakeLists.txt.Already merged upstream in
ROCm/rocm-systemsat9202096b16(
users/avansick-amd/6734-ci-fix-1branch there). This PR bumps therocm-systemssubmodule pin to pick it up so the ASAN CI stage here actually exercises the fix.
Fix B — DEB packaging break
debian_rules.j2: exclude.cofixtures fromdh_makeshlibs(mirrors existingdh_dwzexclusion) to skip hip-tests' deliberately-corruptedelf_bad_shoff.co.deb_package.py/build_package.py: sequential packaging loop now catchesper-package
CalledProcessErrorand 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.