Skip to content

[Issue] Linux ASAN CI gfx94X-dcgpu: rocm-sdk test fails — test_initialize_process_env_preload_1 aborts with ASan runtime does not come first in library list #6331

Description

@amd-chiranjeevi

Context

  • Workflow: Multi-Arch CI ASAN (.github/workflows/multi_arch_ci_asan.yml)
  • Run: Run 28635426241 (2026-07-03)
  • Affected arch: gfx94X-dcgpu (gfx942 / MI300X)
  • Test: rocm_sdk.tests.base_test.ROCmBaseTest.test_initialize_process_env_preload_1

Summary:

rocm-sdk test exits with code 1 on every ASAN nightly run. The failing test sets ROCM_SDK_PRELOAD_LIBRARIES=amdhip64 and calls rocm_sdk.initialize_process(), which invokes ctypes.CDLL(libamdhip64.so, RTLD_GLOBAL). Because libamdhip64.so was compiled with AddressSanitizer, the ASan runtime demands it be the first .so loaded into the process. Since the Python interpreter itself was not started under LD_PRELOAD=libclang_rt.asan.so, ASan aborts immediately:

Error Snippet:

==217==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
##[error]Process completed with exit code 1.

The same failure occurs twice per run — once for the rocm[libraries] install step and once for rocm[libraries,devel]. All Python versions (3.10, 3.11, 3.12) and both container images (ubi10, ubuntu24.04) are affected.

Failing Jobs:

Root Cause

test_initialize_process_env_preload_1 (and the other preload_libraries tests) unconditionally load an ASAN-instrumented ROCm shared library via ctypes.CDLL. ASan's runtime requires being the first library loaded — a condition only satisfiable via LD_PRELOAD at process startup, which is not set when rocm-sdk test is invoked. The test lacks an ASAN-guard equivalent to the @pytest.mark.skipif(is_asan(), ...) pattern used in other test scripts.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions