From d05adca49a05c3128e102a5fc0ff7dfd313b7863 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Tue, 29 Aug 2017 14:18:55 +0100 Subject: Fix killing the build when log file is not created within 30s --- NEWS | 1 + lib/Iurt/Process.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 50a487f..63d325f 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ - ulri: improve handling of build failures +- iurt: fix stale command detection when log is not created quickly enough 0.6.29 - iurt: support chroot tarballs with non gz compression diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index 9dfd1ad..52b0b79 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -106,7 +106,7 @@ sub fork_to_monitor { kill 14, "-$parent_pid"; exit(); } - if ($stat[9] + $opt{stalled_timeout} < time()) { + if ($stat[9] && $stat[9] + $opt{stalled_timeout} < time()) { # If nothing was written to the logfile for more than stalled_timeout, check if the system seems busy if ((getload())[1] < 0.5) { plog('ERROR', "Killing current command because it seems blocked"); -- cgit v1.2.1