Skip to content

SWDEV-543340 - Added Unit_hipEventIpc_shm_cleanup test - #548

Merged
iassiour merged 1 commit into
developfrom
import/develop/ROCm_hip-tests/pr-513
Nov 13, 2025
Merged

iassiour merged 1 commit into
developfrom
import/develop/ROCm_hip-tests/pr-513

Conversation

@systems-assistant

Copy link
Copy Markdown
Contributor

The test verifies that all shared memory objects for IPC events used internally by HIP are properly cleaned up after use and do not leave persistent files in /dev/shm.

Associated JIRA ticket number/Github issue number

Fixes SWDEV-543340

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Continuous Integration

What were the changes?

The test verifies that all shared memory objects for IPC events used internally by HIP are properly cleaned up after use and do not leave persistent files in /dev/shm.

Why are these changes needed?

Verify that the cleanup of the /dev/shm files that backup IPC events is working as expected.

Updated CHANGELOG?

  • Yes
  • No, Does not apply to this PR.

Added/Updated documentation?

  • Yes
  • No, Does not apply to this PR.

Additional Checks

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally.
  • Any dependent changes have been merged.

🔁 Imported from ROCm/hip-tests#513
🧑‍💻 Originally authored by @rocm-devops

@rakesroy

Copy link
Copy Markdown
Contributor

Stress test passed for PSDB build Linux# 2307, Windows# 9815

@iassiour
iassiour force-pushed the import/develop/ROCm_hip-tests/pr-513 branch from 0516658 to ccdd514 Compare November 10, 2025 21:46
@iassiour

Copy link
Copy Markdown
Contributor

/AzurePipelines run rocm-ci-caller

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

The test verifies that all shared memory objects for
IPC events used internally by HIP are properly cleaned
up after use and do not leave persistent files in /dev/shm.
@iassiour
iassiour force-pushed the import/develop/ROCm_hip-tests/pr-513 branch from ccdd514 to 4f4da23 Compare November 12, 2025 12:01
@iassiour
iassiour merged commit f55dda2 into develop Nov 13, 2025
19 checks passed
@iassiour
iassiour deleted the import/develop/ROCm_hip-tests/pr-513 branch November 13, 2025 18:21
systems-assistant Bot pushed a commit to ROCm/hip-tests that referenced this pull request Nov 13, 2025
The test verifies that all shared memory objects for
IPC events used internally by HIP are properly cleaned
up after use and do not leave persistent files in /dev/shm.

Co-authored-by: Ioannis Assiouras <Ioannis.Assiouras@amd.com>
[rocm-systems] ROCm/rocm-systems#548 (commit f55dda2)
ammallya pushed a commit that referenced this pull request Jan 30, 2026
…ence picture number so more errors can be detected. Also fixed a build warning of avc_parser.cpp in debug mode. (#548)
ammallya pushed a commit that referenced this pull request Jan 30, 2026
…ence picture number so more errors can be detected. Also fixed a build warning of avc_parser.cpp in debug mode. (#548)

[ROCm/rocdecode commit: d10eacf]
dgaliffiAMD pushed a commit that referenced this pull request Aug 11, 2026
…eration failure (#9044)

## Motivation

`ROCPROFSYS_MAX_THREADS` is a compile time constant that is the core of
the `thread-limit` tests. For this test to work on TheRock, we need a
way to get the compile time value at runtime and run the test with it.
The idea here is to store it within `rocprof-sys-avail`, then read it
and run the test against that value.

## Technical Details

**Regarding thread-limit**
- Store `ROCPROFSYS_MAX_THREADS` in `rocprof-sys-avail`. Accessed using
`rocprof-sys-avail --max-threads`.
- Make` test_categories.yaml` copied to build folder during build time,
not configure time.
- Gate per thread finalization logs on `ROCPROFSYS_VERBOSE>0` or in
causal mode.
- This gets rid of some of the many logs that would be seen during this
test. I will be leaving the messages that say:
`[SIG27] Sampler for thread <N> will be triggered 250.0x per second of
CPU-time (every 4.000e+00 milliseconds)... `

**Regarding silent failure**:
- CTest generation step has been silently failing on TheRock regarding
thread-limit test as the `pytest.exit(0)` would mask any error during
generation. To fix this, we detect any collection errors and report
them, failing the build.
- Moved `get_thread_limit()` into the `test` definition itself.
Evaluating it during build (during CTesttestfile.cmake generation step)
would cause a failure in TheRock CI.

## Issue Tracking

Jira ID: AIPROFSYST-523
Jira ID: AIPROFSYST-656
Jira ID: ROCM-29285

## Test Plan

Examining TheRock CI workflow to see that the test ran and passed.

## Test Result

Ongoing.

Test passes in TheRock CI:
https://github.com/ROCm/rocm-systems/actions/runs/30031596021/job/89312443869?pr=9044
```
        Start 546: thread-limit-half-sampling
420/498 Test #546: thread-limit-half-sampling ......................................................................................................................................................   Passed    4.60 sec
        Start 547: thread-limit-half-binary-rewrite
421/498 Test #547: thread-limit-half-binary-rewrite ................................................................................................................................................   Passed    5.49 sec
        Start 548: thread-limit-half-runtime-instrument
422/498 Test #548: thread-limit-half-runtime-instrument ............................................................................................................................................   Passed    7.47 sec
        Start 549: thread-limit-half-sys-run
423/498 Test #549: thread-limit-half-sys-run .......................................................................................................................................................   Passed    4.63 sec
        Start 550: thread-limit-at-limit-sampling
424/498 Test #550: thread-limit-at-limit-sampling ..................................................................................................................................................   Passed    7.57 sec
        Start 551: thread-limit-at-limit-binary-rewrite
425/498 Test #551: thread-limit-at-limit-binary-rewrite ............................................................................................................................................   Passed    8.40 sec
        Start 552: thread-limit-at-limit-runtime-instrument
426/498 Test #552: thread-limit-at-limit-runtime-instrument ........................................................................................................................................   Passed   11.47 sec
        Start 553: thread-limit-at-limit-sys-run
427/498 Test #553: thread-limit-at-limit-sys-run ...................................................................................................................................................   Passed    7.76 sec
        Start 554: thread-limit-exhausted-sampling
428/498 Test #554: thread-limit-exhausted-sampling .................................................................................................................................................   Passed    8.72 sec
        Start 555: thread-limit-exhausted-binary-rewrite
429/498 Test #555: thread-limit-exhausted-binary-rewrite ...........................................................................................................................................   Passed    9.85 sec
        Start 556: thread-limit-exhausted-runtime-instrument
430/498 Test #556: thread-limit-exhausted-runtime-instrument .......................................................................................................................................   Passed   12.59 sec
        Start 557: thread-limit-exhausted-sys-run
431/498 Test #557: thread-limit-exhausted-sys-run ..................................................................................................................................................   Passed    8.47 sec
```

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants