aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/fuzzers
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-05-22 16:07:49 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2018-05-22 16:07:49 -0700
commit8aebc7225dc19a5fa679b9cbca1847173566619b (patch)
tree6b3cba26e84f71e985175398bb3df1e635bd5151 /test/core/end2end/fuzzers
parentbaa3a7090651bfb2d3c41c3d74f80bea8b911f87 (diff)
Add comment on the changes
Diffstat (limited to 'test/core/end2end/fuzzers')
-rw-r--r--test/core/end2end/fuzzers/server_fuzzer.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/core/end2end/fuzzers/server_fuzzer.cc b/test/core/end2end/fuzzers/server_fuzzer.cc
index 21e99e34d9..d1259259f3 100644
--- a/test/core/end2end/fuzzers/server_fuzzer.cc
+++ b/test/core/end2end/fuzzers/server_fuzzer.cc
@@ -105,6 +105,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
grpc_server_cancel_all_calls(server);
grpc_millis deadline = grpc_core::ExecCtx::Get()->Now() + 5000;
for (int i = 0; i <= requested_calls; i++) {
+ // A single grpc_completion_queue_next might not be sufficient for getting
+ // the tag from shutdown, because we might potentially get blocked by
+ // an operation happening on the timer thread.
+ // For example, the deadline timer might expire, leading to the timer
+ // thread trying to cancel the RPC and thereby acquiring a few references
+ // to the call. This will prevent the shutdown to complete till the timer
+ // thread releases those references.
do {
ev = grpc_completion_queue_next(cq, gpr_inf_past(GPR_CLOCK_REALTIME),
nullptr);