You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bloat gate: local ESP32-S3 Blink total_flash reads 4 KB higher than CI for the same commit #4468
For master 01caa0a89f, uv run python tests/test_esp32s3_bloat_regression.py gives different totals:
total_flash (report.json)
fbuild image flash:
ELF size
CI (bloat regression run on master)
383,120 B → PASS
473,588 B
9.84 MB
local (NixOS, fbuild 2.5.24)
387,217 B → FAIL by 4,059 B
473,524 B
10.3 MB
The flash images agree to within 64 B, but the symbol-sum total the gate reads is 4 KB apart. A local run therefore can't reproduce the gate: it fails on a commit CI passes. Any local delta is only meaningful against another local build.
Ruled out
A stale build dir: removed .build/fbuild/esp32s3 and rebuilt; same 387,217.
The nm path: build_info_Blink.json's aliases.nm points at a stale ~/.fbuild/dev toolchain (20251107) while the compile uses ~/.fbuild/prod (20260121). That comes from _gnu_toolchain_bin_for_target in ci/compiler/build_config.py, which globs ~/.fbuild/*/… sorted, so dev wins over prod. It's a separate small bug worth fixing, but repointing it at the prod nm still gives 387,217, so it isn't the cause here.
Next steps
Upload .build/symbols/esp32s3/report.json as an artifact from the bloat workflow, so a local report can be diffed against CI's by symbol rather than guessed at.
Make _gnu_toolchain_bin_for_target prefer the toolchain the compile actually used (it is in the compile command's include paths).
The stale-binutils part is fixed in #4469. The 4 KB total_flash gap is still open: next, the bloat workflow uploads its report.json so the two can be diffed by symbol.
CI's report is now available (#4470, artifact esp32s3-bloat-report). I compared it against a local report of the same master code:
total_flash
symbols
nm rows
map-derived rows
CI
383,120
4,886
3,860
1,026
local
387,217
4,202
3,926
276
Most of the gap is one symbol. Locally _stext is sized 10,912 B. In CI it has no row at all. _stext is the linker-script label at the start of .flash.text (0x42000020). The 10,912 B after it are the .literal.* input sections of main_34d2.cpp.o, the literal pool, which the local run credits to _stext.
Local map attribution is much thinner. The local run derives only 276 rows from the map, against 1,026 in CI. For example, .text.startup.* / .text.unlikely.* pieces such as fl::ChannelEvents::ChannelEvents() get their own rows in CI and none locally.
Some archive totals really differ. libxtensa is +2.9 KB and FrameworkArduino −1.7 KB. That points at the locally cached framework objects differing from CI's fresh build, even though the images agree to within 64 B.
So the gate's total_flash is a sum of attributed symbol sizes, and how that sum comes out depends on the environment. It is not the image size, so local and CI totals can't be compared directly. Deltas within one environment remain meaningful.
The attribution is done inside fbuild symbols (map parsing plus sizing of unsized nm symbols), so the remaining fix belongs in FastLED/fbuild. Next step: compare the two map parses, which needs the CI firmware.map as well as the report.
Filed the upstream parser/report-contract fix as FastLED/fbuild#1456. Reproduced with fbuild 2.5.26 on a clean base worktree: local total_flash=387,289 B versus pinned 383,214 B, image flash 473,588 B, _stext=10,912 B, and only 276 map-derived rows. The response-LUT feature worktree is 387,363 B locally (+74 B), so the ~4 KB local gate failure is already present without that feature. The upstream issue includes a RED→GREEN fixture and a stable image-metric acceptance criterion; this FastLED issue remains the downstream gate tracker.
Status check (2026-09-26, master fb86eb26e9): both downstream next steps from this issue have landed — CI uploads report.json (#4470), and _gnu_toolchain_bin_for_target in ci/compiler/build_config.py now prefers the toolchain root found in the compile command's paths (#4469). The remaining false ~4 KB local delta is the _stext linker-marker attribution inside fbuild symbols; report.json still exposes only the attributed-symbol total_flash (no image-flash metric). This stays open, blocked on FastLED/fbuild#1456; once an fbuild release ships a stable image metric, bump the pin and switch the gate to it.
Activity
fix(ci): match a toolchain root given as a flag operand (--sysroot=) (#…
fix(ci): take binutils from the toolchain the build used (#4468) (#4469)
zackees commentedon Sep 19, 2026
The stale-binutils part is fixed in #4469. The 4 KB
total_flashgap is still open: next, the bloat workflow uploads itsreport.jsonso the two can be diffed by symbol.zackees commentedon Sep 19, 2026
Diffed by symbol: this is attribution, not code
CI's report is now available (#4470, artifact
esp32s3-bloat-report). I compared it against a local report of the same master code:nmrows_stextis sized 10,912 B. In CI it has no row at all._stextis the linker-script label at the start of.flash.text(0x42000020). The 10,912 B after it are the.literal.*input sections ofmain_34d2.cpp.o, the literal pool, which the local run credits to_stext..text.startup.*/.text.unlikely.*pieces such asfl::ChannelEvents::ChannelEvents()get their own rows in CI and none locally.So the gate's
total_flashis a sum of attributed symbol sizes, and how that sum comes out depends on the environment. It is not the image size, so local and CI totals can't be compared directly. Deltas within one environment remain meaningful.The attribution is done inside
fbuild symbols(map parsing plus sizing of unsizednmsymbols), so the remaining fix belongs in FastLED/fbuild. Next step: compare the two map parses, which needs the CIfirmware.mapas well as the report.ci(bloat): upload the ESP32-S3 symbol report as an artifact (#4468) (#…
zackees commentedon Sep 23, 2026
Filed the upstream parser/report-contract fix as FastLED/fbuild#1456. Reproduced with fbuild 2.5.26 on a clean base worktree: local
total_flash=387,289 Bversus pinned 383,214 B, image flash 473,588 B,_stext=10,912 B, and only 276 map-derived rows. The response-LUT feature worktree is 387,363 B locally (+74 B), so the ~4 KB local gate failure is already present without that feature. The upstream issue includes a RED→GREEN fixture and a stable image-metric acceptance criterion; this FastLED issue remains the downstream gate tracker.zackees commentedon Sep 26, 2026
Status check (2026-09-26, master
fb86eb26e9): both downstream next steps from this issue have landed — CI uploadsreport.json(#4470), and_gnu_toolchain_bin_for_targetinci/compiler/build_config.pynow prefers the toolchain root found in the compile command's paths (#4469). The remaining false ~4 KB local delta is the_stextlinker-marker attribution insidefbuild symbols;report.jsonstill exposes only the attributed-symboltotal_flash(no image-flash metric). This stays open, blocked on FastLED/fbuild#1456; once an fbuild release ships a stable image metric, bump the pin and switch the gate to it.fix(bloat): gate ESP32-S3 Blink on image_flash (fbuild 2.5.28) (#4655)