Skip to content

Fix RequestReply duplicate reply deadlock#9191

Open
rootp1 wants to merge 1 commit into
knative:mainfrom
rootp1:fix/requestreply-duplicate-reply-deadlock
Open

Fix RequestReply duplicate reply deadlock#9191
rootp1 wants to merge 1 commit into
knative:mainfrom
rootp1:fix/requestreply-duplicate-reply-deadlock

Conversation

@rootp1

@rootp1 rootp1 commented Jul 15, 2026

Copy link
Copy Markdown

Fixes #9190

Proposed Changes

  • stop sending duplicate reply events while holding the RequestReply inflight-map read lock
  • make duplicate reply delivery non-blocking so cleanup can still acquire the write lock
  • add a regression test that would previously hang on a duplicate reply hitting a full reply channel

Pre-review Checklist

  • At least 80% unit test coverage
    Current local run: go test -cover ./pkg/requestreply reported 77.1% statement coverage for pkg/requestreply. This PR adds a focused regression test, but does not yet bring the package above the template target on its own.
  • E2E tests for any new behavior
    Not applicable for this change as implemented in this PR. The fix is confined to the in-process RequestReply handler concurrency path, and the regression is covered with a focused unit test in pkg/requestreply/ingress_handler_test.go.
  • Docs PR for any user-facing impact
    Not applicable. This is an internal reliability fix with no user-facing API, CLI, or workflow change.
  • Spec PR for any new API feature
    Not applicable. No API surface or behavior contract is being extended.
  • Conformance test for any change to the spec
    Not applicable. There is no spec change in this PR.

Release Note

Fixed a RequestReply deadlock that could occur when duplicate reply events were delivered for the same inflight request.

Docs

No docs update required; this is an internal reliability fix with no API or user workflow change.

@knative-prow knative-prow Bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 15, 2026
@knative-prow

knative-prow Bot commented Jul 15, 2026

Copy link
Copy Markdown

Welcome @rootp1! It looks like this is your first PR to knative/eventing 🎉

@knative-prow

knative-prow Bot commented Jul 15, 2026

Copy link
Copy Markdown

Hi @rootp1. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@knative-prow knative-prow Bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 15, 2026
@knative-prow

knative-prow Bot commented Jul 15, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rootp1
Once this PR has been reviewed and has the lgtm label, please assign cali0707 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow
knative-prow Bot requested review from Cali0707 and matzew July 15, 2026 10:14
@rootp1

rootp1 commented Jul 15, 2026

Copy link
Copy Markdown
Author

@Cali0707, please have a look, whenever you have a chance to

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

Labels

needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title: RequestReply can deadlock when duplicate reply events arrive

1 participant