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

AssertionError: InvalidRequestError: This session is in 'inactive' state, due to the SQL transaction being rolled back; no further SQL can be emitted within this transaction. #2682

Open
sentry-io bot opened this issue Dec 16, 2024 · 1 comment
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. kind/internal Doesn't affect users directly, may be e.g. infrastructure, DB related.

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 16, 2024

Sentry Issue: PCKT-002-PACKIT-SERVICE-930

InvalidRequestError: This session is in 'inactive' state, due to the SQL transaction being rolled back; no further SQL can be emitted within this transaction.
(9 additional frame(s) were not displayed)
...
  File "<string>", line 2, in begin

AssertionError: 
(9 additional frame(s) were not displayed)
...
  File "contextlib.py", line 137, in __exit__
    self.gen.throw(typ, value, traceback)
  File "packit_service/models.py", line 124, in sa_session_transaction
    session.rollback()
  File "sqlalchemy/orm/session.py", line 1399, in rollback
    self._transaction.rollback(_to_root=self.future)
  File "sqlalchemy/orm/session.py", line 892, in rollback
    boundary._restore_snapshot(dirty_only=boundary.nested)
  File "sqlalchemy/orm/session.py", line 672, in _restore_snapshot
    assert self._is_transaction_boundary
@lbarcziova
Copy link
Member

From the logs, for the period when this started, the only suspicious log activity I found is:

[2024-12-12 14:18:30,557: WARNING/MainProcess] task.run_testing_farm_handler[49555b21-86ac-475e-9987-38b5b7258e70] Exception while working with database: AttributeError("'NoneType' object has no attribute '_new'")
[2024-12-12 14:18:30,558: WARNING/MainProcess] task.run_testing_farm_handler[49555b21-86ac-475e-9987-38b5b7258e70] /usr/local/lib/python3.9/site-packages/packit_service/models.py:124: SAWarning: Session's state has been changed on a non-active transaction - this state will be discarded.
  session.rollback()

@lbarcziova lbarcziova removed their assignment Dec 23, 2024
@lbarcziova lbarcziova added complexity/single-task Regular task, should be done within days. area/general Related to whole service, not a specific part/integration. kind/internal Doesn't affect users directly, may be e.g. infrastructure, DB related. labels Jan 6, 2025
@lbarcziova lbarcziova moved this from new to backlog in Packit Kanban Board Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/general Related to whole service, not a specific part/integration. complexity/single-task Regular task, should be done within days. kind/internal Doesn't affect users directly, may be e.g. infrastructure, DB related.
Projects
Status: backlog
Development

No branches or pull requests

2 participants