-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Zig Version
0.15.2
Steps to Reproduce and Observed Behavior
Difficult to reproduce due to linux versions, architectures, and local conditions affecting socket time outs, which may all vary.
The linux manpage does not explicitly show ETIMEDOUT as an error value for sendmsg, other than to say
"Additional errors may be generated and returned from the underlying protocol modules"
Server is running Linux on Arm64 in this case :
6.12.48+deb13-arm64
Server is a Hetzner VPS, using a Neoverse N1 (arm64) CPU
Observed behaviour :
- Server listens for incoming connections, accepts a connection, and retains the fd for the newly opened stream
- Client disconnects
- 24hr later, the server attempts to write to that retained fd using std.posix.sendmsg()
- stderr reports "unexpectedErrno: 110", or ETIMEDOUT on linux
Cannot reproduce on FreeBSD - running the same scenario, the failed sendmsg() to the dead fd reports a known errno and is handled cleanly
Expected Behavior
Expect that ETIMEDOUT errors on std.posix.sendmsg() are returned as a known SendMsgError type
Have applied the related patch to my local zig stdlib on the test machine, rebuilt the app, and have been running with it for a week. Not seeing any more unhandled ETIMEDOUT errors