Repository navigation
docs(daemon): document heap dump symbolization; fix heap-dump message spacing - #1853
Merged
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
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.
What
The daemon's heap dumps are only half a diagnostic: they carry raw addresses
plus a mapping table and zero function entries, so a reader who points a
symbolizer at the installed release binary gets
??:?and concludes nothing isleaking. This adds the missing half — the procedure and the symbolization
requirement — and fixes a message whose literal had 20+ spaces baked into it.
docs/guides/heap-profiling.md(new) — how to capture from process start(
FBUILD_HEAP_PROFILE=1) and on demand (POST /api/daemon/heap-dump), wheredumps land, and how to symbolize them. Calls out that wheels ship stripped
binaries and that the matching
fbuild-<version>-<target>-debugsidecar fromthe same GitHub release is what names frames. Includes the measured
unstripped-vs-stripped table below.
crates/fbuild-daemon/src/handlers/health.rs— the on-demand-dump message wasone source line wrapped without continuations, so it rendered as
with this request … the ones already held. Now single-spaced, and both branches name the binary/sidecar needed tosymbolize the result.
docs/guides/README.md+docs/INDEX.md— two routing rows, so the page isreachable from the documented entry points.
Why this is #1360's "make sure it actually works" half
#1360's open headline is the ~3.9 GB idle leak; the review asked for the
symbolization path to be checked before the wiring is called done. This does
that against a real release daemon and records the answer.
Verification (real output)
Built the daemon and captured a dump end-to-end on Linux:
Dump contents: 5 samples, 12 locations, 8 mappings, 0 functions — addresses
only, exactly as documented. Same addresses, base-subtracted, through
addr2line -f -C -e <binary>:0x2adb09a_mi_prof_stack_intern(mimalloc-pprof-amalgamated.c:21444)pthread_create0x2adcb0b_mi_prof_on_alloc(mimalloc-pprof-amalgamated.c:21253)pthread_create0x2adfc69mi_page_malloc_zero(mimalloc-pprof-amalgamated.c:7171)pthread_create0x2aa4b8atokio::runtime::scheduler::multi_thread::worker::create??:?0x2764ab8fbuild_core::usb::profiles::validate_and_index(profiles.rs:49)??:?Gates:
Documentation only beyond the message string; no daemon behavior changed.
Refs #1360. Does not close it — the leak itself is still undiagnosed.