-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socket is already closed when CURL_POLL_REMOVE notification is received #14976
Comments
It would be helpful if you tested the latest version just to see if the problem still remains. libcurl is meant to remove the socket before closing it. But without a way to reproduce it, or a detailed log from you where it happens, I don't think we can do much! |
Ok, sure. I will try to reproduce. Actually I guess our problem is related with setting |
I'm also seeing this on Also got here after following the ephiperfifo example. The error is hard to reproduce for me, it happens when making ~10K requests. |
Just in case it helps. For me this only happens when name resolution is involved, I can't reproduce locally. All the requests that succeed go through a Edit: fails with AsynchDNS support, with or without |
I can confirm I don't receive the Seems the problem on the older versions was that timeouts were happening but the file descriptors were removed before the |
My reading of the info provided in this issue is that this problem does not exist in the latest release? |
Let me check on my side as well. |
Presumed fixed. |
I did this
Hello Team!
We faced with problem, it looks like sometimes socket is already closed when
CURLMOPT_SOCKETFUNCTION
callback is called withCURL_POLL_REMOVE
argument. See example ephiperfifo.c.Immediately after calling callback we check
fd
withfnctl()
orepoll_ctl()
and both syscalls returnerrno 9
(EBADF
).Could you please confirm if it's not guaranteed by
CURLMOPT_SOCKETFUNCTION
function withCURL_POLL_REMOVE
argument thatfd
won't be closed before this notification?As far as I understand possible workaround can be registering
CURLOPT_CLOSESOCKETFUNCTION
callback and closingfd
by our self?Unfortunately it's difficult to reproduce, so I can't provide some simple example for reproducing.
Thanks!
I expected the following
No response
curl/libcurl version
curl 8.6.0
operating system
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered: