assertion in build_runner runStepNames regarding memory_blocked_steps #30742
Labels
No labels
abi/f32
abi/ilp32
abi/sf
accepted
arch/21k
arch/6502
arch/aarch64
arch/alpha
arch/amdgcn
arch/arc
arch/arc32
arch/arc64
arch/arm
arch/avr
arch/bfin
arch/bpf
arch/colossus
arch/cris
arch/csky
arch/dlx
arch/epiphany
arch/fr30
arch/frv
arch/hexagon
arch/hppa
arch/hppa64
arch/ia64
arch/kalimba
arch/kvx
arch/lanai
arch/lm32
arch/loongarch32
arch/loongarch64
arch/m32r
arch/m68k
arch/m88k
arch/mcore
arch/microblaze
arch/mips
arch/mips64
arch/mmix
arch/moxie
arch/mrisc32
arch/msp430
arch/nds32
arch/ns32k
arch/nvptx
arch/or1k
arch/powerpc
arch/powerpc64
arch/propeller
arch/riscv32
arch/riscv64
arch/rl78
arch/rx
arch/s390x
arch/sh
arch/sparc
arch/sparc64
arch/spirv
arch/spu
arch/tricore
arch/v850
arch/vax
arch/vc4
arch/ve
arch/wasm
arch/x86
arch/x86_64
arch/xcore
arch/xtensa
autodoc
backend/c
backend/llvm
backend/self-hosted
binutils
breaking
build system
debug info
docs
error message
frontend
fuzzing
incremental
lib/c
lib/compiler-rt
lib/cxx
lib/std
lib/tsan
lib/ubsan-rt
lib/unwind
linking
miscompilation
os/android
os/contiki
os/dragonfly
os/driverkit
os/emscripten
os/freebsd
os/fuchsia
os/haiku
os/hermit
os/hurd
os/illumos
os/ios
os/linux
os/maccatalyst
os/macos
os/managarm
os/netbsd
os/ohos
os/openbsd
os/plan9
os/redox
os/rtems
os/serenity
os/tvos
os/uefi
os/visionos
os/wasi
os/watchos
os/windows
proposal
release notes
testing
zig cc
zig fmt
zig reduce
bounty
bug
contributor-friendly
downstream
enhancement
infra
optimization
question
regression
upstream
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ziglang/zig#30742
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
spotted in the master branch CI run for
335c0fcba1on aarch64-macos-debug:Worth noting that this isn't a (recent) regression, we first became aware of it in October: see https://github.com/ziglang/zig/pull/25585 for a diff which makes it reproduce consistently in CI (the first commit of that PR). Alex and I weren't able to figure out the bug when we last looked into this.
(I thought there was an issue open for it on GitHub, but I can't find it, so I'm guessing we forgot to open one!)
I think a have repro for this, with four modules having one sleeping test. A, B, D have
max_rssbudget of 40M, C doesn't have any (pun intended) and it's marked by star in logs.Test runner is running with
-j4 --maxrss 60M. Note: I editorialized are thread ids, originals in details.Clean run
Original log
Failed run
Original log
Diffs
Debug messages in build_runner.zig
Repro code
Oh! Thank you @jgonet, that's extremely helpful---I see exactly what's going on now.
workerMakeOneStepgets called for the same step twice (normal and expected); both of those calls enter theif (s.max_rss != 0)block (one after the other due to the mutex) so the same step gets added tomemory_blocked_stepstwice; the first one is popped, runs the step, completes itself, and pops the next item frommemory_blocked_steps, which is itself; that task notices the step is already done and immediately returns; so other steps inmemory_blocked_stepsare never run.A quick hacky fix is doable, but I suspect there's a much better way to structure this logic; I'll tinker with it and see where I end up.
-exported_symbols_list#30628