Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when initializing cache #108

Closed
owenh000 opened this issue Aug 28, 2014 · 3 comments
Closed

Crash when initializing cache #108

owenh000 opened this issue Aug 28, 2014 · 3 comments

Comments

@owenh000
Copy link

I have received this error several times during cache initialization. It may be that it is happening after all the individual archives are successfully analyzed, but before the initialization finishes. However, I can not be sure because I can not get a list of archives without a working cache.

Thanks!

attic create --verbose --stats --do-not-cross-mountpoints \
    --exclude-caches --exclude-from excludes.txt \
    server:/srv/attic::name_$(date -u +"%Y%m%dT%H%M%SZ") ~
Initializing cache...
(successfully analyzed about 97 archives...)
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/attic/remote.py", line 298, in get_many
    yield self.load_object(*self.index[key])
  File "hashindex.pyx", line 95, in attic.hashindex.NSIndex.__getitem__ (attic/hashindex.c:2315)
KeyError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/attic", line 3, in <module>
    main()
  File "/usr/lib/python3/dist-packages/attic/archiver.py", line 715, in main
    exit_code = archiver.run(sys.argv[1:])
  File "/usr/lib/python3/dist-packages/attic/archiver.py", line 705, in run
    return args.func(args)
  File "/usr/lib/python3/dist-packages/attic/archiver.py", line 100, in do_create
    cache = Cache(repository, key, manifest)
  File "/usr/lib/python3/dist-packages/attic/cache.py", line 33, in __init__
    self.sync()
  File "/usr/lib/python3/dist-packages/attic/cache.py", line 163, in sync
    for key, chunk in zip(archive[b'items'], repository.get_many(archive[b'items'])):
  File "/usr/lib/python3/dist-packages/attic/remote.py", line 302, in get_many
    self.store_object(key, data)
  File "/usr/lib/python3/dist-packages/attic/remote.py", line 288, in store_object
    self.index[key] = offset - len(data), len(data)
  File "hashindex.pyx", line 101, in attic.hashindex.NSIndex.__setitem__ (attic/hashindex.c:2424)
OverflowError: value too large to convert to int
@ThomasWaldmann
Copy link
Contributor

can you reproduce this with 0.14?

also: please give details about your operating system and your platform, esp. 32bit vs. 64bit and cpu type.

@owenh000
Copy link
Author

Sorry for the delay!

Because my local cache became inconsistent with the remote repository and cache initialization was failing, I eventually had to give up and replace my remote repository. This is related to issue 107. Since then, I have been careful to keep my local cache consistent and attic has not needed to do cache initialization again.

But I will try to do some more testing when I have time!

Platform is Debian GNU/Linux amd64. I am not sure what you mean by processor type, but this is on an Intel Core 2 Duo. Is there any additional information that would be helpful?

@jborg
Copy link
Owner

jborg commented Apr 21, 2015

Ok, I'm closing this now. Open a new issue if you're able to reproduce this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants