bdev/nvme: MPDBG debug prints for multipath failover diagnosis#59
Merged
sadeghsav merged 1 commit intoJul 20, 2026
Merged
Conversation
Add print-only instrumentation (no logic changes) to trace why an aborted
IO on a multipath bdev is failed up to the caller instead of being
rerouted to a surviving path. All prints are prefixed "MPDBG" and only
fire on the error/retry path, so steady-state IO is not affected.
Instrumented:
- bdev_nvme_io_complete_nvme_status: cpl sct/sc/dnr, retry_count vs
bdev_retry_count, accel_sequence, and which exit is taken (GATE1
dnr/aborted/retry-exhausted, GATE2 accel_sequence, check_retry_io
TRUE->requeue / FALSE->fail-up).
- bdev_nvme_check_retry_io: the four branch predicates and the
reroute-vs-fail-up decision.
- any_io_path_may_become_available: one line per io_path in the channel
(ctrlr name, ana_state, ana_transition_timedout, ana_state_updating,
qpair_connected, ctrlr_failed) plus the final verdict.
- bdev_nvme_retry_io: whether a queued retry re-dispatches on the same
io_path or re-selects via find_io_path.
Diff is strictly additive: no existing statement, condition, or control
flow is modified.
schmidt-scaled
force-pushed
the
debug/multipath-failover-prints
branch
from
July 20, 2026 11:03
1309d1f to
2ec1d0e
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.
bdev/nvme: MPDBG debug prints for multipath failover diagnosis
Diagnostic instrumentation to resolve why, in the
k8s_native_scale_break-20260716incident, anABORTED - SQ DELETIONIO on the tertiary'sLVS_31/hublvolmultipath bdev was failed up to the hublvol layer instead of rerouted to the surviving path.Why
Elimination against the stock code (
bdev_nvme_io_complete_nvme_status→check_retry_io→any_io_path_may_become_available) left a contradiction: withbdev_retry_count=2,reconnect_delay=1,disable_read_ana_log_page=true,allow_accel_sequence=false, and no bdev-level reset, the aborted IO should have been requeued/rerouted — yet the log shows a synchronous fail-up. The NOTICE-level logs don't expose theany_io_path/find_io_pathdecision, so we can't see whether the second path was actually a live io_path at the failing instant. These prints expose exactly that.What (strictly additive — no logic changes)
All prints are
MPDBG-prefixed and fire only on the error/retry path:bdev_nvme_io_complete_nvme_status—sct/sc/dnr,retry_countvsbdev_retry_count,accel_seq, and the exit taken:GATE1(dnr/aborted/retry-exhausted),GATE2(accel_sequence),check_retry_io=TRUE→requeue, orcheck_retry_io=FALSE→fail-up.bdev_nvme_check_retry_io— the four branch predicates (path_err/sq_del/io_avail/ctrlr_avail) and the reroute-vs-fail-up decision.any_io_path_may_become_available— one line per io_path (ctrlr, ana_state, ana_timedout, ns_updating, qpair_connected, ctrlr_failed) + verdict. This is the crux.bdev_nvme_retry_io— whether a queued retry re-dispatches on the same io_path or re-selects.The diff removes zero existing statements; every
if/condition/control-flow line is byte-identical to the base branch. This is not intended to merge — it's a temporary diagnostic build.Use
Build + deploy, reproduce the tertiary outage for LVS_31, then:
The
any_io_pathper-path dump at the abort instant decides it: either both hub paths were unavailable (stock fail-up is correct) or a live second io_path was skipped (real bdev_nvme bug).🤖 Generated with Claude Code