libmicrohttpd
[Top][All Lists]
Advanced

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

Re: [libmicrohttpd] libmicrohttpd 0.9.55 https and MHD_USE_EPOLL


From: Evgeny Grin
Subject: Re: [libmicrohttpd] libmicrohttpd 0.9.55 https and MHD_USE_EPOLL
Date: Tue, 5 Sep 2017 23:22:47 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

Hi Denis,

Reproduced on CentOS 7 with current git master.
Will look into it.

-- 
Best Wishes,
Evgeny Grin

On 05.09.2017 4:54, Denis Dowling wrote:
> Hi Evgeny,
> 
> It is actually the GET that is causing the problem.
> 
> I have been able to duplicate as follows:
> - Testing on CentOS7.3.1611. Everything up to date according to yum.
> - Start with a clean unpack of libmicrohttpd-0.9.55
> - Edit the https_fileserver_example.c file and change the 
> MHD_USE_THREAD_PER_CONNECTION option to MHD_USE_EPOLL. Leave the other 
> options as they are.
> - make https_fileserver_example
> - In the same directory create 2 files of different sizes (1kB and 100kB)
>   dd if=/dev/urandom of=small.dat bs=1024 count=1
>   dd if=/dev/urandom of=big.dat bs=1024 count=100
> - Start https_fileserver_example
>    ./https_fileserver_example 8888
> - In another window use wget to grab both files
>   wget --no-check-certificate https://localhost:8888/small.dat
>   wget --no-check-certificate https://localhost:8888/big.dat
> 
> In my case the big.dat download freezes at 16384 bytes downloaded. If I 
> change from MHD_USE_EPOLL to MHD_USE_POLL it works fine. If I use 
> MHD_USE_AUTO it hangs as the system detects epoll() and uses it.
> 
> Regards,
> Denis
> 
> -----Original Message-----
> From: libmicrohttpd [mailto:address@hidden On Behalf Of Evgeny Grin
> Sent: Monday, 4 September 2017 8:11 PM
> To: address@hidden
> Subject: Re: [libmicrohttpd] libmicrohttpd 0.9.55 https and MHD_USE_EPOLL
> 
> Hi Denis,
> 
> Thanks for report!
> Minimal example could help a lot.
> 
> In the meantime, could you provide more details how do you process incoming 
> data?
> Do you use MHD_USE_ERROR_LOG flag for daemon? What's the output on stderr?
> 
> Also you could build MHD from source, modify definition of PUT_SIZE in 
> src/testcurl/test_large_put.c and run 'make check'
> 
> --
> Wishes,
> Evgeny
> 
> On 04.09.2017 7:35, Denis Dowling wrote:
>> Hi All,
>>
>>
>>
>> I recently updated some code to use version 0.9.55 of libmicrohttpd.
>> After the change I noticed that larger (~100kB) HTTPS requests are
>> blocking forever. During the change I swapped from using the option
>> MHD_USE_POLL to MHD_USE_AUTO. I can see from an strace that
>> libmicrohttpd is now using epoll() for the dispatching.  If I switch
>> back to MHD_USE_POLL then everything works fine again. If I use HTTP
>> requests then everything is fine so it is something to do with the
>> combination of HTTPS and epoll(). Other options are
>> MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_SUSPEND_RESUME | MHD_USE_TLS.
>>
>>
>>
>> Has anyone seen anything similar? I am running on CentOS7.3. The same
>> issue also appears on Redhat7.4. I will try to modify one of the
>> example applications in libmicrohttpd to demonstrate the issue.
> 
> ________________________________
> 
> 
> The information contained in this message and any attachments is strictly 
> confidential and intended solely for the use of the intended recipient(s). 
> The copyright in this communication belongs to  (HSD). This message and any 
> attachments are confidential and may be subject to legal or other 
> professional privilege. Any confidentiality or privilege is not waived or 
> lost because this e-mail has been sent to you by mistake. If you have 
> received this transmission in error, please notify HSD on +61 3 9875 5900 
> immediately and destroy all copies of this e-mail. The contents of this email 
> message may not be quoted, copied, reproduced or published in part or in 
> whole, without the written authorisation of HSD.
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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