libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] libmicrohttpd running into indefinite loops


From: Evgeny Grin
Subject: Re: [libmicrohttpd] libmicrohttpd running into indefinite loops
Date: Sat, 26 Nov 2016 15:30:28 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

On 25.11.2016 18:24, Alexander Couzens wrote:
> Hi,
> 
> I'm running nodogsplash on serveral small routers. Nodogsplash is a
> wifi splashpage portal. In version v2 (upcoming release) we switched to
> libmicrohttpd.
> libmicrohttpd is used without ssl support. These system runs OpenWrt
> 15.05 on 32Mb ram, 4mb flash. As libc it's using musl libc.
> 
> kernel: 3.18.36
> libmicrohttpd: 0.9.50
> 
> nodogsplash is using mhd threading+epoll. On some devices the
> libmicrohttpd thread taking all CPU running into the following
> indefinite loop traced with strace.
> 
> [...]
> clock_gettime(CLOCK_MONOTONIC, {147525, 556733385}) = 0
> clock_gettime(CLOCK_MONOTONIC, {147525, 556850090}) = 0
> sendfile64(121, 127, [0], 4294967295)   = -1 EINVAL (Invalid argument)
> send(121, "", 0, MSG_NOSIGNAL)          = 0
> [...]
> 
> I think this is exactly the code called by daemon.c
> send_param_adapter(). 
> send_param_adapter() / send_cls() was called with a zero length as
> parameter.
> 
> Any further ideas?

Looks like you are sending 4GiB-1 file on 32bit OS and sendfile failed
as mmap operations are not supported on such file.
Fallback to ordinal read()/send() should be fixed in
b3f1a958ce613f304234ecb6506976db26c117dc.
Could you retry with latest git version?

-- 
Best Wishes,
Evgeny

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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