[Midnightbsd-cvs] [MidnightBSD/mports] 2621ac: magus: time out make targets that hang

Lucas Holt noreply at github.com
Fri Sep 11 14:20:48 EDT 2026


  Branch: refs/heads/tools/magus-make-timeout
  Home:   https://github.com/MidnightBSD/mports
  Commit: 2621aca8bfce18a9a57627e1fd27269c13c8eab1
      https://github.com/MidnightBSD/mports/commit/2621aca8bfce18a9a57627e1fd27269c13c8eab1
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M Tools/lib/Magus/Config.pm
    M Tools/lib/Magus/PortTest.pm
    M Tools/magus/config.yaml.example

  Log Message:
  -----------
  magus: time out make targets that hang

Magus::PortTest::_run_make used a bare blocking system(), so any port whose
make target never returns took a worker out of service indefinitely.  On run
646 lang/php84's deadlocked test suite held worker 1 on m4164 for seven days;
nothing in the slave noticed or intervened.

Run make in its own session instead, with a SIGALRM watchdog in the parent.
On expiry the whole process group gets TERM then KILL, so the children a hung
build has spawned go away with it, the log is annotated, and the phase is
reported as MakeTimeout rather than a generic non-zero exit.

The limit is MakeTimeout seconds, default 86400 to leave room for llvm- and
rust-sized builds, with per-target overrides in MakeTimeouts (test: 7200).
Zero disables the watchdog.

magus.pl installs a SIGCHLD handler that reaps indiscriminately and the worker
inherits it, so _run_make has to hold it off while it waits or it loses make's
exit status.  Switching from system() to exec() also drops the shell that used
to sit between magus and make.

AI-Assisted-by: Claude Opus 5 <noreply at anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply at anthropic.com>
Claude-Session: https://claude.ai/code/session_017JRCQA17KgZSRk2vV96wbT
Signed-off-by: Lucas Holt <luke at foolishgames.com>



To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/mports/settings/notifications


More information about the Midnightbsd-cvs mailing list