aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-12-08 09:10:24 -0800
committerGravatar GitHub <noreply@github.com>2016-12-08 09:10:24 -0800
commitef17501a60a3171121ecb9f2814d6589104e98b3 (patch)
tree81bfbc95349ddd2b5440b6c1feb46180fc96ee8c /src/core/lib/surface
parent17ebccffe714afed39cfd9cb2a33bde33160af77 (diff)
parent99080d1488ab1d286d2019a15b3f18f0a6e630fb (diff)
Merge pull request #8898 from rjshade/fix_tsan
Fix TSAN failure when running DEBUG mode.
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r--src/core/lib/surface/completion_queue.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c
index 4e0feb56ac..184c1a1a16 100644
--- a/src/core/lib/surface/completion_queue.c
+++ b/src/core/lib/surface/completion_queue.c
@@ -354,11 +354,13 @@ static void dump_pending_tags(grpc_completion_queue *cc) {
gpr_strvec v;
gpr_strvec_init(&v);
gpr_strvec_add(&v, gpr_strdup("PENDING TAGS:"));
+ gpr_mu_lock(cc->mu);
for (size_t i = 0; i < cc->outstanding_tag_count; i++) {
char *s;
gpr_asprintf(&s, " %p", cc->outstanding_tags[i]);
gpr_strvec_add(&v, s);
}
+ gpr_mu_unlock(cc->mu);
char *out = gpr_strvec_flatten(&v, NULL);
gpr_strvec_destroy(&v);
gpr_log(GPR_DEBUG, "%s", out);