Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlalchemy.exc.ResourceClosedError from Builder.getOldestRequestTime() #5902

Open
p12tic opened this issue Mar 13, 2021 · 0 comments
Open

sqlalchemy.exc.ResourceClosedError from Builder.getOldestRequestTime() #5902

p12tic opened this issue Mar 13, 2021 · 0 comments
Labels

Comments

@p12tic
Copy link
Member

p12tic commented Mar 13, 2021

Got this exception on custom build based on 2.10.1. This should not happen, but I'm not sure what may cause it. Logs follow:

 [twisted.internet.defer#critical] 
	Traceback (most recent call last):
	  File "<...>/twisted/internet/defer.py", line 501, in errback
	    self._startRunCallbacks(fail)
	  File "<...>/twisted/internet/defer.py", line 568, in _startRunCallbacks
	    self._runCallbacks()
	  File "<...>/twisted/internet/defer.py", line 654, in _runCallbacks
	    current.result = callback(current.result, *args, **kw)
	  File "<...>/twisted/internet/defer.py", line 1475, in gotResult
	    _inlineCallbacks(r, g, status)
	--- <exception caught here> ---
	  File "<...>/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "<...>/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "<...>/buildbot/master/buildbot/process/builder.py", line 169, in getOldestRequestTime
	    order=['submitted_at'], limit=1)
	  File "<...>/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "<...>/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "<...>/buildbot/master/buildbot/data/connector.py", line 125, in get
	    rv = yield endpoint.get(resultSpec, kwargs)
	  File "<...>/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "<...>/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "<...>/buildbot/master/buildbot/data/buildrequests.py", line 169, in get
	    resultSpec=resultSpec)
	  File "<...>/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "<...>/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "<...>/buildbot/master/buildbot/db/buildrequests.py", line 133, in getBuildRequests
	    res = yield self.db.pool.do(thd)
	  File "<...>/twisted/internet/defer.py", line 1416, in _inlineCallbacks
	    result = result.throwExceptionIntoGenerator(g)
	  File "<...>/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
	    return g.throw(self.type, self.value, self.tb)
	  File "<...>/buildbot/master/buildbot/db/pool.py", line 229, in do
	    args, kwargs)
	  File "<...>/twisted/python/threadpool.py", line 250, in inContext
	    result = inContext.theWork()
	  File "<...>/twisted/python/threadpool.py", line 266, in <lambda>
	    inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
	  File "<...>/twisted/python/context.py", line 122, in callWithContext
	    return self.currentContext().callWithContext(ctx, func, *args, **kw)
	  File "<...>/twisted/python/context.py", line 85, in callWithContext
	    return func(*args,**kw)
	  File "<...>/buildbot/master/buildbot/db/pool.py", line 190, in __thd
	    rv = callable(arg, *args, **kwargs)
	  File "<...>/buildbot/master/buildbot/db/buildrequests.py", line 127, in thd
	    lambda r: self._brdictFromRow(r, self.db.master.masterid)))
	  File "<...>/buildbot/master/buildbot/data/resultspec.py", line 346, in thd_execute
	    rv = [dictFromRow(row) for row in res.fetchall()]
	  File "<...>/sqlalchemy/engine/result.py", line 1289, in fetchall
	    e, None, None, self.cursor, self.context
	  File "<...>/sqlalchemy/engine/base.py", line 1514, in _handle_dbapi_exception
	    util.raise_(exc_info[1], with_traceback=exc_info[2])
	  File "<...>/sqlalchemy/util/compat.py", line 182, in raise_
	    raise exception
	  File "<...>/sqlalchemy/engine/result.py", line 1284, in fetchall
	    l = self.process_rows(self._fetchall_impl())
	  File "<...>/sqlalchemy/engine/result.py", line 1232, in _fetchall_impl
	    return self._non_result([], err)
	  File "<...>/sqlalchemy/engine/result.py", line 1241, in _non_result
	    replace_context=err,
	  File "<...>/sqlalchemy/util/compat.py", line 182, in raise_
	    raise exception
	sqlalchemy.exc.ResourceClosedError: This result object does not return rows. It has been closed automatically.
@p12tic p12tic added the bug label Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant