attic icon indicating copy to clipboard operation
attic copied to clipboard

attic create fails with "assert segments[segment] == 0"

Open martin-vi opened this issue 10 years ago • 3 comments

During an initial attic create the backup fails after a while on a ~300Mb file. The error is:

Traceback (most recent call last):
  File "/usr/local/bin/attic", line 5, in <module>
    pkg_resources.run_script('Attic==0.14-5-g4ab4ecc', 'attic')
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1236, in run_script
    exec(compile(open(script_filename).read(), script_filename, 'exec'), namespace, namespace)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/EGG-INFO/scripts/attic", line 3, in <module>
    main()
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 727, in main
    exit_code = archiver.run(sys.argv[1:])
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 717, in run
    return args.func(args)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 128, in do_create
    self._process(archive, cache, args.excludes, args.exclude_caches, skip_inodes, path, restrict_dev)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 177, in _process
    os.path.join(path, filename), restrict_dev)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 177, in _process
    os.path.join(path, filename), restrict_dev)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 177, in _process
    os.path.join(path, filename), restrict_dev)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archiver.py", line 163, in _process
    archive.process_file(path, st, cache)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archive.py", line 416, in process_file
    self.add_item(item)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archive.py", line 179, in add_item
    self.write_checkpoint()
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archive.py", line 183, in write_checkpoint
    self.save(self.checkpoint_name)
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/archive.py", line 206, in save
    self.repository.commit()
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/repository.py", line 130, in commit
    self.compact_segments()
  File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/repository.py", line 194, in compact_segments
    assert segments[segment] == 0
AssertionError  

I tried to run the tests, they fail with the same errors, error log on pastbin. The setup is a arm powered nas with debian wheezy.

Thanks for the help.

martin-vi avatar Feb 10 '15 21:02 martin-vi

One issue copy and pasted from above linked pastebin:

File "/usr/local/lib/python3.2/dist-packages/Attic-0.14_5_g4ab4ecc-py3.2-linux-armv5tel.egg/attic/testsuite/archiver.py", line 124, in create_test_files os.utime('input/empty', (19880895600, 19880895600)) OverflowError: Python int too large to convert to C long

This is a 32bit platform issue and I fixed it by changing that line, see PR #254.

ThomasWaldmann avatar Mar 08 '15 00:03 ThomasWaldmann

See also #309 for some already analyzed ARM issue.

@martin-vi Maybe add some more infos here (see what I requested in #309 and try whether it can be fixed in the same way).

ThomasWaldmann avatar May 23 '15 16:05 ThomasWaldmann

close due to inactivity?

ThomasWaldmann avatar Sep 19 '15 13:09 ThomasWaldmann