Skip to content

fix(amdsmi): drm_examples SIGSEGV due to partition var init - #11922

Merged
amd-hsivasun merged 1 commit into
ROCm:developfrom
dee-mew:amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop
Oct 1, 2026
Merged

amd-hsivasun merged 1 commit into
ROCm:developfrom
dee-mew:amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop

Conversation

@dee-mew

@dee-mew dee-mew commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Fix a segmentation fault in amd_smi_drm_ex on Strix/Gorgon Halo systems when the accelerator-partition loop encounters APIs returning NOT_SUPPORTED or NO_PERM. The Jira title identifies the problem as"[Strix Halo][AMD SMI 10.1.0] amd_smi_drm_ex SIGSEGV in accelerator partition loop when APIs return NOT_SUPPORTED/NO_PERM."

The issue was reproduced on a Strix Halo APU with gfx1151 on AMD SMI library 27.1.0, ROCm 10.2.0, and amdgpu 6.19.0 .

Technical Details

The change should ensure that amd_smi_drm_ex safely handles unsupported or permission-restricted API results in the accelerator-partition processing path instead of reaching a SIGSEGV.

Issue Tracking

JIRA ID: ROCM-30849

Test Plan

  • Reproduce the amd_smi_drm_ex segmentation fault on a Strix/Gorgon Halo system.
  • Exercise the accelerator-partition path where APIs return NOT_SUPPORTED or NO_PERM.
  • Run the example again with the fix and verify that it no longer crashes.
  • Validate on the Strix/Gorgon Halo setup using the installed ROCm stack.

Test Result

After running the example again with the fix, SIGSEGV is not reported.

Submission Checklist

@dee-mew
dee-mew requested a review from a team September 21, 2026 12:59
@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass —
⛔ Forbidden Files ✅ Pass —
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/amdsmi/example/amd_smi_drm_example.cc; no test file found
🚫 Draft PR 🔜 To Be Enabled —
🚩 Feature Flag 🔜 To Be Enabled —
📊 Code Coverage 🔜 To Be Enabled —

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@marifamd marifamd changed the title amd_smi_drm_ex SIGSEGV in accelerator partition loop fix(amdsmi): drm examples SIGSEGV due to partition var init Sep 22, 2026
@marifamd marifamd changed the title fix(amdsmi): drm examples SIGSEGV due to partition var init fix(amdsmi): drm_examples SIGSEGV due to partition var init Sep 22, 2026
@marifamd
marifamd force-pushed the amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop branch from 0ed867e to d89f348 Compare September 24, 2026 14:27
@dee-mew
dee-mew force-pushed the amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop branch from d89f348 to 6ddc00b Compare September 27, 2026 09:52
@dee-mew
dee-mew force-pushed the amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop branch from 6ddc00b to 41807fa Compare September 29, 2026 12:30
… NOT_SUPPORTED/NO_PERM

Signed-off-by: Deepak Mewar <deepak.mewar@amd.com>
@gabrpham
gabrpham force-pushed the amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop branch from 41807fa to 88a28ad Compare September 30, 2026 18:58
@amd-hsivasun
amd-hsivasun merged commit 5d88f80 into ROCm:develop Oct 1, 2026
122 of 123 checks passed
@dee-mew
dee-mew deleted the amd_smi_drm_ex_SIGSEGV_in_accelerator_partition_loop branch October 5, 2026 04:18
@systems-assistant

Copy link
Copy Markdown
Contributor

TheRock Submodule Bump Activity

Newest first

marifamd added a commit that referenced this pull request Oct 9, 2026
…smi-verification-fixes

Conflicts:
- amdsmi_cli/amdsmi_cli.py: take develop. #8624 already drops the
  exception class-name prefix for every output format and sets the
  format from argv before parsing.
- example/amd_smi_drm_example.cc: keep the success-guarded profile loop.
  #11922 only zero-initialized the structs.
- tests/python/cli/base.py: keep develop's reset --profile branch and the
  requires_value skip, reported in develop's "Untested" format.

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
marifamd added a commit that referenced this pull request Oct 13, 2026
- Quote the real --json shape, a list
- Drop the zero-init clause from the DRM entry; #11922 made that change

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
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.

5 participants