Maybe there is a race condition between suspending/resuming connection.
This happens only if I use "poll()" - not with "epoll()". Requests were
created using "wget" (http 1.0) - one after the other.
What I did:
The MHD-Thread calls "MHD_suspend_connection()" inside "MHD_ContentReaderCallback()".
The worker thread calls "MHD_resume_connection()" if the connection is suspended.
Sometimes the MHD thread sleeps forever - it does not continue to work on
resume connections. The polling-variable "num_connections" is zero.
The "connection_suspended"-flag and calls to "MHD_resume/suspend_connection()" are
protected by a mutex.
The callstack from the core-dump:
#0 0x00007f38889c512d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00000000006786c6 in MHD_poll_all (daemon=0x359a930, may_block=1) at /home/markus/Website/gloriatv/dev/src/contrib/microhttpd/daemon.c:2485
#2 0x0000000000678ba9 in MHD_poll (daemon=0x359a930, may_block=1) at /home/markus/Website/gloriatv/dev/src/contrib/microhttpd/daemon.c:2642
#3 0x0000000000679557 in MHD_select_thread (cls=0x359a930) at /home/markus/Website/gloriatv/dev/src/contrib/microhttpd/daemon.c:2928
#4 0x00007f388a758182 in start_thread (arg=0x7f38846fb700) at pthread_create.c:312
#5 0x00007f38889d247d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
Locals on frame #1:
i = 0
timeout = -1
poll_server = 2
poll_listen = 0
tmp = 114 'r'
ltimeout = 301000
poll_pipe = 1
p = 0x7f387c0008c0
num_connections = 0
pos = 0x0
next = 0x0
Thanks a lot
Markus
[Prev in Thread]
Current Thread
[Next in Thread]
[libmicrohttpd] Connection hangs,
Markus Doppelbauer<=