bzr fails with smart protocol error

Bug #304544 reported by Patrick Dempster
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Unassigned

Bug Description

When trying to branch from a remote repo using the following;

$ bzr version
Bazaar (bzr) 1.6.1
  Python interpreter: /home/username/apps/python/bin/python 2.4.5
  Python standard library: /home/username/apps/python/lib/python2.4
  bzrlib: /home/username/apps/python/lib/python/bzrlib
  Bazaar configuration: /home/username/.bazaar
  Bazaar log file: /home/username/.bzr.log

$ bzr -Dhpss branch bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA

I get the following error,
0.068 encoding stdout as sys.stdout encoding 'UTF-8'
0.069 bzr arguments: [u'-Dhpss', u'branch', u'bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA']
0.070 looking for plugins in /home/username/.bazaar/plugins
0.070 looking for plugins in /home/username/apps/python/lib/python/bzrlib/plugins
0.070 Plugin name __init__ already loaded
0.070 Plugin name __init__ already loaded
0.103 WARNING: using slower ElementTree; consider installing cElementTree and make sure it's on your PYTHONPATH
0.147 looking for plugins in /home/username/apps/python/lib/python2.4/site-packages/bzrlib/plugins
0.162 encoding stdout as sys.stdout encoding 'UTF-8'
0.187 hpss: Built a new medium: SmartSSHClientMedium
0.194 hpss call: 'BzrDir.open', 'home/username/vc/bzr/cusIntEncGA/'
0.194 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
0.234 ssh implementation is OpenSSH
8.857 result: ('yes',)
8.858 hpss call: 'BzrDir.open_branch', 'home/username/vc/bzr/cusIntEncGA/'
8.858 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
8.879 result: ('ok', '')
8.879 hpss call: 'BzrDir.find_repositoryV2', 'home/username/vc/bzr/cusIntEncGA/'
8.879 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.270 result: ('ok', '..', 'no', 'no', 'no')
9.272 hpss call: 'BzrDir.open', 'home/username/vc/bzr/'
9.272 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.291 result: ('yes',)
9.292 hpss call: 'BzrDir.find_repositoryV2', 'home/username/vc/bzr/'
9.292 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.312 result: ('ok', '', 'no', 'no', 'no')
9.312 hpss call: 'Repository.is_shared', 'home/username/vc/bzr/'
9.312 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.461 result: ('yes',)
9.462 hpss call: 'Branch.last_revision_info', 'home/username/vc/bzr/cusIntEncGA/'
9.462 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.781 result: ('ok', '95', '<email address hidden>')
9.784 hpss call: 'get', '/home/username/vc/bzr/cusIntEncGA/.bzr/branch-format'
9.784 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.848 result: ('ok',)
9.848 35 body bytes read
9.849 hpss call: 'get', '/home/username/vc/bzr/cusIntEncGA/.bzr/branch/format'
9.849 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.868 result: ('ok',)
9.868 34 body bytes read
9.869 hpss call: 'stat', '/home/username/vc/bzr/cusIntEncGA/.bzr/branch'
9.869 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.888 result: ('stat', '4096', '040755')
9.889 hpss call: 'get', '/home/username/vc/bzr/cusIntEncGA/.bzr/repository/format'
9.889 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.908 result: ('NoSuchFile', '/home/username/vc/bzr/cusIntEncGA/.bzr/repository/format')
9.909 hpss call: 'BzrDir.open', 'home/username/vc/bzr/'
9.909 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.929 result: ('yes',)
9.930 hpss call: 'BzrDir.find_repositoryV2', 'home/username/vc/bzr/'
9.930 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.949 result: ('ok', '', 'no', 'no', 'no')
9.949 hpss call: 'Repository.is_shared', 'home/username/vc/bzr/'
9.949 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
9.969 result: ('yes',)
9.981 hpss call: 'get', '/home/username/vc/bzr/cusIntEncGA/.bzr/checkout/format'
9.981 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.026 result: ('ok',)
10.026 40 body bytes read
10.032 hpss call: 'BzrDir.open_branch', 'home/username/vc/bzr/cusIntEncGA/'
10.032 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.053 result: ('ok', '')
10.053 hpss call: 'BzrDir.find_repositoryV2', 'home/username/vc/bzr/cusIntEncGA/'
10.054 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.074 result: ('ok', '..', 'no', 'no', 'no')
10.075 hpss call: 'BzrDir.open', 'home/username/vc/bzr/'
10.075 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.094 result: ('yes',)
10.095 hpss call: 'BzrDir.find_repositoryV2', 'home/username/vc/bzr/'
10.095 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.115 result: ('ok', '', 'no', 'no', 'no')
10.115 hpss call: 'Repository.is_shared', 'home/username/vc/bzr/'
10.115 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.135 result: ('yes',)
10.139 hpss call: 'get', '/home/username/vc/bzr/.bzr/branch-format'
10.140 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.159 result: ('ok',)
10.159 35 body bytes read
10.160 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/format'
10.160 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.180 result: ('ok',)
10.180 49 body bytes read
10.180 hpss call: 'stat', '/home/username/vc/bzr/.bzr/repository'
10.180 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.200 result: ('stat', '4096', '040755')
10.201 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/pack-names'
10.202 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.222 result: ('ok',)
10.222 415 body bytes read
10.224 Using fetch logic to copy between KnitPackRepository('bzr+ssh://username@server_loc/home/username/vc/bzr/.bzr/repository/')(<RepositoryFormatKnitPack1>) and KnitPackRepository('file:///home/username/branches/.bzr/repository/')(<RepositoryFormatKnitPack1>)
10.225 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.rix'
10.225 5 bytes in readv request
10.275 result: ('readv',)
10.275 276 body bytes read
10.275 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.rix'
10.275 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.295 result: ('ok',)
10.295 276 body bytes read
10.296 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.rix'
10.296 5 bytes in readv request
10.346 result: ('readv',)
10.346 273 body bytes read
10.346 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.rix'
10.346 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.366 result: ('ok',)
10.366 273 body bytes read
10.366 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.rix'
10.366 5 bytes in readv request
10.466 result: ('readv',)
10.466 279 body bytes read
10.466 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.rix'
10.466 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.487 result: ('ok',)
10.488 279 body bytes read
10.488 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.rix'
10.488 5 bytes in readv request
10.528 result: ('readv',)
10.528 201 body bytes read
10.528 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.rix'
10.528 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.547 result: ('ok',)
10.548 201 body bytes read
10.548 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.rix'
10.548 5 bytes in readv request
10.587 result: ('readv',)
10.588 192 body bytes read
10.588 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.rix'
10.588 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.607 result: ('ok',)
10.607 192 body bytes read
10.608 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.rix'
10.608 7 bytes in readv request
10.659 result: ('readv',)
10.677 10247 body bytes read
10.680 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.rix'
10.681 5 bytes in readv request
10.712 result: ('readv',)
10.713 265 body bytes read
10.713 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.rix'
10.713 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.732 result: ('ok',)
10.732 265 body bytes read
10.751 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.rix'
10.751 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
10.790 result: ('ok',)
10.791 10247 body bytes read
10.796 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/311e922cb1ca02344bf4cf2cda9ccb5f.pack'
10.796 51 bytes in readv request
10.859 result: ('readv',)
10.916 50205 body bytes read
10.945 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/63c34325eb33df80dcb8a169c16a58e1.pack'
10.945 5 bytes in readv request
10.980 result: ('readv',)
10.980 461 body bytes read
10.980 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/0b61052dec7403f064aac290a6628afa.pack'
10.981 12 bytes in readv request
11.006 result: ('readv',)
11.006 485 body bytes read
11.007 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/79c318b56867a617eab956b2a7cd4229.pack'
11.007 5 bytes in readv request
11.036 result: ('readv',)
11.037 485 body bytes read
11.037 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/48c994ed36508018f2aea08f7eff069f.pack'
11.037 5 bytes in readv request
11.057 result: ('readv',)
11.057 480 body bytes read
11.057 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/d64fae06dd514c55104d5c39dd912969.pack'
11.058 12 bytes in readv request
11.079 result: ('readv',)
11.079 465 body bytes read
11.079 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/6300e0e66b3316cc092e9a352f2e86aa.pack'
11.080 5 bytes in readv request
11.111 result: ('readv',)
11.112 462 body bytes read
11.112 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.iix'
11.112 5 bytes in readv request
11.133 result: ('readv',)
11.133 206 body bytes read
11.134 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.iix'
11.134 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.154 result: ('ok',)
11.154 206 body bytes read
11.154 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.iix'
11.154 7 bytes in readv request
11.184 result: ('readv',)
11.186 10971 body bytes read
11.189 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.iix'
11.189 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.211 result: ('ok',)
11.211 10971 body bytes read
11.219 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.iix'
11.219 5 bytes in readv request
11.239 result: ('readv',)
11.239 284 body bytes read
11.239 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.iix'
11.239 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.259 result: ('ok',)
11.259 284 body bytes read
11.259 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.iix'
11.259 5 bytes in readv request
11.280 result: ('readv',)
11.280 268 body bytes read
11.280 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.iix'
11.281 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.301 result: ('ok',)
11.301 268 body bytes read
11.302 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.iix'
11.302 5 bytes in readv request
11.322 result: ('readv',)
11.322 278 body bytes read
11.323 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.iix'
11.323 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.342 result: ('ok',)
11.342 278 body bytes read
11.342 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.iix'
11.343 5 bytes in readv request
11.363 result: ('readv',)
11.363 197 body bytes read
11.363 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.iix'
11.363 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.383 result: ('ok',)
11.383 197 body bytes read
11.384 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.iix'
11.384 5 bytes in readv request
11.416 result: ('readv',)
11.417 279 body bytes read
11.417 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.iix'
11.417 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
11.436 result: ('ok',)
11.437 279 body bytes read
11.439 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/6300e0e66b3316cc092e9a352f2e86aa.pack'
11.439 12 bytes in readv request
11.459 result: ('readv',)
11.459 327 body bytes read
11.460 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/311e922cb1ca02344bf4cf2cda9ccb5f.pack'
11.461 55 bytes in readv request
11.622 result: ('readv',)
12.133 1187736 body bytes read
12.859 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/63c34325eb33df80dcb8a169c16a58e1.pack'
12.859 12 bytes in readv request
12.879 result: ('readv',)
12.879 326 body bytes read
12.882 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/0b61052dec7403f064aac290a6628afa.pack'
12.882 5 bytes in readv request
12.901 result: ('readv',)
12.902 362 body bytes read
12.902 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/79c318b56867a617eab956b2a7cd4229.pack'
12.902 12 bytes in readv request
12.922 result: ('readv',)
12.922 343 body bytes read
12.923 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/48c994ed36508018f2aea08f7eff069f.pack'
12.923 12 bytes in readv request
12.942 result: ('readv',)
12.942 364 body bytes read
12.942 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/d64fae06dd514c55104d5c39dd912969.pack'
12.942 5 bytes in readv request
12.962 result: ('readv',)
12.962 358 body bytes read
13.173 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.tix'
13.173 4 bytes in readv request
13.194 result: ('readv',)
13.195 60 body bytes read
13.195 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/d64fae06dd514c55104d5c39dd912969.tix'
13.195 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
13.214 result: ('ok',)
13.215 60 body bytes read
13.225 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.tix'
13.226 7 bytes in readv request
13.281 result: ('readv',)
13.373 65536 body bytes read
13.395 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/311e922cb1ca02344bf4cf2cda9ccb5f.tix'
13.395 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
13.502 result: ('ok',)
14.470 2803849 body bytes read
15.736 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.tix'
15.736 5 bytes in readv request
15.756 result: ('readv',)
15.756 292 body bytes read
15.757 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/6300e0e66b3316cc092e9a352f2e86aa.tix'
15.757 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
15.776 result: ('ok',)
15.777 292 body bytes read
15.777 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.tix'
15.777 5 bytes in readv request
15.798 result: ('readv',)
15.798 293 body bytes read
15.798 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/63c34325eb33df80dcb8a169c16a58e1.tix'
15.798 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
15.817 result: ('ok',)
15.817 293 body bytes read
15.818 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.tix'
15.818 4 bytes in readv request
15.839 result: ('readv',)
15.839 60 body bytes read
15.839 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/0b61052dec7403f064aac290a6628afa.tix'
15.839 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
15.859 result: ('ok',)
15.859 60 body bytes read
15.860 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.tix'
15.860 4 bytes in readv request
15.880 result: ('readv',)
15.880 60 body bytes read
15.880 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/79c318b56867a617eab956b2a7cd4229.tix'
15.880 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
15.899 result: ('ok',)
15.899 60 body bytes read
15.900 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.tix'
15.900 5 bytes in readv request
15.921 result: ('readv',)
15.921 172 body bytes read
15.921 hpss call: 'get', '/home/username/vc/bzr/.bzr/repository/indices/48c994ed36508018f2aea08f7eff069f.tix'
15.921 (to bzr+ssh://username@server_loc/home/username/vc/bzr/cusIntEncGA/)
15.952 result: ('ok',)
15.952 172 body bytes read
16.772 hpss call w/readv: 'readv', '/home/username/vc/bzr/.bzr/repository/packs/311e922cb1ca02344bf4cf2cda9ccb5f.pack'
16.773 6681 bytes in readv request
40.295 result: ('error', '')
40.306 Traceback (most recent call last):
  File "/home/username/apps/python//lib/python/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/username/apps/python//lib/python/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/home/username/apps/python//lib/python/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/username/apps/python//lib/python/bzrlib/builtins.py", line 866, in run
    hardlink=hardlink, stacked=stacked)
  File "/home/username/apps/python//lib/python/bzrlib/bzrdir.py", line 1078, in sprout
    result_repo.fetch(source_repository, revision_id=revision_id)
  File "/home/username/apps/python//lib/python/bzrlib/repository.py", line 975, in fetch
    find_ghosts=find_ghosts)
  File "/home/username/apps/python//lib/python/bzrlib/repository.py", line 3083, in fetch
    find_ghosts=find_ghosts)
  File "/home/username/apps/python//lib/python/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/username/apps/python//lib/python/bzrlib/repository.py", line 2807, in fetch
    revision_ids).pack()
  File "/home/username/apps/python//lib/python/bzrlib/repofmt/pack_repo.py", line 585, in pack
    return self._create_pack_from_packs()
  File "/home/username/apps/python//lib/python/bzrlib/repofmt/pack_repo.py", line 718, in _create_pack_from_packs
    self._copy_text_texts()
  File "/home/username/apps/python//lib/python/bzrlib/repofmt/pack_repo.py", line 682, in _copy_text_texts
    self.new_pack.text_index, readv_group_iter, total_items))
  File "/home/username/apps/python//lib/python/bzrlib/repofmt/pack_repo.py", line 803, in _copy_nodes_graph
    write_index, output_lines, pb, readv_group_iter, total_items):
  File "/home/username/apps/python//lib/python/bzrlib/repofmt/pack_repo.py", line 824, in _do_copy_nodes_graph
    reader = pack.make_readv_reader(transport, path, readv_vector)
  File "/home/username/apps/python//lib/python/bzrlib/pack.py", line 202, in make_readv_reader
    result = ContainerReader(ReadVFile(
  File "/home/username/apps/python//lib/python/bzrlib/transport/__init__.py", line 638, in readv
    return self._readv(relpath, offsets)
  File "/home/username/apps/python//lib/python/bzrlib/transport/remote.py", line 325, in _readv
    self._translate_error(err.error_tuple)
  File "/home/username/apps/python//lib/python/bzrlib/transport/remote.py", line 399, in _translate_error
    raise errors.SmartProtocolError(unicode(resp[1]))
SmartProtocolError: Generic bzr smart protocol error:

40.306 return code 3

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

The server is replying to a readv request with ('error', ''). There's not much the client can do with that except report the useless error to the user.

So the question is why does the server send such a useless error. The .bzr.log file on the server (in that user's home directory) should contain the exception. Please attach that .bzr.log (or the relevant parts of it) to this bug, Also, which version of bzr is on the server?

I think I can guess what's going on, but I need the log file to confirm. Judging from this part of the client's log:

16.773 6681 bytes in readv request
40.295 result: ('error', '')

I'm guessing it's a MemoryError. A 6681 byte readv request is quite large, and it it apparently took nearly 25 seconds between sending the request and receiving the failure. Looking at the error handling code, it appears bzr serve will serialise a MemoryError like that.

Also, there's a bug in how the bzr smart server buffers readv replies in memory before sending them to the client. If you upgrade bzr on the client then this bug will probably be fixed, because the current version of the bzr client will make smaller readv requests to avoid this bug.

Revision history for this message
Patrick Dempster (paddydempster-deactivatedaccount) wrote :

I'm unsure of which one of these errors relates to the exact error message above as its possible I ran command a couple of times to ensure that it was just finger trouble at the client side.

$ bzr version
Bazaar (bzr) 1.9
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/username/.bazaar
  Bazaar log file: /home/username/.bzr.log

And the relevant parts (I think) of .bzr.log, actually upon examining the messages in the log around the time the error was occuring they are all the same, so I've only put one in the report.

Tue 2008-12-02 20:34:48 +0000
0.021 bzr arguments: [u'serve', u'--inet', u'--directory=/', u'--allow-writes']
0.021 looking for plugins in /home/username/.bazaar/plugins
0.021 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.078 encoding stdout as osutils.get_user_encoding() 'ANSI_X3.4-1968'
31.805 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 885, in accept_bytes
    _StatefulDecoder.accept_bytes(self, bytes)
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 388, in accept_bytes
    self.state_accept()
  File "/usr/lib/python2.5/site-packages/bzrlib/smart/protocol.py", line 1011, in _state_accept_expecting_bytes
    raise errors.SmartMessageHandlerError(sys.exc_info())
SmartMessageHandlerError: The message handler raised an exception: .

32.887 return code 0

Also I've tried reruning the command that was failing on the client the other day and this morning its working with out any changes to either the version of bzr on the server on the one on the client.

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

Ah drat, the server isn't logging the full traceback in that case. What it does log is still consistent with the MemoryError theory, though.

We should:
 - improve the logging of SmartMessageHandlerError
 - make sure that MemoryErrors are communicated in a sensible fashion to the client (a generic 'error', 'MemoryError: ...' would probably be fine).

If you update the version of bzr on the client, does that resolve the bug?

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Patrick Dempster (paddydempster-deactivatedaccount) wrote :

After upgrading the version on the server to;

Bazaar (bzr) 1.10
  Python interpreter: /usr/bin/python 2.5.2
  Python standard library: /usr/lib/python2.5
  bzrlib: /usr/lib/python2.5/site-packages/bzrlib
  Bazaar configuration: /home/username/.bazaar
  Bazaar log file: /home/username/.bzr.log

and the client to;

Bazaar (bzr) 1.9
  Python interpreter: /usr/bin/python 2.6.1
  Python standard library: /usr/lib/python2.6
  bzrlib: /usr/lib/python2.6/site-packages/bzrlib
  Bazaar configuration: /home/username/.bazaar
  Bazaar log file: /home/username/.bzr.log

The problem still occurs when doing a "co" or even a "branch" in a fresh repo;
Server .bzr.log

Revision history for this message
Patrick Dempster (paddydempster-deactivatedaccount) wrote :

After increasing the amount of available swap space the problem apears to be resolved, pointing to the probability that it was indeed a memory problem as was first suspected.

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

Ah, sorry for the imprecise suggestion. I meant upgrade the client to 1.10 -- that version introduced a fix to RemoteTransport.readv that avoids making requests that require the server (and the client) to buffer unreasonably large amounts of data. So it should workaround your problem.

Thanks for the information about the swap space. It does sound almost certain to be a MemoryError.

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

I'm marking this fixed. All indications are that it's a memory error caused by an excessively large readv request, and newer clients don't attempt such large requests.

Please feel free to reopen this bug (or file a new one) if this recurs with a newer bzr.

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

Other bug subscribers

Remote bug watches

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