Open Al-Muhandis opened 12 months ago
If it helps. The error certainly happens only if there are requests to secure site addresses when using the FP HTTPClient client.
Occurs under heavy load, as I understand, because in other projects such problems are not observed.
The code inside cycle with bulk count of aDomainName
aHTTP.AllowRedirect:=True;
if aIsHTTPS then
aProt:='https'
else
aProt:='http';
s:=aProt+'://'+aDomainName;
aHTTP.Get(s, aResponse);
aCode:=aHTTP.ResponseStatusCode;
If not IsHTTPS then it's ok . if IsHTTPS is set then at any random turn of the cycle (there is no specific domain name because of which this happens), the application crashes with the above system daemon error. The error catching is not helps: app crashs always after this
The place in the microhttpd
library where this error supposedly occurs, judging by the logs. I guess it's a bug in this place:
#ifdef EPOLL_SUPPORT
3849 if (0 != (daemon->options & MHD_USE_EPOLL))
3850 {
3851 if (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EREADY_EDLL))
3852 {
3853 EDLL_remove (daemon->eready_head,
3854 daemon->eready_tail,
3855 pos);
3856 pos->epoll_state &=
3857 ~((enum MHD_EpollState) MHD_EPOLL_STATE_IN_EREADY_EDLL);
3858 }
3859 if ( (-1 != daemon->epoll_fd) &&
3860 (0 != (pos->epoll_state & MHD_EPOLL_STATE_IN_EPOLL_SET)) )
3861 {
3862 /* epoll documentation suggests that closing a FD
3863 automatically removes it from the epoll set; however,
3864 this is not true as if we fail to do manually remove it,
3865 we are still seeing an event for this fd in epoll,
3866 causing grief (use-after-free...) --- at least on my
3867 system. */
https://fossies.org/linux/libmicrohttpd/src/microhttpd/daemon.c
Hey @Al-Muhandis, could you try again using Sagui 3.4.4?
Hey @Al-Muhandis, could you try again using Sagui 3.4.4?
Hi! Thanks. I will try!
What kind of bug could it be? Where can I find information?
Second error (other times):
I localized an interesting point. The error sometimes occurs if the FCL httpclient is used in one of the worker threads. If the client in the thread does not cause such errors never occurs
Thanks