From: John Spray Date: Wed, 17 Jun 2015 10:50:40 +0000 (+0100) Subject: common/Thread: print msg on join errors X-Git-Tag: v9.0.3~116^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe23c6c5e66cae3ca228f3b5afc492300e09813f;p=ceph.git common/Thread: print msg on join errors Signed-off-by: John Spray --- diff --git a/src/common/Thread.cc b/src/common/Thread.cc index 07e12499be6..3ec358acac4 100644 --- a/src/common/Thread.cc +++ b/src/common/Thread.cc @@ -161,7 +161,14 @@ int Thread::join(void **prval) } int status = pthread_join(thread_id, prval); - assert(status == 0); + if (status != 0) { + char buf[256]; + snprintf(buf, sizeof(buf), "Thread::join(): pthread_join " + "failed with error %d\n", status); + dout_emergency(buf); + assert(status == 0); + } + thread_id = 0; return status; }