﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2937	check --repair crashes on LIT objects.	tlhonmey		"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."	defect	new	normal	undecided	unknown	1.12.1		repair check		
