2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2026-09-12 12:36:23 +00:00
Daniel Hilst b435ae4bad fix(xcat-dep): an emulated build that deadlocks hangs the pipeline forever
Every per-package build ran through a bare system() call with no wall-clock
bound. Under qemu-user a build can deadlock -- a riscv64 goconserver `go build`
held both Go pids in futex_wait for 26 minutes with no CPU ticks and no open
socket -- and the step then never returns. The pipeline does not go red; it
stops, and a stopped run reads as "still running".

XCAT::BuildUtils::run_bounded runs the command in its own process group, kills
that group when a budget expires, and prints first what the manual
investigation had to collect by hand: the process tree, each pid's kernel wchan
and stack, its open socket count, and the CPU ticks the group used across a
20-second sample. Zero ticks names a deadlock; ticks name a build that is only
slow. BuildUtils::build_deb_in_chroot bounds every Ubuntu package build, and
mockbuild-all.pl bounds the dep and perl steps of a forcearch target.

The budget is 900 seconds for a native build and ten times that for a foreign
architecture, because qemu-user under TCG runs at roughly a tenth of native
speed. Both sit about five times above the slowest build measured on
xcat-master-ub: 3 minutes native, and 26 minutes for riscv64 ipmitool-xcat on
resolute with four codenames building at once. Native mock steps stay unbounded
-- no measurement of them exists, and a guessed budget would turn a trusted
cell red. sbuild-all.pl --build-timeout and mockbuild-all.pl --build-timeout
override the default; 0 removes the bound.

t/build_timeout.t fails without this change: run_bounded never returns and the
test reports the hang instead of blocking.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-09-06 00:24:11 -03:00
2013-05-29 14:58:44 +00:00
2008-10-13 15:50:23 +00:00
2011-11-08 18:33:23 +00:00
2009-07-08 18:55:52 +00:00
2020-01-06 16:34:55 -05:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2008-04-10 19:42:20 +00:00
2011-09-21 19:13:13 +00:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2022-09-26 16:20:45 +02:00
2018-11-23 15:20:55 +08:00
2018-11-23 15:20:55 +08:00
2009-04-24 20:17:23 +00:00
2016-12-12 13:44:39 -05:00
S
Description
No description provided
223 MiB
Languages
C 89%
Perl 6.7%
Assembly 1.4%
JavaScript 0.8%
Makefile 0.6%
Other 1.4%