summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-08-06 11:46:05 +0200
committerSimon Rettberg2019-08-06 11:46:05 +0200
commit8e152f715c015cbd1821ae9422d75db02a04573b (patch)
tree97ec3764fa4af61a6640fa56876f664b6895c27f
parent[SERVER] Fix: Client thread could destroy sendMutex while in use (diff)
downloaddnbd3-8e152f715c015cbd1821ae9422d75db02a04573b.tar.gz
dnbd3-8e152f715c015cbd1821ae9422d75db02a04573b.tar.xz
dnbd3-8e152f715c015cbd1821ae9422d75db02a04573b.zip
[SERVER] Improve debug output if a locked lock gets destroyed
-rw-r--r--src/server/locks.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server/locks.c b/src/server/locks.c
index a5b7c76..2c0cb27 100644
--- a/src/server/locks.c
+++ b/src/server/locks.c
@@ -256,6 +256,7 @@ int debug_mutex_destroy(const char *name, const char *file, int line, pthread_mu
if ( locks[i].lock == lock ) {
if ( locks[i].locked ) {
logadd( LOG_ERROR, "Tried to destroy lock %p (%s) at %s:%d when it is still locked\n", (void*)lock, name, file, line );
+ logadd( LOG_ERROR, "Currently locked by: %s", locks[i].where );
exit( 4 );
}
locks[i].lock = NULL;