net: Read does not obey deadline after syscall.Recvfrom or syscall.Recvmsg is called #65143
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go1.21.6 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Code is here: https://go.dev/play/p/nr6grgosOXV
In one terminal, run
./isconn srv
which will open a socket and accept one client connection, and while holding the client connection open, the connection state is checked viaRecvfrom
.In another terminal, run
./isconn cli
which will connect to the test server and perform aRead()
every 250ms which is always expected to time out. Then after timeout, connection state is checked viaRecvfrom
.What did you see happen?
After
Recvfrom
returns, the next clientRead
is blocking. TheSetReadDeadline
ahead of it does not work.What did you expect to see?
Every 250ms the
Read
call is issued and then times out.Comment out the call to
Recvfrom
and that's what it will do.The text was updated successfully, but these errors were encountered: