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

attic cache config corruption #177

Open
fhaust opened this issue Jan 16, 2015 · 5 comments
Open

attic cache config corruption #177

fhaust opened this issue Jan 16, 2015 · 5 comments

Comments

@fhaust
Copy link

fhaust commented Jan 16, 2015

There seems to be a problem with ... something ... ?

# attic create --stats --exclude-from $EXCLUDE_FILE --exclude-caches $REPOSITORY_VIA_SSH $FOLDER
Traceback (most recent call last):
  File "/usr/lib/python3.4/configparser.py", line 1116, in _unify_values
    sectiondict = self._sections[section]
KeyError: 'cache'

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.4/site-packages/attic/archiver.py", line 727, in main
    exit_code = archiver.run(sys.argv[1:])
  File "/usr/lib/python3.4/site-packages/attic/archiver.py", line 717, in run
    return args.func(args)
  File "/usr/lib/python3.4/site-packages/attic/archiver.py", line 100, in do_create
    cache = Cache(repository, key, manifest)
  File "/usr/lib/python3.4/site-packages/attic/cache.py", line 28, in __init__
    self.open()
  File "/usr/lib/python3.4/site-packages/attic/cache.py", line 63, in open
    if self.config.getint('cache', 'version') != 1:
  File "/usr/lib/python3.4/configparser.py", line 781, in getint
    return self._get(section, int, option, raw=raw, vars=vars)
  File "/usr/lib/python3.4/configparser.py", line 776, in _get
    return conv(self.get(section, option, **kwargs))
  File "/usr/lib/python3.4/configparser.py", line 754, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.4/configparser.py", line 1119, in _unify_values
    raise NoSectionError(section)
configparser.NoSectionError: No section: 'cache'
@ThomasWaldmann
Copy link
Contributor

A config file (see .cache/attic/XXXXXX/config) usually looks like this:

[cache]
version = 1
repository = 003aeedbd89963c55f2621e6684ad155c1e9a5eb3a1c4daf43e77a13c9ef9360
manifest = e60ce0e7e0878c58d42a687264af8278d5bc1c381736bfbedc521644f85a415a
timestamp = 2015-03-02T22:34:53.897209

In your case, it did not find the [cache] section, which likely means it is somehow corrupted or maybe empty. Maybe kill the cache so it gets rebuilt.

@fhaust
Copy link
Author

fhaust commented Mar 8, 2015

That file was empty, but deleting the .cache/attic folder solved the
problem. Kind of curious as I think that was the first thing I tried when
this failed.

But thanks nevertheless. Attic is a great piece of software and I am glad
it works again.

2015-03-08 4:44 GMT+01:00 TW notifications@github.com:

A config file (see .cache/attic/XXXXXX/config) usually looks like this:

[cache]
version = 1
repository = 003aeedbd89963c55f2621e6684ad155c1e9a5eb3a1c4daf43e77a13c9ef9360
manifest = e60ce0e7e0878c58d42a687264af8278d5bc1c381736bfbedc521644f85a415a
timestamp = 2015-03-02T22:34:53.897209

In your case, it did not find the [cache] section, which likely means it
is somehow corrupted or maybe empty. Maybe kill the cache so it gets
rebuilt.


Reply to this email directly or view it on GitHub
#177 (comment).

@fhaust
Copy link
Author

fhaust commented Mar 9, 2015

Actually the problem persists ... I was able to do some backups. But somehow the cache was corrupted again. Deleting it fixes this (again).

Anything I could do to help you find the cause of this problem?

@ThomasWaldmann
Copy link
Contributor

did you run out of disk space? did attic crash before the file was zero length?
also, can you try to reproduce with a local repository (without ssh)?

@fhaust
Copy link
Author

fhaust commented May 14, 2015

Attic probably crashed before this corruption happened. I have it running
hourly and the target server is not available all of the time. Probably it
even loses the server mid-backup.

Haven't encountered the problem again after deleting the cache. So I
probably can't reproduce it locally.

Can't change the title just now. If I don't the next days please remind me
again.
Am 14.05.2015 17:17 schrieb "TW" notifications@github.com:

@fhaust https://github.com/fhaust could you edit the issue title and
change it to "attic cache config corruption"? See the button to the right
of the title. also see my last comment for some open questions.


Reply to this email directly or view it on GitHub
#177 (comment).

@fhaust fhaust changed the title KeyError: 'cache' attic cache config corruption May 15, 2015
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

2 participants