You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload a large file with HTTP/3.
Lots of POLLIN event occurs but recvfrom read nothing.
It is caused by IP_RECVERR socket option [1] set for UDP socket. ngtcp2 does UDP Path MTU Discovery and it might send larger packet than the path can sustain. In this case ICMP message is received, it is resulted in POLLERR, which is translated into POLLIN by curl code. Because IP_RECVERR, the normal recvfrom call does not clear error queue, thus poll keeps returning POLLERR.
It is only cleared by recvmsg with MSG_ERRQUEUE. But it looks like there is no code in curl to do this.
The simple fix is not set this option for QUIC.
I'm curious that IP_RECVERR really works in libcurl as expected because I could not find recvmsg + MSG_ERRQUEUE in libcurl code.
If libcurl accepts file descriptor from an application, it can do recvmsg, but not sure it is supported and there are any indication from libcurl to show the error is enqueued.
Activity
tatsuhiro-t commentedon Jul 26, 2022
The simple fix is not set this option for QUIC.
I'm curious that IP_RECVERR really works in libcurl as expected because I could not find recvmsg + MSG_ERRQUEUE in libcurl code.
If libcurl accepts file descriptor from an application, it can do recvmsg, but not sure it is supported and there are any indication from libcurl to show the error is enqueued.
bagder commentedon Jul 26, 2022
#6341 and d13179d brought the
IP_RECVERRuse. Maybe we should revert that again?/cc @crrodriguez
crrodriguez commentedon Jul 26, 2022
huh.. well..this is probably the only widespread use of UDP sockets with CURL.. I guess you can revert it safely.
bagder commentedon Jul 26, 2022
Well, curl has as also done TFTP since 2005...