ShortReadvError when trying to commit in 1.9rc1

Bug #294743 reported by Gary Poster
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned

Bug Description

The commit changed a few files, and added several symbolic links to files within the same tree.

It was within the top thread of a loom with three threads (including the bottom, unmodified base thread).

The loom was created with a (the "standard"?) branch of loom, 1.4.0dev0, in an earlier version of bzr. I now have bzr 1.9rc1 with Aaron Bentley's loom branch.

I was previously successfully able to commit to this branch with all other variables described above except for the presence of the symbolic links.

Traceback follows.

gary@gary-ubuntu:~/launchpadlib-ReST$ bzr status
added:
  sphinx/caching.txt@
  sphinx/hosted-files.txt@
  sphinx/introduction.txt@
  sphinx/modifications.txt@
  sphinx/operations.txt@
  sphinx/people.txt@
  sphinx/toplevel.txt@
modified:
  launchpadlib/docs/caching.txt
  launchpadlib/docs/hosted-files.txt
  launchpadlib/docs/modifications.txt
  launchpadlib/docs/toplevel.txt
  sphinx/index.txt
Current thread: sphinx
gary@gary-ubuntu:~/launchpadlib-ReST$ bzr commit -m 'add all docs to sphinx index.'
Committing to: /home/gary/launchpadlib-ReST/
modified launchpadlib/docs/caching.txt
modified launchpadlib/docs/hosted-files.txt
modified launchpadlib/docs/modifications.txt
modified launchpadlib/docs/toplevel.txt
added sphinx/caching.txt
added sphinx/hosted-files.txt
modified sphinx/index.txt
added sphinx/introduction.txt
added sphinx/modifications.txt
added sphinx/operations.txt
added sphinx/people.txt
added sphinx/toplevel.txt
bzr: ERROR: bzrlib.errors.ShortReadvError: readv() read 0 bytes rather than 42 bytes at 0 for "1g02k4ftdeerb86s6j8b.pack"

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 2431, in run
    exclude=safe_relpath_files(tree, exclude))
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 237, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 201, in commit
    *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 385, in commit
    self.rev_id = self.builder.commit(self.message)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 135, in commit
    self.new_inventory, self._config)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 624, in add_revision
    rev.inventory_sha1 = self.inventories.get_sha1s([key])[key]
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1272, in get_sha1s
    record_map = self._get_record_map(missing, allow_missing=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1118, in _get_record_map
    self._read_records_iter(records):
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 1594, in _read_records_iter
    izip(iter(needed_records), raw_data):
  File "/usr/lib/python2.5/site-packages/bzrlib/knit.py", line 2438, in get_raw_records
    for names, read_func in reader.iter_records():
  File "/usr/lib/python2.5/site-packages/bzrlib/pack.py", line 253, in iter_records
    self._read_format()
  File "/usr/lib/python2.5/site-packages/bzrlib/pack.py", line 294, in _read_format
    format = self._read_line()
  File "/usr/lib/python2.5/site-packages/bzrlib/pack.py", line 221, in _read_line
    line = self._source.readline()
  File "/usr/lib/python2.5/site-packages/bzrlib/pack.py", line 185, in readline
    self._next()
  File "/usr/lib/python2.5/site-packages/bzrlib/pack.py", line 172, in _next
    length, data = self.readv_result.next()
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 683, in _seek_and_read
    c_offset.length, actual=len(data))
ShortReadvError: readv() read 0 bytes rather than 42 bytes at 0 for "1g02k4ftdeerb86s6j8b.pack"

bzr 1.9rc1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'add all docs to sphinx index.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.8.0]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /home/gary/.bazaar/plugins/loom [1.4.0dev0]
  lpreview /home/gary/.bazaar/plugins/lpreview [unknown]
  pqm /usr/lib/python2.5/site-packages/bzrlib/plugins/pqm [1.3.0]
*** 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.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 294743] [NEW] ShortReadvError when trying to commit in 1.9rc1

> bzr: ERROR: bzrlib.errors.ShortReadvError: readv() read 0 bytes rather than 42 bytes at 0 for "1g02k4ftdeerb86s6j8b.pack"

This is the crux of of it: you have a pack file which is 0 bytes long.
This particular pack file is the one being written during the commit.

Clearly the content hasn't been flushed at all, its surprising that it
is trying to read from the being-written content.

Is this repeatable?

-Rob

Revision history for this message
Gary Poster (gary) wrote :

Repeatable: for this particular branch/loom, absolutely. I am currently blocked on that work until this is resolved.

Is that what you were asking, or are you asking for me to to see if I can find (the fewest) steps for you to repro. That's eminently reasonable, but I don't want to do it unless I have to :-).

Revision history for this message
Gary Poster (gary) wrote :

Marking my bug as invalid: After upgrading to 1.9 today (from 1.9rc1), I was able to commit. Don't know what changed, but I can no longer dupe in that project.

Changed in bzr:
status: New → Invalid
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.