ugly traceback when sftp server drops connection

Bug #328910 reported by catsophie
28
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

bazaar 1.11 windows version (installed by the installer without tortoise shell).
I had one Fedora server and two clients. Whenever I finished my work on a client, I commit changes and push them to the server. Before I start to work on a client, I pull the changes from the server.
Bazaar crashed when I was pulling changes from the server. The traces and version information are as below.

C:\user\working>bzr pull
Using saved parent location: sftp://user@myserver/home/user/Backup/bazaar/working/
Connected (version 2.0, client OpenSSH_5.1)
SSH user@myserver password:
Authentication (password) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
| [ ] Pull phase 0/2S
ocket exception: Connection reset by peer (10054)
bzr: ERROR: paramiko.SSHException: Server connection dropped:

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 852, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree.pyo", line 1543, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1963, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 1763, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 524, in update_revisions
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 286, in fetch
  File "bzrlib\repository.pyo", line 1118, in fetch
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\repository.pyo", line 2985, in fetch
  File "bzrlib\repository.pyo", line 2992, in _pack
  File "bzrlib\repofmt\pack_repo.pyo", line 655, in pack
  File "bzrlib\repofmt\pack_repo.pyo", line 809, in _create_pack_from_packs
  File "bzrlib\repofmt\pack_repo.pyo", line 786, in _copy_text_texts
  File "bzrlib\repofmt\pack_repo.pyo", line 900, in _copy_nodes_graph
  File "bzrlib\repofmt\pack_repo.pyo", line 929, in _do_copy_nodes_graph
  File "bzrlib\pack.pyo", line 272, in _iter_records
  File "bzrlib\pack.pyo", line 277, in _iter_record_objects
  File "bzrlib\pack.pyo", line 218, in reader_func
  File "bzrlib\pack.pyo", line 177, in read
  File "bzrlib\pack.pyo", line 172, in _next
  File "bzrlib\transport\sftp.pyo", line 214, in request_and_yield_offsets
  File "paramiko\sftp_file.pyo", line 428, in readv
  File "paramiko\file.pyo", line 153, in read
  File "paramiko\sftp_file.pyo", line 152, in _read
  File "paramiko\sftp_file.pyo", line 132, in _read_prefetch
  File "paramiko\sftp_client.pyo", line 641, in _read_response
SSHException: Server connection dropped:

bzr 1.11 on python 2.5.2 (win32)
arguments: ['bzr', 'pull']
encoding: 'cp936', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.11]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store
[unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.6]
  svn C:\Program Files\Bazaar\plugins\svn [0.4.17]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

C:\user\working>bzr version
Bazaar (bzr) 1.11
  Python interpreter: C:\Program Files\Bazaar\python25.dll 2.5.2
  Python standard library: C:\Program Files\Bazaar\lib\library.zip
  bzrlib: C:\Program Files\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\yanlin\Application Data\bazaar
\2.0
  Bazaar log file: C:\Documents and Settings\yanlin\My Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

Revision history for this message
Andrew Bennetts (spiv) wrote :

bzrlib\transport\sftp.py ought to catch the SSHException from fp.readv and turn it into a more appropriate error, possibly a ShortReadvError. The end result ought to be a polite error message for the user saying that the SSH connection was lost, rather than a large, ugly traceback.

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Martin Pool (mbp)
tags: added: easy sftp traceback
summary: - bazaar crashed when synchronizing from a Fedora server
+ ugly traceback when sftp server drops connection
Changed in bzr:
importance: High → Low
Martin Pool (mbp)
Changed in bzr:
importance: Low → Medium
assignee: nobody → Martin Pool (mbp)
status: Confirmed → In Progress
Martin Pool (mbp)
Changed in bzr:
assignee: Martin Pool (mbp) → nobody
tags: added: error-reporting
Revision history for this message
John A Meinel (jameinel) wrote :

Martin unassigned himself, I assume he meant to also unmark In Progress.

Changed in bzr:
status: In Progress → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
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.