Librarian requests occasionally fail: 'NoneType' object has no attribute 'get_object'

Bug #1420046 reported by William Grant on 2015-02-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Critical
Unassigned

Bug Description

Roughly 25 Swift Librarian requests fail each day like OOPS-f1c692cf8f319c390c1a8940f8187009:

Unhandled Error
Traceback (most recent call last):
Failure: exceptions.AttributeError: 'NoneType' object has no attribute 'get_object'

Possibly the Swift connection pool ends up with a None in it?

Stuart Bishop (stub) wrote :

An assert in ConnectionPool.put will locate anywhere that does this. Or log the traceback and throw the None away.

William Grant (wgrant) wrote :

https://code.launchpad.net/~wgrant/launchpad/couple-of-oopses/+merge/249788 adds the None check. Hopefully we'll get some useful tracebacks, though it's possible that this theory is completely wrong.

William Grant (wgrant) wrote :

New assertion confirms the theory, eg. OOPS-0858ab81859c279c8b8d55322b57402c:

Traceback (most recent call last):
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 421, in errback
    self._startRunCallbacks(fail)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 488, in _startRunCallbacks
    self._runCallbacks()
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 575, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1126, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1068, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/lib/lp/services/librarianserver/web.py", line 322, in resumeProducing
    data = yield self.fileObject.read(self.bufferSize)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/eggs/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/defer.py", line 1070, in _inlineCallbacks
    result = g.send(result)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/lib/lp/services/librarianserver/storage.py", line 150, in read
    swift.connection_pool.put(self._swift_connection)
  File "/srv/launchpadlibrarian.net/production/launchpad3-rev-17355/lib/lp/services/librarianserver/swift.py", line 351, in put
    "%r is not a swiftclient Connection." % swift_connection)
exceptions.AssertionError: None is not a swiftclient Connection.

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

Other bug subscribers