resizing terminal window crashes bzr with EINTR
Bug #572055 reported by
Daniel Fischer
This bug report is a duplicate of:
Bug #583941: program crashes with "bzr: ERROR: socket.error: (4, 'Interrupted system call')".
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Andrew Bennetts |
Bug Description
Resizing the terminal window while bzr is in a syscall kills it:
$ bzr pull
Using saved parent location: bzr+ssh://***
# resize terminal window here
bzr: ERROR: [Errno 4] Interrupted system call
I guess it's quite obvious - SIGWINCH interrupts a syscall and bzr fails to handle EINTR correctly.
summary: |
- resizing terminal window stops bzr + resizing terminal window crashes bzr with EINTR |
To post a comment you must log in.
Which versions of bzr and Python, out of interest?
This is caused by a Python bug: <http:// bugs.python. org/issue8354>.
There's a partial workaround in trunk. I'll backport that to 2.1.x now. Without the workaround the first signal causes no problems, but subsequent ones trigger the interrupted system call error.
Due to the nature of the Python bug, the workaround doesn't fix the case where multiple signals arrive before the interrupted syscall returns control to the Python interpreter.
Given that the fix for Python isn't yet Python's trunk (let alone a released version of Python) we may need to reconsider using SIGWINCH at all, or perhaps write a C extension to handle it rather than Python's flawed signal handling.
See also the discussion at <https:/ /code.edge. launchpad. net/~spiv/ bzr/i-hate- signals/ +merge/ 23004>