Skip to content

test/dst-rt: pin libumem 4.3.2 and run s3-umem under UMEM_DEBUG=default - #276

Merged
gburd merged 1 commit into
masterfrom
test/dst-rt-libumem-4.3.2
Nov 5, 2026
Merged

gburd merged 1 commit into
masterfrom
test/dst-rt-libumem-4.3.2

Conversation

@gburd

@gburd gburd commented Nov 5, 2026

Copy link
Copy Markdown
Collaborator

libumem 4.3.2 fixes the bug behind F1-002 and F1-003, which we reported on 2026-11-04.

The bug. Under LD_PRELOAD, UMEM_DEBUG=audit, and default, which includes it, re-entered the allocator. The first stack walk on each thread called pthread_getattr_np() while vmem locks were held, and that call mallocs. The result was the VMC_POPULATOR abort on the dev box, or a hang on the Ubuntu 26.04 runner.

The fix. 4.3.2 reads the stack bounds from /proc/self/maps with plain open/read, so nothing on that path allocates. Commits: fix 490c943, regression test 4abe0f6, release 60a6452. The ABI is unchanged.

Measured on the dev box (Debian 12, x86_64), 25 runs per cell. Each library was first shown to be live by catching a planted overflow. The programs are the one-malloc reproducer and a first-malloc-on-a-new-thread variant.

UMEM_DEBUG fe9ff96 (old pin) 60a6452 (v4.3.2)
audit 25/25 abort 25/25 exit 0
audit + norseq 25/25 hang 25/25 exit 0
default 25/25 abort 25/25 exit 0
default + norseq 25/25 hang 25/25 exit 0

s3 against master with 4.3.2. s3-umem is clean and s3-umem-sabotage catches the planted overflow on seeds 1–5, under both default and guards,contents. The edited script, run without S3_UMEM_MODE, picks default and passes both arms.

Changes:

  • install.sh: LIBUMEM_PIN → 60a6452. This also changes the CI tools cache key, so CI rebuilds libumem.
  • s3_alloc_failure.sh: UMEM_DEBUG=default again, so the audit allocation and free stacks are back in its reports. S3_UMEM_MODE=guards,contents still selects the old mode.
  • FINDINGS.md: F1-002 and F1-003 are marked fixed upstream, with the measurements.
  • README.md: the tool note now says 4.3.2 or later is required.

Every libumem run stays under timeout -k, as libumem's maintainers recommended: on one of their hosts a hung LD_PRELOAD process outlived a plain timeout.

Test-only. No engine change, so no LTS backport.

libumem 4.3.2 fixes the bug behind F1-002 and F1-003, which we reported on
2026-11-04.  Under LD_PRELOAD, UMEM_DEBUG=audit (and default, which
includes it) re-entered the allocator: the first stack walk on a thread
called pthread_getattr_np(), which mallocs, while vmem locks were held.
4.3.2 reads the stack bounds from /proc/self/maps without allocating
(fix 490c943, regression test 4abe0f6, release 60a6452; ABI unchanged).

Measured on the dev box (Debian 12, x86_64), 25 runs per cell, after
showing each library live by catching a planted overflow:

  UMEM_DEBUG             fe9ff96 (old pin)   60a6452 (v4.3.2)
  audit                  25/25 abort         25/25 exit 0
  audit + norseq         25/25 hang          25/25 exit 0
  default                25/25 abort         25/25 exit 0
  default + norseq       25/25 hang          25/25 exit 0

s3 against master with 4.3.2: s3-umem clean and s3-umem-sabotage
catching the planted overflow on seeds 1-5, under both default and
guards,contents.

Pin LIBUMEM_PIN to 60a6452 (this also changes the CI tools cache key, so
CI rebuilds libumem), make default the s3 mode again, and mark F1-002 and
F1-003 fixed upstream.  Every libumem run stays under timeout -k.
S3_UMEM_MODE=guards,contents still selects the old mode.
@github-actions

github-actions Bot commented Nov 5, 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);

@github-actions

github-actions Bot commented Nov 5, 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.

@gburd
gburd merged commit 8792aba into master Nov 5, 2026
60 checks passed
@gburd
gburd deleted the test/dst-rt-libumem-4.3.2 branch November 5, 2026 15:20
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