Re: [libmicrohttpd] race condition on 0.9.73

2021-09-24 Thread Evgeny Grin
On 23.09.2021 22:35, José Bollo wrote: On Thu, 23 Sep 2021 19:57:23 +0300 Evgeny Grin wrote: On 23.09.2021 18:43, José Bollo wrote: For sure you can run MHD with "external poll" mode, but you must ensure that only single thread is calling MHD_run() at any given moment of time. Okay, that

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-24 Thread José Bollo
On Thu, 23 Sep 2021 18:12:39 +0200 Markus Doppelbauer wrote: > > ... because valgrind point out ... > > You should replace (slow) valgrind with (fast) address-sanatizer. > Simply tell GCC (or clang) to compile with: -fsanitize=address -fno- > omit-frame-pointer > Thank you Markus for the

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-24 Thread José Bollo
Hi Evgeny, Hi all, Firstly, protecting MHD_run made the job, the crash disappears and valgrind is happy. Thank you for that efficient support. Secundly, I'm still seeing and investigating an issue. Sometime, the queued response (MHD_queue_response) is not sent. Here again, I think that it is a ra

Re: [libmicrohttpd] race condition on 0.9.73

2021-09-24 Thread José Bollo
Hi Evgeny, Seems fixed on my side. I enforced single call of MHD_run. But I added a special treatment to enforce call to MHD_run even if MHD_get_timeout returned a timeout different of zero. This last point was discussed in the ML thread https://lists.gnu.org/archive/html/libmicrohttpd/2020-12/