Skip to content

Revert "fix: prevent double-free crash during process exit in amd-smi… - #2640

Merged
dgaliffiAMD merged 1 commit into
developfrom
users/habajpai-amd/revert-doublefree-workaound-pr-2213
Jan 16, 2026
Merged

dgaliffiAMD merged 1 commit into
developfrom
users/habajpai-amd/revert-doublefree-workaound-pr-2213

Conversation

@habajpai-amd

@habajpai-amd habajpai-amd commented Jan 16, 2026 •

Copy link
Copy Markdown
Contributor

… (#2213)"

This reverts commit 7b00d3a.

The workaround is no longer needed - root cause fixed in amd-smi and rocm-smi-lib.

Motivation

Technical Details

JIRA ID

Test Plan

Test Result

Submission Checklist

@habajpai-amd
habajpai-amd marked this pull request as ready for review January 16, 2026 07:15
@habajpai-amd
habajpai-amd requested review from a team and jrmadsen as code owners January 16, 2026 07:15
Copilot AI review requested due to automatic review settings January 16, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reverts a previous workaround that prevented double-free crashes during process exit when using AMD SMI libraries. The workaround is no longer needed as the root cause has been fixed in the underlying amd-smi and rocm-smi-lib libraries.

Changes:

  • Removes AMD SMI-specific exit handling logic that forced early finalization and _exit() calls
  • Restores proper AMD SMI shutdown sequence with conditional cleanup
  • Removes library unload prevention mechanisms that were part of the workaround

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
exit_gotcha.cpp Removes AMD SMI-specific exit handling workaround and cleans up unused includes
amd_smi.cpp Restores conditional shutdown logic with proper amdsmi_shut_down() call
gpu.cpp Removes library unload prevention function and its invocation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@habajpai-amd
habajpai-amd force-pushed the users/habajpai-amd/revert-doublefree-workaound-pr-2213 branch from 76b113c to 64ec8ab Compare January 16, 2026 13:40
@habajpai-amd
habajpai-amd force-pushed the users/habajpai-amd/revert-doublefree-workaound-pr-2213 branch from 64ec8ab to 8bc4163 Compare January 16, 2026 15:26
…#2213)"

This reverts commit 7b00d3a.

The workaround is no longer needed - root cause fixed in:
- rocm-smi-lib (PR #2531): Made devInfoTypesStrings file-local static
- amdsmi (PR #2575): Added visibility("hidden") attribute
@habajpai-amd
habajpai-amd force-pushed the users/habajpai-amd/revert-doublefree-workaound-pr-2213 branch from 8bc4163 to 452891a Compare January 16, 2026 15:39
@dgaliffiAMD
dgaliffiAMD merged commit b53c996 into develop Jan 16, 2026
59 of 61 checks passed
@dgaliffiAMD
dgaliffiAMD deleted the users/habajpai-amd/revert-doublefree-workaound-pr-2213 branch January 16, 2026 21:08
systems-assistant Bot pushed a commit to ROCm/rocprofiler-systems that referenced this pull request Jan 16, 2026
 amd-smi (#2213)" (#2640)

This reverts commit 7b00d3a89b43bdd084454843db0c8412f44414dd.

The workaround is no longer needed - root cause fixed in:
- rocm-smi-lib (PR #2531): Made devInfoTypesStrings file-local static
- amdsmi (PR #2575): Added visibility("hidden") attribute
[rocm-systems] ROCm/rocm-systems#2640 (commit b53c996)
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