Skip to content

mutex: select the AArch64 hybrid on macOS/arm64 by default; libdb 2026.10.7 (F7) - #212

Merged
gburd merged 2 commits into
masterfrom
fix/f7-macos-hybrid-mutex
Oct 15, 2026
Merged

gburd merged 2 commits into
masterfrom
fix/f7-macos-hybrid-mutex

Conversation

@gburd

@gburd gburd commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Selects the AArch64 hybrid mutex on macOS/arm64 again, by default, and cuts 2026.10.7.

681026b49 excluded macOS from the hybrid after run_mutex_stress printed no verdict on every macOS job. PR #211 found that the runner, not the mutex, was broken there. With the runner fixed, a dispatch-only A/B (.github/workflows/f7-macos-ab.yml, run 38646734711, macos-14 + macos-latest) measured both mutexes on Apple Silicon:

  • Correctness is identical on both arms: run_mutex_stress 4/4, lockmatrix 55/55 checks, test/db 33 PASS / 0 FAIL.
  • Performance: the hybrid is faster or neutral in every cell and never significantly slower (bootstrap 95% CI on the ratio of medians). Lock manager 1.08–2.01× (1.44–2.01× at 2 threads on both runners), hot-key reads 1.44–1.50× at 4 threads, writes neutral. The harness's noise floor is 0.94–1.08×.

Details and raw TSVs: test/bench/F7-MACOS-HYBRID-2026-10.md.

Region signature

REGION-SIG-CHANGE-INTENDED, macOS arm64 only: 0xe0ad2911 → 0x2c8d3688. Upgrade note: docs_src/guides/upgrading/upgrade_2026_10_7.md.

On every other platform the engine is byte-identical to the soaked v2026.10.6. Building both trees with the same configure gives an identical db_config.h, an identical signature and a sha256-equal .text. This was checked on Linux x86_64, FreeBSD x86_64 and FreeBSD aarch64. The MSVC build consumes no file that differs. So the v2026.10.6 72-hour soak qualifies this release on those platforms.

Greg Burd added 2 commits October 14, 2026 19:24
681026b stopped selecting the hybrid (TAS spin + pthread block) mutex on
Darwin because run_mutex_stress printed no verdict on every macOS job. PR #211
showed the runner, not the mutex, was broken there (dyld install-name over
-rpath, and no GNU timeout), so that exclusion rested on a misdiagnosis. This
reverts its code hunks in dist/aclocal/mutex.m4 and the dist/meson.build mirror
and regenerates dist/configure; macOS/arm64 again builds as
POSIX/pthreads/library/ARM64/gcc-assembly, like FreeBSD/arm64 and Linux/arm64.

Measured before deciding (test/bench/F7-MACOS-HYBRID-2026-10.md, run
38646734711, macos-14 + macos-latest, Apple M1 Virtual, 7 alternated reps):
  correctness, identical on both arms: run_mutex_stress 4/4, lockmatrix 3/3
    sections (55 checks) 0 failed, test/db run_all 33 PASS / 0 FAIL.
  performance, hybrid/pthreads ratio of medians, bootstrap 95% CI: faster or
    neutral in every cell, never significantly slower. Lock manager 1.08-2.01x
    (1.44-2.01x at t=2 on both runners); hot-key reads 1.44x/1.50x at t=4;
    writes (log-flush bound) neutral. Harness noise floor (same library on both
    arms, Linux): 0.94-1.08x.
Not measured on metal or above 8 threads: no mac2 dedicated-host quota yet.

REGION-SIG-CHANGE-INTENDED: macOS/arm64 only, 0xe0ad2911 -> 0x2c8d3688 (the
hybrid DB_MUTEX is larger). No other platform's build output changes.
REGION-SIG-CHANGE-INTENDED: macOS arm64 only, 0xe0ad2911 -> 0x2c8d3688, from
selecting the AArch64 hybrid mutex there again by default (F7, 0493537).

On every other platform this release's engine is byte-identical to the soaked
v2026.10.6: building both trees with the same configure into fresh dirs gives an
identical db_config.h, identical HAVE_MUTEX_* set, identical region signature and
an identical summed .text (sha256-equal) on Linux x86_64 (0x841f4ea8, 1307426 B),
FreeBSD x86_64 (0x56a06689, 1141304 B) and FreeBSD aarch64 (0x56a06689,
1060020 B). The MSVC build consumes no file that differs between the two tags.
So the v2026.10.6 72-hour soak on those four platforms qualifies 2026.10.7 on
them; macOS is qualified by the F7 A/B (correctness identical on both arms,
hybrid faster or neutral everywhere).

Version sites: DB_CALVER 2026.10.6 -> 2026.10.7, date October 15 2026, via
dist/RELEASE + regenerated autoconf/windows/android headers + the three manual
meson sites. Triplet 2026.0.9 and soname libdb-2026.0.so unchanged.

Upgrade note docs_src/guides/upgrading/upgrade_2026_10_7.md: the procedure
applies on macOS arm64 only; --with-mutex=POSIX/pthreads/library keeps the
2026.10.6 format there (verified: it drops HAVE_MUTEX_HYBRID; note that
--enable-posixmutexes does NOT).
@github-actions

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);

@github-actions

Copy link
Copy Markdown
Contributor

ABI diff vs v2026.10.6 (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.

@gburd
gburd merged commit a849cdb into master Oct 15, 2026
71 checks passed
@gburd
gburd deleted the fix/f7-macos-hybrid-mutex branch October 15, 2026 00:09
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