Fix mmap accounting under partial munmap churn#769
Open
brandonpayton wants to merge 7 commits into
Open
Conversation
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| libcurl | wasm32 | built | 1dd45a75 |
| libcxx | wasm32 | built | 456cb624 |
| libcxx | wasm64 | built | 615becef |
| libpng | wasm32 | built | ebe7bdb4 |
| libxml2 | wasm32 | built | 2da98d6d |
| libxml2 | wasm64 | built | acde9763 |
| openssl | wasm32 | built | 53468669 |
| openssl | wasm64 | built | 0089b5e9 |
| sqlite | wasm32 | built | dbd0f8ad |
| sqlite | wasm64 | built | 9b8bf74c |
| zlib | wasm32 | built | e77113ed |
| zlib | wasm64 | built | 55ce9cbd |
| bc | wasm32 | built | f23cd5e9 |
| bzip2 | wasm32 | built | 59a5055b |
| coreutils | wasm32 | built | a5dc43e2 |
| curl | wasm32 | built | 097b4204 |
| dash | wasm32 | built | 69e89a1b |
| diffutils | wasm32 | built | 0c68da0c |
| dinit | wasm32 | built | f7bf7ba2 |
| fbdoom | wasm32 | built | 14d77d19 |
| file | wasm32 | built | 7d2ae69e |
| findutils | wasm32 | built | 2c0bbc1e |
| gawk | wasm32 | built | 952fe64e |
| git | wasm32 | built | 8624583d |
| grep | wasm32 | built | f92e27f6 |
| gzip | wasm32 | built | 4e6f687a |
| kandelo-sdk | wasm32 | built | 31c309e0 |
| kernel | wasm32 | built | 93b5fa30 |
| less | wasm32 | built | 2864ec15 |
| lsof | wasm32 | built | 5e214f7a |
| m4 | wasm32 | built | 314ab10f |
| make | wasm32 | built | 65d911c5 |
| mariadb | wasm32 | built | 3a82fd8d |
| mariadb | wasm64 | built | 6ad68821 |
| modeset | wasm32 | built | 24eb4314 |
| msmtpd | wasm32 | built | 5fedaf14 |
| nano | wasm32 | built | 2e132e4c |
| ncurses | wasm32 | built | bf54a8a5 |
| netcat | wasm32 | built | 6418bf28 |
| nginx | wasm32 | built | b7a7edcf |
| php | wasm32 | built | c9c76f5a |
| posix-utils-lite | wasm32 | built | 7a8832f7 |
| sed | wasm32 | built | 20822b10 |
| spidermonkey | wasm32 | built | d26e2f51 |
| tar | wasm32 | built | 9f914c7c |
| tcl | wasm32 | built | 72be24b3 |
| unzip | wasm32 | built | 34c92ea0 |
| userspace | wasm32 | built | b9db89b9 |
| vim | wasm32 | built | c5cfabfb |
| wget | wasm32 | built | 4dd34f44 |
| xz | wasm32 | built | 59669070 |
| zip | wasm32 | built | 8e1f7882 |
| zstd | wasm32 | built | c19e7903 |
| bash | wasm32 | built | 413c2b36 |
| mariadb-test | wasm32 | built | 28685d6a |
| mariadb-vfs | wasm32 | built | 6b0a763f |
| mariadb-vfs | wasm64 | built | abb53016 |
| nethack | wasm32 | built | 2d70102d |
| node | wasm32 | built | 31b3708f |
| spidermonkey-node | wasm32 | built | 200f58d7 |
| vim-browser-bundle | wasm32 | built | 46067abb |
| nethack-browser-bundle | wasm32 | built | 7bfce76f |
| rootfs | wasm32 | built | 5bb534c7 |
| shell | wasm32 | built | 07edd490 |
| lamp | wasm32 | built | d4783536 |
| node-vfs | wasm32 | built | 52d48e6a |
| wordpress | wasm32 | built | 3a6cd405 |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
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.
Summary
munmaplengths up to the Wasm page size before kernel bookkeeping and host mmap cleanup checks.Root cause
SQLite
memsubsys1/altermalloc.testrepeatedly mapped roughly 0x30000-byte regions and unmapped caller lengths around 0x29000. Kandelo roundedmmapto 64 KiB pages but used the literalmunmaplength in memory bookkeeping, leaving tiny tail mappings. Under mmap churn, those tails inflated the mapping list and the allocator path eventually hitRuntimeError: unreachablein focused Node/browser SQLite lanes.Validation
cargo test -p kandelo --target aarch64-apple-darwin --lib: 964 pass / 0 fail / 0 skip. Artifact:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/kernel-full-lib-after-current-rebuild-20260623T213359Zcd host && npx vitest run: 752 pass / 0 fail / 108 skip, exit 0. Exact gate artifact:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/host-vitest-after-hello64-20260623T213936Z; JSON outcome lists:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/host-vitest-json-outcomes-20260623T214029Zscripts/run-libc-tests.sh: 303 pass / 0 fail / 0 skip, plus 1 flake-pass and 20 documented XFAIL, exit 0. Artifact:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/libc-tests-after-submodule-init-20260623T214334Zscripts/run-posix-tests.sh: 174 pass / 0 fail / 2 skip, plus 3 documented XFAIL, exit 0. Artifact:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/posix-tests-after-munmap-fix-20260623T215119Zbash scripts/check-abi-version.sh: passed with dev-shell nightly plus explicit bzip2/xz library paths. Artifact:/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/abi-check-dev-shell-nightly-bzip2-path-after-munmap-fix-20260623T213546Z/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/focused-browser-memsubsys1-cluster4-after-current-rebuild-20260623T213021Z/Users/brandon/src/kandelo-gascity/worktrees/kandelo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures/test-runs/kd-cfo.4/focused-browser-readonly-unableopen8-after-current-rebuild-20260623T213224ZNotes
cargo fmt -p kandelo --checkwas attempted and is blocked by pre-existing formatting drift in unrelated parts ofsyscalls.rsandwasm_api.rs; no broad rustfmt was applied to avoid unrelated churn.RuntimeError: unreachableafter the done row; follow-up beadkd-cfo.5tracks that separate post-pass runtime issue.