Skip to content

[2026.10.7] mp: an SSI abort while dirtying a page is not an error to report - #270

Merged
gburd merged 1 commit into
lts/2026.10.7from
backport/2026.10.7/mp-dirty-ssi-noise
Nov 4, 2026
Merged

gburd merged 1 commit into
lts/2026.10.7from
backport/2026.10.7/mp-dirty-ssi-noise

Conversation

@gburd

@gburd gburd commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Backport of #261 to lts/2026.10.7 for v2026.10.7.3: cherry-pick -x of 2a582f3, which applied cleanly.

__memp_dirty printed BDB3010 "error getting a page for writing" whenever an SSI transaction aborted with DB_SNAPSHOT_CONFLICT or DB_SNAPSHOT_UNSAFE while upgrading a snapshot page. The caller aborts the transaction normally and no data is affected, so the message is noise. It now skips those two codes, as it already did for DB_LOCK_DEADLOCK. The return value is unchanged.

This is a one-line change in src/mp/mp_fset.c, with no format, ABI or region change. It has no unit test, because it only changes a log message. The release qualification counts the BDB3010 lines ssi_livelock prints on FreeBSD: base against release.

__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.

(cherry picked from commit 2a582f3)
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

ABI diff vs v2026.10.7.2 (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 22:05
@gburd
gburd merged commit 70b029f into lts/2026.10.7 Nov 4, 2026
66 checks passed
@gburd
gburd deleted the backport/2026.10.7/mp-dirty-ssi-noise branch November 4, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant