Repository navigation
test/dst-rt: pin libumem 4.3.2 and run s3-umem under UMEM_DEBUG=default - #276
Merged
Merged
Conversation
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.
Contributor
Coccinelle convention checksNo new violations. ✅ Resolved since baseline (3) -- update dist/cocci/baseline.txt to lock these in. |
Contributor
ABI diff vs
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, anddefault, which includes it, re-entered the allocator. The first stack walk on each thread calledpthread_getattr_np()while vmem locks were held, and that call mallocs. The result was theVMC_POPULATORabort 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/mapswith plainopen/read, so nothing on that path allocates. Commits: fix490c943, regression test4abe0f6, release60a6452. 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_DEBUGfe9ff96(old pin)60a6452(v4.3.2)auditaudit+norseqdefaultdefault+norseqs3 against master with 4.3.2.
s3-umemis clean ands3-umem-sabotagecatches the planted overflow on seeds 1–5, under bothdefaultandguards,contents. The edited script, run withoutS3_UMEM_MODE, picksdefaultand 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=defaultagain, so the audit allocation and free stacks are back in its reports.S3_UMEM_MODE=guards,contentsstill 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 hungLD_PRELOADprocess outlived a plaintimeout.Test-only. No engine change, so no LTS backport.