rocr: IPC: Manage IPC socket thread lifetime#3256
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the ROCR runtime’s IPC (DMA-buf) Unix socket server lifecycle management by tracking the socket server thread handle and joining/closing it during Runtime::Unload() to address ASan-reported thread/handle leaks.
Changes:
- Store the IPC socket server thread handle when creating the socket server thread.
- Initialize the new thread-handle member in
Runtime::Runtime(). - Join and close the IPC socket server thread during
Runtime::Unload().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp |
Tracks the IPC socket server thread handle and joins/closes it during runtime unload. |
projects/rocr-runtime/runtime/hsa-runtime/core/inc/runtime.h |
Adds a os::Thread member to persist the IPC socket server thread handle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
radhaksri
added a commit
to ROCm/TheRock
that referenced
this pull request
Feb 13, 2026
Cherry-picked commit from ROCm/rocm-systems#3256: - rocr: IPC: Manage IPC socket thread lifetime
c6e50f0 to
4e1206b
Compare
dayatsin-amd
approved these changes
Feb 20, 2026
cfreeamd
approved these changes
Feb 20, 2026
4e1206b to
aa3c8e4
Compare
Track IPC socket server thread handle Join/close thread during runtime unload to clear ASan-reported leaks
and cleanup before restart
… on thread failure The bind() and listen() error paths returned without closing the socket fd and leaking it. Thread-creation failure also left stale entries in ipc_sock_server_conns_. Clean up properly in all three cases.
2f4056a to
94f67e3
Compare
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.
Track IPC socket server thread handle
Join/close thread during runtime unload to clear ASan-reported leaks
Motivation
Technical Details
JIRA ID
Test Plan
Test Result
Submission Checklist