program crashes with "bzr: ERROR: socket.error: (4, 'Interrupted system call')"

Bug #583941 reported by Jelmer Vernooij on 2010-05-21
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Andrew Bennetts
Andrew Bennetts

Bug Description


Trying to get the latest emacs source with:

    bzr branch

bzr crashes with:

    bzr: ERROR: socket.error: (4, 'Interrupted system call')

This has happened three time this afternoon. First was about 3 minutes
into the dowload, the last after more than an hour. Traceback attached.

Related branches

Jelmer Vernooij (jelmer) on 2010-05-21
Changed in bzr:
status: New → Triaged
importance: Undecided → Medium
Martin Packman (gz) wrote :

The cause of the EINTR is likely the same as in bug 572055, and the mitigation for that seems to be in 2.1.1 already so not much more we can do there.

The root problem is in socket._fileobject as tracked in <> which is fixed in Python trunk, and the problem with our mitigation is tracked in <> which is fixed in Python trunk and the 2.6 branch.

When Debian finally upgrade to 2.6 this problem should vanish for them, but gettting the first Python bug fix backported as well would be good. Otherwise the only options are ripping out the SIGWINCH code, or changing bzrlib.transport.http._urllib2_wrappers not to use socket._fileobject but something more robust.

Martin [gz] wrote:
> Otherwise the only options are ripping out the SIGWINCH code, or

I'm pretty tempted to do that, and maybe replace it with a small C
module that can install a simple SIGWINCH handler that avoids Python's
bugs. The module would just set a “terminal sized changed” flag that
bzrlib.osutils.terminal_width() would check before returning a result.

Andrew Bennetts (spiv) wrote :

I've gone ahead and implemented that C module.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
status: Triaged → In Progress
Andrew Bennetts (spiv) wrote :

Fix merged into 2.2b3.

Changed in bzr:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.