#2937 new defect

check --repair crashes on LIT objects.

Reported by: tlhonmey Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: 1.12.1
Keywords: repair check Cc:
Launchpad Bug:

Description

Attempting to run "tahoe check --repair" on any URI:LIT: node (whether file or empty, immutable directory as created by tahoe backup) results in the following stack trace:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib64/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/_threads/_threadworker.py", line 46, in work
    task()
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/_threads/_team.py", line 190, in doWork
    task()
--- <exception caught here> ---
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/python/threadpool.py", line 250, in inContext
    result = inContext.theWork()
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/python/threadpool.py", line 266, in <lambda>
    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/allmydata/scripts/cli.py", line 563, in check
    rc = tahoe_check.check(options)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/allmydata/scripts/tahoe_check.py", line 108, in check
    errno = check_location(options, location)
  File "/home/tahoe/tahoe/lib/python2.7/site-packages/allmydata/scripts/tahoe_check.py", line 56, in check_location
    if data["pre-repair-results"]["results"]["healthy"]:
exceptions.KeyError: 'pre-repair-results'

A similar bug for "deep-check --repair" has already been fixed, and that operation works properly.

Unfortunately this complicates working around #755 and contributes to reliable checking and repairing of directory trees being exceptionally slow.

Change History (0)

Note: See TracTickets for help on using tickets.