diff --git a/src/core/lib/channel/connected_channel.cc b/src/core/lib/channel/connected_channel.cc index 9ea8faeb507..b7eccc29dd4 100644 --- a/src/core/lib/channel/connected_channel.cc +++ b/src/core/lib/channel/connected_channel.cc @@ -411,6 +411,8 @@ auto ConnectedChannelStream::RecvMessages( } if (cancel_on_error && !status.ok()) { incoming_messages.CloseWithError(); + } else { + incoming_messages.Close(); } return Immediate(LoopCtl(status.status())); }; diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index 840ed838331..c34d29d152f 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -2978,7 +2978,8 @@ void ClientPromiseBasedCall::CommitBatch(const grpc_op* ops, size_t nops, StartRecvMessage( op, completion, [this]() { - return server_initial_metadata_.receiver.AwaitClosed(); + return Race(server_initial_metadata_.receiver.AwaitClosed(), + server_to_client_messages_.receiver.AwaitClosed()); }, &server_to_client_messages_.receiver, false, spawner); break; diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/5061521840340992 b/test/core/end2end/fuzzers/client_fuzzer_corpus/5061521840340992 new file mode 100644 index 00000000000..880e5959705 --- /dev/null +++ b/test/core/end2end/fuzzers/client_fuzzer_corpus/5061521840340992 @@ -0,0 +1,51 @@ +api_actions { + create_call { + propagation_mask: 6 + method { + value: "~" + } + timeout: 34816 + } +} +api_actions { + queue_batch { + operations { + send_initial_metadata { + } + } + operations { + send_message { + } + } + operations { + receive_message { + } + } + } +} +api_actions { + create_server { + } +} +api_actions { + disable_tracer: "(" +} +api_actions { + destroy_call { + } +} +api_actions { + poll_cq { + } +} +api_actions { +} +api_actions { + shutdown_server { + } +} +config_vars { + verbosity: "\364\204\204\204\364\204\204\204\364\204\204\204\364\204\204\204\364\204\204\204\364\204\204\204\364\204\204\204\364\204\204\204\004" + stacktrace_minloglevel: "yyyyyyyyyyyyy&yyyyyyy\177\014" + experiments: 1099511626496 +}