test_an_answer_that_arrives_before_the_request_is_sent_is_still_the_verdict failed once on the hotcell (macos, ruby 3.4) job in this run, on #109. The test is from #67. The same job passed on #109's previous and next pushes, which didn't change transport.rb.
The test has a cell answer capacity and close the connection before it reads the request. Transport::Socket#deliver ignores Errno::EPIPE and Errno::ECONNRESET from that send, so receive can read the answer. On this run, macOS raised Errno::ENOTCONN instead. deliver doesn't rescue it, so call reported unavailable and never read the capacity answer:
1) Failure:
ClassificationTest#test_an_answer_that_arrives_before_the_request_is_sent_is_still_the_answer [test/classification_test.rb:273]:
unavailable: Errno::ENOTCONN: Socket is not connected - sendmsg(2).
Expected: "capacity"
Actual: "unavailable"
116 runs, 370 assertions, 1 failures, 0 errors, 0 skips
(#109 renames the test; its master name is above, at classification_test.rb#L246.)
Proposal: rescue Errno::ENOTCONN in deliver alongside EPIPE and ECONNRESET, after confirming that macOS raises it from sendmsg when the peer has closed. The same race affects real calls on macOS: a full cell's capacity answer can arrive as unavailable. I haven't checked whether Linux can raise ENOTCONN here.
test_an_answer_that_arrives_before_the_request_is_sent_is_still_the_verdictfailed once on thehotcell (macos, ruby 3.4)job in this run, on #109. The test is from #67. The same job passed on #109's previous and next pushes, which didn't changetransport.rb.The test has a cell answer
capacityand close the connection before it reads the request.Transport::Socket#deliverignoresErrno::EPIPEandErrno::ECONNRESETfrom that send, soreceivecan read the answer. On this run, macOS raisedErrno::ENOTCONNinstead.deliverdoesn't rescue it, socallreportedunavailableand never read thecapacityanswer:(#109 renames the test; its
mastername is above, atclassification_test.rb#L246.)Proposal: rescue
Errno::ENOTCONNindeliveralongsideEPIPEandECONNRESET, after confirming that macOS raises it fromsendmsgwhen the peer has closed. The same race affects real calls on macOS: a full cell'scapacityanswer can arrive asunavailable. I haven't checked whether Linux can raiseENOTCONNhere.