fix-5-amdgpu-load: needs_reboot disagrees between fix.rs catalog and diagnose.rs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 40
- Forks
- 9
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 59
Description
Summary
fix-5-amdgpu-load's needs_reboot value disagrees between the two places that define it, the same defect class fixed for fix-9-igpu-dgpu's auto_applicable in #413.
crates/rocm-core/src/fix.rs(FixRecipecatalog, line 179):needs_reboot: true— unconditional.crates/rocm-core/src/diagnose.rs(check_5_amdgpu_not_loaded, line 730):needs_reboot: !blacklisted.is_empty()— onlytruewhen a modprobe blacklist entry was found;falseotherwise (e.g. amdgpu simply isn't loaded yet, no blacklist involved).
Both Fix values are independently constructed for the same fix-5-amdgpu-load id, so rocm diagnose and rocm fix fix-5-amdgpu-load can report different needs_reboot for the same underlying condition, and rocm diagnose --json/its rendered flags: line reflects whichever branch diagnose.rs took.
Which is correct?
Unclear without more investigation — possibly the diagnose.rs conditional is actually more accurate (a reboot may genuinely not be needed if there was no blacklist to clear, since sudo modprobe amdgpu alone doesn't require one), in which case fix.rs's unconditional true is the one that should be relaxed. This needs a decision, not just picking one side to match the other.
Suggested next step
- Decide which value is semantically correct for each case (blacklisted vs. not).
- Either make
fix.rs'sFixRecipe.needs_rebootconditional to match, or simplifydiagnose.rs's construction to the unconditionaltrue, so both surfaces agree. - Add a regression test analogous to
fix_9_igpu_dgpu_is_auto_applicable_on_linuxindiagnose.rs(added in #413) pinning the expected value for both the blacklisted and non-blacklisted cases, to prevent future drift.
Context
Found during the follow-up review of #413, which fixed the same drift class for fix-9-igpu-dgpu's auto_applicable field. Left out of that PR's scope since it's a different fix-id and needs its own correctness decision rather than a straightforward alignment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the fix-5-amdgpu-load definitions in crates/rocm-core/src/fix.rs and check_5_amdgpu_not_loaded in crates/rocm-core/src/diagnose.rs. First determine the correct needs_reboot result for blacklisted and non-blacklisted cases, then inspect the regression test for fix_9_igpu_dgpu_is_auto_applicable_on_linux. Done means both construction paths agree and tests cover both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100