Overflow error: requested number of bytes is more than a Python string can hold

Bug #873505 reported by dlebauer on 2011-10-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Undecided
Unassigned

Bug Description

I added (bzr add *.ova) a 2.2 GB virtual machine to my bzr repository.

Then I issued bzr commit -m 'added vm to repository'

I expected the commit to work

I received the following error (the error did not occur after I issued bzr rm ---keep vm/vm.ova

$ bzr commit -m 'added vm'
Committing to: /path/to/my/repository/
added vm
added vm/somescript.sh
added vm/vm.ova
added vm/manual.org
aborting commit write group: <exceptions.OverflowError instance at 0xb4e50e0>
bzr: ERROR: exceptions.OverflowError: requested number of bytes is more than a Python string can hold

Traceback (most recent call last):
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 121, in run_simple
    return _do_with_cleanups(
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/builtins.py", line 3138, in run
    exclude=safe_relpath_files(tree, exclude))
  File "/usr/lib64/python2.4/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/workingtree_4.py", line 197, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/mutabletree.py", line 224, in commit
    possible_master_transports=possible_master_transports,
  File "/usr/lib64/python2.4/site-packages/bzrlib/commit.py", line 257, in commit
    possible_master_transports=possible_master_transports)
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 117, in run
    return _do_with_cleanups(
  File "/usr/lib64/python2.4/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.4/site-packages/bzrlib/commit.py", line 387, in _commit
    self._update_builder_with_changes()
  File "/usr/lib64/python2.4/site-packages/bzrlib/commit.py", line 621, in _update_builder_with_changes
    for file_id, path, fs_hash in self.builder.record_iter_changes(
  File "/usr/lib64/python2.4/site-packages/bzrlib/repository.py", line 762, in record_iter_changes
    text = file_obj.read()
OverflowError: requested number of bytes is more than a Python string can hold

bzr 2.1.1 on python 2.4.3 (Linux-2.6.18-238.5.1.el5xen-x86_64-with-redhat-5.6-Tikanga)
arguments: ['/usr/bin/bzr', 'commit', '-m', 'added vm']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib64/python2.4/site-packages/bzrlib/plugins/launchpad [2.1.1]
  netrc_credential_store /usr/lib64/python2.4/site-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib64/python2.4/site-packages/bzrlib/plugins/news_merge [2.1.1]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

Martin Packman (gz) wrote :

That's an interesting way to make a 32-bit python fail. The basic issue though, is that it's not sensible to version control huge files in this manner, see the master bug for more information.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers