I accidentally had code that tried to shut the same queue down multiple times. When I did, it would either hang with this backtrace
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007ffff4c02657 in _L_lock_909 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007ffff4c02480 in __GI___pthread_mutex_lock (mutex=0x11a9b38) at ../nptl/pthread_mutex_lock.c:79
#3 0x00007ffff00e1565 in gpr_mu_lock (mu=0x11a9b38) at src/core/support/sync_posix.c:48
#4 0x00007ffff0359c7c in grpc_completion_queue_shutdown (cc=0x11a9b20) at src/core/surface/completion_queue.c:384
or it would output assertion failed: pthread_mutex_lock(mu) == 0 with this backtrace
#0 0x00007ffff62c7cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff62cb0d8 in __GI_abort () at abort.c:89
#2 0x00007ffff00e1597 in gpr_mu_lock (mu=0x11a9b38) at src/core/support/sync_posix.c:48
#3 0x00007ffff0359c7c in grpc_completion_queue_shutdown (cc=0x11a9b20) at src/core/surface/completion_queue.c:384