Server could hang during chasing dead record version [CORE4656] #4969
Labels
affect-version: 2.5.2 Update 1
affect-version: 2.5.2
affect-version: 2.5.3 Update 1
affect-version: 2.5.3
affect-version: 3.0 Beta 1
affect-version: 3.0 Beta 2
affect-version: 3.0 RC1
affect-version: 3.0 RC2
component: engine
fix-version: 2.5.5
fix-version: 3.0 Beta 2
priority: major
qa: cannot be tested
type: bug
Submitted by: @dmitry-starodubov
Assigned to: @dmitry-starodubov
In VIO_chase_record_version:
if (!(rpb->rpb_flags & rpb_chained) && rpb->rpb_flags & rpb_gc_active)
{
if (!rpb->rpb_transaction_nr) {
state = tra_active;
}
}
If state is dead and record has rpb_gc_active flag turned on, this flag is reset and starts new iteration of chasing.
On new iteration if ATT_NO_CLEANUP flag turned on, version is read from disk again and compared with saved version:
record_param temp = *rpb;
...
VIO_data(tdbb, rpb, pool);
rpb->rpb_page = temp.rpb_page;
rpb->rpb_line = temp.rpb_line;
if (!(DPM_fetch(tdbb, rpb, LCK_read)))
{
if (!DPM_get(tdbb, rpb, LCK_read)) {
return false;
}
break;
}
"rpb" and "temp" versions can differ only by rpb_gc_active flag which was reset from saved version on previous iteration. Because of this current version considered as changed and it processed again. And so on. Loop inside VIO_chase_record_version becomes infinite.
Commits: 1c4aeb4 b260c1e FirebirdSQL/fbt-repository@53dc454 FirebirdSQL/fbt-repository@e3b3da1
The text was updated successfully, but these errors were encountered: