not properly interpreting EPIPE as connection reset

Bug #1047325 reported by John A Meinel on 2012-09-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Critical
John A Meinel

Bug Description

When testing the ConnectionReset code introduced in bzr-2.5b4, it appears that I missed some of the return values from send.

Specifically socket.send can raise EPIPE if the connection is completely dead. And we use socket pairs, on platforms that support them, to communicate with the ssh subprocess to not have to worry about blocking when reading more data than we *know* is in the pipe.

The patch should be reasonably small to fix. And is probably necessary for a bzr-2.5.2.

Related branches

John A Meinel (jameinel) wrote :

I remember now. I was trying to test disconnects with a socketpair, etc. But I wasn't able to trigger a failure on *write*. I think the issue is that the system leaves a buffer in place for a while, so a normal write would still succeed, but just be dropped, and the read side would fail.

Obviously if you have a bigger disconnect, you can get EPIPE. I just was unable to trigger it when I was working on the original patch. Clearly if you wait a long time it is possible, but we don't want a test that waits 10+s just to trigger this.

John A Meinel (jameinel) on 2012-09-12
Changed in bzr:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers