close all sqlalchemy sessions

Bug #370772 reported by Stefano Rivera
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
High
Stefano Rivera

Bug Description

We need a bit of a SQLAlchemy usage audit

ERROR core.dispatcher: Exception occured in Identify processor of identity plugin
Traceback (most recent call last):
  File "/home/stefanor/projects/ibid/tibid/ibid/core.py", line 22, in _process
    processor.process(event)
  File "/home/stefanor/projects/ibid/tibid/ibid/plugins/identity.py", line 354, in process
    .filter(func.lower(Identity.identity) == event.sender['id'].lower())\
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/query.py", line 909, in first
    ret = list(self[0:1])
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/query.py", line 937, in __iter__
    self.session._autoflush()
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/session.py", line 771, in _autoflush
    self.flush()
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/session.py", line 789, in flush
    self.uow.flush(self, objects)
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/unitofwork.py", line 234, in flush
    session.create_transaction(autoflush=False)
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/session.py", line 502, in begin
    self.transaction = self.transaction._begin(**kwargs)
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/session.py", line 181, in _begin
    self._assert_is_active()
  File "/var/lib/python-support/python2.6/sqlalchemy/orm/session.py", line 169, in _assert_is_active
    raise exceptions.InvalidRequestError("The transaction is inactive due to a rollback in a subtransaction and should be closed")
InvalidRequestError: The transaction is inactive due to a rollback in a subtransaction and should be closed

I can reliably trigger that on tibid by connecting as a random user and saying "delete account tumbleweed" (he's running with identity-370434 and accounts-330942). However the bug doesn't appear to be in that code.

Here's some background: http://www.nabble.com/Transaction-problem-with-Oracle-%2B-SQLAlchemy-td15560443.html

Changed in ibid:
assignee: nobody → Stefano Rivera (stefanor)
status: New → In Progress
Changed in ibid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.