/storage emitting exception - lease reporting code #679

Open
opened 2009-04-09 05:13:56 +00:00 by terrell · 1 comment
terrell commented 2009-04-09 05:13:56 +00:00
Owner

This exception appeared a few times just after a recompile and restart of the server -- running on r3833.

After a few minutes (6 or so), a simple refresh of /storage rendered correctly and this error was not seen again.

2009-04-09 04:54:07.804Z [HTTPChannel,3,127.0.0.1] Unhandled Error
	Traceback (most recent call last):
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/rend.py", line 568, in _renderHTTP
	    return self.flattenFactory(doc, ctx, writer, finisher)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/rend.py", line 527, in <lambda>
	    flattenFactory = lambda self, *args: flat.flattenFactory(*args)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/__init__.py", line 14, in flattenFactory
	    return deferflatten(stan, ctx, writer).addCallback(finisher)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/twist.py", line 63, in deferflatten
	    _drive(iterable, finished)
	--- <exception caught here> ---
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/twist.py", line 24, in _drive
	    next = iterable.next()
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 83, in iterflatten
	    for item in gen:
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 103, in TagSerializer
	    yield serialize(toBeRenderedBy, context)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 70, in serialize
	    return partialflatten(context, obj)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten
	    return flattener(obj, context)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 264, in DirectiveSerializer
	    return serialize(renderer, context)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 70, in serialize
	    return partialflatten(context, obj)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten
	    return flattener(obj, context)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 247, in MethodSerializer
	    return FunctionSerializer(original, context, nocontext)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 236, in FunctionSerializer
	    result = original(context, data)
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/src/allmydata/web/storage.py", line 242, in render_lease_last_cycle_results
	    self.format_recovered(last["space-recovered"], "actual")
	  File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/src/allmydata/web/storage.py", line 159, in format_recovered
	    (maybe(sr["%s-shares" % a]),
	exceptions.KeyError: 'actual-shares'
This exception appeared a few times just after a recompile and restart of the server -- running on r3833. After a few minutes (6 or so), a simple refresh of /storage rendered correctly and this error was not seen again. ``` 2009-04-09 04:54:07.804Z [HTTPChannel,3,127.0.0.1] Unhandled Error Traceback (most recent call last): File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/rend.py", line 568, in _renderHTTP return self.flattenFactory(doc, ctx, writer, finisher) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/rend.py", line 527, in <lambda> flattenFactory = lambda self, *args: flat.flattenFactory(*args) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/__init__.py", line 14, in flattenFactory return deferflatten(stan, ctx, writer).addCallback(finisher) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/twist.py", line 63, in deferflatten _drive(iterable, finished) --- <exception caught here> --- File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/twist.py", line 24, in _drive next = iterable.next() File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 83, in iterflatten for item in gen: File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 103, in TagSerializer yield serialize(toBeRenderedBy, context) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 70, in serialize return partialflatten(context, obj) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten return flattener(obj, context) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 264, in DirectiveSerializer return serialize(renderer, context) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 70, in serialize return partialflatten(context, obj) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/ten.py", line 61, in partialflatten return flattener(obj, context) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 247, in MethodSerializer return FunctionSerializer(original, context, nocontext) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/support/lib/python2.5/site-packages/Nevow-0.9.32-py2.5.egg/nevow/flat/flatstan.py", line 236, in FunctionSerializer result = original(context, data) File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/src/allmydata/web/storage.py", line 242, in render_lease_last_cycle_results self.format_recovered(last["space-recovered"], "actual") File "/Users/trel/Desktop/tahoestuff/tahoefromdarcs/src/allmydata/web/storage.py", line 159, in format_recovered (maybe(sr["%s-shares" % a]), exceptions.KeyError: 'actual-shares' ```
tahoe-lafs added the
unknown
major
defect
1.3.0
labels 2009-04-09 05:13:56 +00:00
tahoe-lafs added this to the undecided milestone 2009-04-09 05:13:56 +00:00
warner added
code-frontend-web
and removed
unknown
labels 2009-07-03 00:59:41 +00:00
davidsarah commented 2012-11-20 00:48:03 +00:00
Author
Owner

I don't think this is actually a heisenbug, I think it's just that the actual-shares field isn't being initialized until the lease crawler is run. This bug might survive the transition to leasedb, since the new accounting crawler code is based quite closely on the old lease crawler code, and the status page implementation hasn't changed much either.

I'm slightly confused because I thought there already was a test that the status page renders correctly before the lease crawler is run. But if not, we should add one.

I don't think this is actually a heisenbug, I think it's just that the `actual-shares` field isn't being initialized until the lease crawler is run. This bug *might* survive the transition to leasedb, since the new accounting crawler code is based quite closely on the old lease crawler code, and the status page implementation hasn't changed much either. I'm slightly confused because I thought there already was a test that the status page renders correctly before the lease crawler is run. But if not, we should add one.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#679
No description provided.