Skip to content

mp: an SSI abort while dirtying a page is not an error to report - #261

Merged
gburd merged 1 commit into
masterfrom
fix/mp-dirty-ssi-noise
Nov 4, 2026
Merged

gburd merged 1 commit into
masterfrom
fix/mp-dirty-ssi-noise

Conversation

@gburd

@gburd gburd commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

__memp_dirty refetches the page with __memp_fget when it upgrades a snapshot page to a writable copy. For a snapshot-safe txn that fetch can return DB_SNAPSHOT_CONFLICT (SSI mechanism (b), __memp_si_rwconflict). Only DB_LOCK_DEADLOCK skipped the BDB3010 "error getting a page for writing" message, so every such SSI abort also printed it, though the caller just aborts the txn.

Found during v2026.10.7.2 qualification. The SSI write-skew fixes (#257/#258) raise the abort rate on contended workloads. ssi_livelock on FreeBSD 14.5 x86_64 printed BDB3010 30–89 times in 3 s. A counting probe showed every txn that printed it returned DB_SNAPSHOT_CONFLICT or DB_SNAPSHOT_UNSAFE and aborted, and no txn returned another code. On Linux the same run prints none.

Fix: skip the message for the two SSI codes, as for a deadlock. The return value is unchanged. One line; no format or ABI change.

Backport: for the next LTS patch (v2026.10.7.3), not v2026.10.7.2. It is a cosmetic log-noise fix, and v2026.10.7.2 is already qualified.

__memp_dirty, upgrading a snapshot page to a writable copy, refetches
the page with __memp_fget.  For a snapshot-safe txn that fetch can
return DB_SNAPSHOT_CONFLICT (SSI mechanism (b) in
__memp_si_rwconflict).  __memp_dirty skipped "BDB3010 error getting a
page for writing" only for DB_LOCK_DEADLOCK, so every such SSI abort
also printed that message, though the caller aborts the txn normally
and nothing is lost.

It shows up after the SSI write-skew fixes, which raise the abort rate
on contended workloads.  ssi_livelock on FreeBSD 14.5 x86_64 printed
it 30-89 times in 3 s; every txn that printed it returned
DB_SNAPSHOT_CONFLICT or DB_SNAPSHOT_UNSAFE and aborted, and no txn
returned any other code.

Skip the message for the two SSI codes as for a deadlock.  The return
value is unchanged.
@gburd gburd added the backport-lts Fix that must also be backported to the current lts/* branch (RELEASING.md) label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

ABI diff vs v2026.10.8 (libabigail — authoritative)

abidiff exit bitmask: 0

Removed exported symbols (nm -D, _NNNN version suffix normalized)

None.


Advisory: libabigail/nm is the authoritative binary-ABI check; Coccinelle is complementary source-level early warning. See dist/cocci/README.md.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Coccinelle convention checks

No new violations. ✅

Resolved since baseline (3) -- update dist/cocci/baseline.txt to lock these in.
rule_mutex_unbalanced|MUTEX_UNBALANCED|src/btree/bt_curadj.c|return (ret);
rule_mutex_unbalanced|MUTEX_UNBALANCED|src/crypto/mersenne/mt19937db.c|return (ret);
rule_mutex_unbalanced|MUTEX_UNBALANCED|src/mp/mp_register.c|return (ret);

@gburd
gburd marked this pull request as ready for review November 4, 2026 12:14
@gburd
gburd merged commit aad3779 into master Nov 4, 2026
69 checks passed
@gburd
gburd deleted the fix/mp-dirty-ssi-noise branch November 4, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-lts Fix that must also be backported to the current lts/* branch (RELEASING.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant