bzr does not automatically create 'obsolete_packs' when it is missing.

Bug #314314 reported by David Cournapeau
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
High
Jelmer Vernooij

Bug Description

I am seeing those errors again quite frequently on bzr. Full traceback:

Tue 2009-01-06 18:37:01 +0900
0.075 bzr arguments: [u'ci', u'../../TODO', u'-m', u'Add TODO.']
0.086 looking for plugins in /home/david/.bazaar/plugins
0.091 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.213 encoding stdout as sys.stdout encoding 'UTF-8'
0.333 opening working tree '/usr/media/boulot/PhdThesis'
0.382 preparing to commit
[32740] 2009-01-06 18:37:01.443 INFO: Committing to: /usr/media/boulot/PhdThesis/
0.422 Selecting files for commit with filter [u'TODO']
[32740] 2009-01-06 18:37:01.450 INFO: added TODO
0.570 Auto-packing repository <bzrlib.repofmt.pack_repo.RepositoryPackCollection object at 0xa57934c>, which has 17 pack files, containing 100 revisions. Packing 17 files into 1 affecting 100 revisions
1.516 aborting commit write group because of exception:
1.553 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 386, in commit
    self.rev_id = self.builder.commit(self.message)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 155, in commit
    self.repository.commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 988, in commit_write_group
    self._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1926, in _commit_write_group
    return self._pack_collection._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1766, in _commit_write_group
    if not self.autopack():
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1312, in autopack
    self._execute_pack_operations(pack_operations)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1331, in _execute_pack_operations
    self._save_pack_names(clear_obsolete_packs=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1690, in _save_pack_names
    self._clear_obsolete_packs()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1717, in _clear_obsolete_packs
    for filename in obsolete_pack_transport.list_dir('.'):
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/local.py", line 472, in list_dir
    self._translate_error(e, path)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 306, in _translate_error
    raise errors.NoSuchFile(path, extra=e)
NoSuchFile: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/': [Errno 2] No such file or directory: '/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/'
[32740] 2009-01-06 18:37:02.575 INFO: aborting commit write group: NoSuchFile(No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/': [Errno 2] No such file or directory: '/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/')
1.562 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 2435, 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 235, 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 202, in commit
    *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 386, in commit
    self.rev_id = self.builder.commit(self.message)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 155, in commit
    self.repository.commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 988, in commit_write_group
    self._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1926, in _commit_write_group
    return self._pack_collection._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1766, in _commit_write_group
    if not self.autopack():
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1312, in autopack
    self._execute_pack_operations(pack_operations)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1331, in _execute_pack_operations
    self._save_pack_names(clear_obsolete_packs=True)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1690, in _save_pack_names
    self._clear_obsolete_packs()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1717, in _clear_obsolete_packs
    for filename in obsolete_pack_transport.list_dir('.'):
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/local.py", line 472, in list_dir
    self._translate_error(e, path)
  File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 306, in _translate_error
    raise errors.NoSuchFile(path, extra=e)
NoSuchFile: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/': [Errno 2] No such file or directory: '/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/'

I use bzr 1.10 from the PPA on Ubuntu 8.10. Also, I found out that my .bzr is insanely big (~90M, for a couple of MB of data and a few revisions - compressing it gives me a couple of MB only archive).

Related branches

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 314314] [NEW] Crash when committing: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Cournapeau wrote:
> Public bug reported:
>
> I am seeing those errors again quite frequently on bzr. Full traceback:

> File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 306, in _translate_error
> raise errors.NoSuchFile(path, extra=e)
> NoSuchFile: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/': [Errno 2] No such file or directory: '/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/'

You have apparently deleted your
/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/ directory.

> I use bzr 1.10 from the PPA on Ubuntu 8.10. Also, I found out that my
> .bzr is insanely big (~90M, for a couple of MB of data and a few
> revisions - compressing it gives me a couple of MB only archive).

If you restore your obsolete_packs, packing will work again and your
repository size will go down.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl1K0YACgkQ0F+nu1YWqI2kiwCfZsu8R/fG1aUaVDRK99i15Ofw
ce8AoIG/h2dnKCJ8UBS01+5R2EnNdEVJ
=yPyk
-----END PGP SIGNATURE-----

Revision history for this message
Marius Kruger (amanica) wrote : Re: [Bug 314314] [NEW] Crash when committing: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/

>
> You have apparently deleted your
> /usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/ directory.
>
> If you restore your obsolete_packs, packing will work again and your
> repository size will go down.
>

i.e recreate the directory

Revision history for this message
Wesley J. Landaker (wjl) wrote : Re: Crash when committing: No such file: u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/

If the obsolete_packs directory is missing, shouldn't bzr just make it?

Revision history for this message
Samuel Bronson (naesten) wrote :

yeah ... shouldn't it?

John A Meinel (jameinel)
summary: - Crash when committing: No such file:
- u'/usr/media/boulot/PhdThesis/.bzr/repository/obsolete_packs/
+ bzr does not automatically create 'obsolete_packs' when it is missing.
Changed in bzr:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Martin Pool (mbp) wrote :

bumping up to high based on the relatively high number of reports and the potential ease of detecting and creating it

tags: added: easy repository
Changed in bzr:
importance: Wishlist → High
Jonathan Riddell (jr)
Changed in bzr:
assignee: nobody → Jonathan Riddell (jr)
Revision history for this message
Andrew Cowie (afcowie) wrote :

The meme went around a few years ago that if you were concerned about space, you could delete obsolete_packs. Turns out it meant delete THE obselete packs (ie obselete_packs/*) but not the directory as well. Oops, too late, big mess everywhere.

AfC

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Does creating an empty obsolete_packs directory again work?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Obviously we should also just finish Jono's branch and land it..

Changed in bzr:
assignee: Jonathan Riddell (jr) → Jelmer Vernooij (jelmer)
status: Confirmed → In Progress
status: In Progress → Confirmed
Revision history for this message
Jason Spashett (jspashett) wrote :

>Does creating an empty obsolete_packs directory again work?

Yes. The same applies to the 'upload' directory and other directories.

Jelmer Vernooij (jelmer)
Changed in bzr:
status: Confirmed → Triaged
status: Triaged → In Progress
Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
milestone: none → 2.5b5
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

Related questions

Remote bug watches

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