Bazaar Version Control System

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

Reported by Jelmer Vernooij on 2010-05-21
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Andrew Bennetts
2.1
Medium
Andrew Bennetts

Bug Description

From http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=577110:

Trying to get the latest emacs source with:

    bzr branch http://bzr.savannah.gnu.org/r/emacs/trunk

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

lp:~spiv/bzr/no-sigwinch-583941
Merged into lp:bzr/2.1 at revision 4844
Vincent Ladeuil: Approve on 2010-05-27
Martin Pool: Pending requested 2010-05-27
Martin Packman: Pending requested 2010-05-27
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 <http://bugs.python.org/issue1628205> which is fixed in Python trunk, and the problem with our mitigation is tracked in <http://bugs.python.org/issue8354> 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.