You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a change to show transaction's priority to users (#12775), the backport to 2.12 introduced a bug that allows for queries to access txn_ field, which can be null.
This crash happens when the transaction has not started and yb_transaction_priority is retrieved.
The crash can be reproduced by following commands:
select * from pg_catalog.pg_settings;
show yb_transaction_priority;
2.14 and 2.15 releases are not impacted by this.
Description
We have observed crash in 2.12.7, 2.12.8 and 2.12.9 release. This is regression caused by GH #12775 .
yugabyte=# select * from pg_catalog.pg_settings;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
yugabyte=# show yb_transaction_priority;
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!> \q
If the transaction is started then retrieving the transaction priority does not result in the crash.
yugabyte=# begin;
BEGIN
yugabyte=# insert into t values (4);
INSERT 0 1
yugabyte=# begin;
yugabyte=# show yb_transaction_priority;
yb_transaction_priority
-------------------------------------------
0.179627565 (Normal priority transaction)
(1 row)
…e active transaction in current session"
Summary:
When `0a12cb7ff08cd0afbc29986c62c5481385510097` was backported to 2.12, bug was introduced when backporting: we try to access txn's priority using txn_->GetPriority();, even when txn_ might be null. This results in a crash when trying to access the priority of such nonexistent txn (see #13348 for details).
This reverts commit 99ffb31.
Test Plan: jenkins: rebase 2.12.9
Reviewers: smishra, pjain
Reviewed By: smishra, pjain
Differential Revision: https://phabricator.dev.yugabyte.com/D18418
Jira Link: DB-2980
Analysis
On a change to show transaction's priority to users (#12775), the backport to 2.12 introduced a bug that allows for queries to access txn_ field, which can be null.
This crash happens when the transaction has not started and
yb_transaction_priority
is retrieved.The crash can be reproduced by following commands:
2.14 and 2.15 releases are not impacted by this.
Description
We have observed crash in 2.12.7, 2.12.8 and 2.12.9 release. This is regression caused by GH #12775 .
If the transaction is started then retrieving the transaction priority does not result in the crash.
Relevant stack trace:
Resolution
We should use the equivalent of saved_priority_ as in the master to retrieve the priority.
The text was updated successfully, but these errors were encountered: