libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Recursive lock in GIT


From: Markus Doppelbauer
Subject: [libmicrohttpd] Recursive lock in GIT
Date: Sun, 21 May 2017 12:52:23 +0200

Hello,

I have updated "0.9.53" to GIT - maybe a week ago.
There is a recursive lock to "daemon->cleanup_connection_mutex"

------------

__owner=6065 holds the lock - but tries to lock again in "connection.c:2837"

The callstack:
    "resume_suspended_connections()" at daemon.c:2908
    "MHD_connection_handle_idle()" at connection.c:3344
    "cleanup_connection()" at connection.c:2837

The mutex is locked in "daemon.c":"resume_suspended_connections()" - frame 5
The mutex is locked again in "connection.c":"cleanup_connection()" - frame 3

------------

(gdb) thread apply all bt

Thread 4 (Thread 0x7f4166ef8700 (LWP 6065)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x0000003c0c0095d8 in _L_lock_854 () from /lib64/libpthread.so.0
#2  0x0000003c0c0094a7 in __pthread_mutex_lock (mutex=0x36e4868) at pthread_mutex_lock.c:61
#3  0x00000000004998c4 in cleanup_connection (connection=0x7f4158000e50) at /.../microhttpd/connection.c:2837
#4  0x000000000049b830 in MHD_connection_handle_idle (connection=0x7f4158000e50) at /.../microhttpd/connection.c:3344
#5  0x000000000049e659 in resume_suspended_connections (daemon=0x36e4720) at /.../microhttpd/daemon.c:2908
#6  0x00000000004a404c in MHD_epoll (daemon=0x36e4720, may_block=1) at /.../microhttpd/daemon.c:4238
#7  0x00000000004a4825 in MHD_select_thread (cls=0x36e4720) at /.../microhttpd/daemon.c:4542
#8  0x0000003c0c007aa1 in start_thread (arg=0x7f4166ef8700) at pthread_create.c:301
#9  0x0000003c0bce8bcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115

Thread 2 (Thread 0x7f41417fb700 (LWP 22899)):
#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x0000003c0c0095d8 in _L_lock_854 () from /lib64/libpthread.so.0
#2  0x0000003c0c0094a7 in __pthread_mutex_lock (mutex=0x36e4868) at pthread_mutex_lock.c:61
#3  0x000000000049eb16 in MHD_resume_connection (connection=0x7f41580015e0) at /.../microhttpd/daemon.c:2808
[snip: processes request]

Thread 1 (Thread 0x7f41aeef68a0 (LWP 6058)):
[snip: main() thread]

------------

(gdb) thread 2
(gdb) frame 3
(gdb) p daemon->cleanup_connection_mutex
$2 = {__data = {__lock = 2, __count = 0, __owner = 6065, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, 
  __size = "\002\000\000\000\000\000\000\000\261\027\000\000\001", '\000' <repeats 26 times>, __align = 2}

------------

(gdb) thread 4
(gdb) frame 3
(gdb) p daemon->cleanup_connection_mutex
$3 = {__data = {__lock = 2, __count = 0, __owner = 6065, __nusers = 1, __kind = 0, __spins = 0, __list = {__prev = 0x0, __next = 0x0}}, 
  __size = "\002\000\000\000\000\000\000\000\261\027\000\000\001", '\000' <repeats 26 times>, __align = 2}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]