[Bug 1741913] Re: [master] Twisted seems to not handle disconnect from client correctly

Eric Desrochers 1741913 at bugs.launchpad.net
Thu Oct 15 17:49:02 UTC 2020


# Test package available on my PPA:

sudo add-apt-repository ppa:slashd/sf294743
sudo apt-get update

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to twisted in Ubuntu.
https://bugs.launchpad.net/bugs/1741913

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

Status in MAAS:
  New
Status in twisted package in Ubuntu:
  Confirmed

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 manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1741913/+subscriptions



More information about the foundations-bugs mailing list