Skip to content

SDR walk aborts on a Get SDR reply without record data #127

Description

@bertysentry

Where: src/main/java/org/metricshub/ipmi/core/coding/commands/sdr/GetSdr.java (getResponseData), src/main/java/org/metricshub/ipmi/client/runner/AbstractIpmiRunner.java (getSensorData, getSensorViaChunks).

What happens: GetSdr.getResponseData() rejects any response shorter than 3 bytes with IllegalArgumentException("Invalid response payload length"). A successful Get SDR response that carries the next record ID (2 bytes) but no record data is therefore rejected before the runner can read the next record ID. getSensorData() rethrows it, so the whole repository walk fails and getSensors(), getFrus() and getFrusAndSensorsAsStringResult() return nothing, although the runner is meant to skip records it cannot read (#76).

The "BMC returned no data at offset" skip in getSensorViaChunks() is unreachable for the same reason: an empty chunk never gets past the decoder.

Evidence: by the code (found by Codex while reviewing #124); not reproduced on the test BMCs.

Suggested fix: accept 2-byte responses in GetSdr.getResponseData() (next record ID, empty record data), so that isTruncated() / getSensorViaChunks() log and skip the record and the walk advances; add a unit test with a 2-byte response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions