[master] Twisted seems to not handle disconnect from client correctly

Bug #1741913 reported by Blake Rouse on 2018-01-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Medium
Unassigned

Bug Description

When lastest master just moving around the UI caused a wierd stacktrace. It didn't seem to affect the experience of using MAAS, but needs to be looked into.

2018-01-08 15:33:45 -: [critical] WSGI application error
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 87, in callWithContext
     self.contexts.pop()
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 875, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 522, in run
     self.started = True
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 500, in run
     self.write(elem)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 455, in write
     self.reactor, wsgiWrite, self.started)
   File "/usr/lib/python3/dist-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
     result.raiseException()
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 385, in raiseException
     raise self.value.with_traceback(self.tb)
 builtins.AttributeError: 'NoneType' object has no attribute 'writeHeaders'

2018-01-08 15:33:45 -: [critical] WSGI application error
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 87, in callWithContext
     self.contexts.pop()
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 875, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 522, in run
     self.started = True
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 500, in run
     self.write(elem)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 455, in write
     self.reactor, wsgiWrite, self.started)
   File "/usr/lib/python3/dist-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
     result.raiseException()
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 385, in raiseException
     raise self.value.with_traceback(self.tb)
 builtins.AttributeError: 'NoneType' object has no attribute 'writeHeaders'

2018-01-08 15:33:45 -: [critical] Unhandled Error
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 396, in startReactor
     self.config, oldstdout, oldstderr, self.profiler, reactor)
   File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 311, in runReactorWithLogging
     reactor.run()
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1243, in run
     self.mainLoop()
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1252, in mainLoop
     self.runUntilCurrent()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 851, in runUntilCurrent
     f(*a, **kw)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 510, in wsgiError
     self.request.loseConnection()
   File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1474, in loseConnection
     self.channel.loseConnection()
 builtins.AttributeError: 'NoneType' object has no attribute 'loseConnection'

2018-01-08 15:33:45 -: [critical] Unhandled Error
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 396, in startReactor
     self.config, oldstdout, oldstderr, self.profiler, reactor)
   File "/usr/lib/python3/dist-packages/twisted/application/app.py", line 311, in runReactorWithLogging
     reactor.run()
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1243, in run
     self.mainLoop()
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 1252, in mainLoop
     self.runUntilCurrent()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/base.py", line 851, in runUntilCurrent
     f(*a, **kw)
   File "/usr/lib/python3/dist-packages/twisted/web/wsgi.py", line 510, in wsgiError
     self.request.loseConnection()
   File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1474, in loseConnection
     self.channel.loseConnection()
 builtins.AttributeError: 'NoneType' object has no attribute 'loseConnection'

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers