Fix cache_read_vc assertion crash in redirect flow#13089
Merged
bneradt merged 1 commit intoapache:masterfrom Apr 15, 2026
Merged
Fix cache_read_vc assertion crash in redirect flow#13089bneradt merged 1 commit intoapache:masterfrom
bneradt merged 1 commit intoapache:masterfrom
Conversation
This fixes a crash where the assertion at HttpCacheSM.cc:137 fails:
ink_assert((cache_read_vc == nullptr) ||
master_sm->t_state.redirect_info.redirect_in_process)
The crash occurs when a redirect cache lookup completes after
redirect_in_process has been cleared, but cache_read_vc from the
original request is still set. The root cause is that reset() only
resets captive_action but does not close the existing cache_read_vc
or cancel any pending retry events.
This patch adds the missing cleanup to reset(): it now closes any
existing cache read VC and cancels pending retry events before
starting a new cache operation. This ensures stale state from a
previous cache operation cannot interfere with the new one.
masaori335
approved these changes
Apr 14, 2026
Contributor
|
[approve ci] |
Contributor
|
Cherry-picked to 10.2.x |
cmcfarlen
pushed a commit
that referenced
this pull request
Apr 15, 2026
This fixes a crash where the assertion at HttpCacheSM.cc:137 fails:
ink_assert((cache_read_vc == nullptr) ||
master_sm->t_state.redirect_info.redirect_in_process)
The crash occurs when a redirect cache lookup completes after
redirect_in_process has been cleared, but cache_read_vc from the
original request is still set. The root cause is that reset() only
resets captive_action but does not close the existing cache_read_vc
or cancel any pending retry events.
This patch adds the missing cleanup to reset(): it now closes any
existing cache read VC and cancels pending retry events before
starting a new cache operation. This ensures stale state from a
previous cache operation cannot interfere with the new one.
(cherry picked from commit 9089a5c)
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.
This builds on top of #12182
This fixes a crash seen in docs where the assertion at
HttpCacheSM.cc:137 fails:
The crash occurs when a redirect cache lookup completes after
redirect_in_process has been cleared, but cache_read_vc from the
original request is still set. The root cause is that reset() only
resets captive_action but does not close the existing cache_read_vc
or cancel any pending retry events.
This patch adds the missing cleanup to reset(): it now closes any
existing cache read VC and cancels pending retry events before
starting a new cache operation. This ensures stale state from a
previous cache operation cannot interfere with the new one.