[Git][qa/jenkins.debian.net][master] reproducible Debian maintenance: kill rb_build.sh processes which have pid 1...

Holger Levsen (@holger) gitlab at salsa.debian.org
Wed Jan 3 11:13:58 GMT 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
4ceea153 by Holger Levsen at 2024-01-03T12:13:44+01:00
reproducible Debian maintenance: kill rb_build.sh processes which have pid 1 as parent (and not sshd)

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -1,7 +1,7 @@
 #!/bin/bash
 # vim: set noexpandtab:
 
-# Copyright 2014-2023 Holger Levsen <holger at layer-acht.org>
+# Copyright 2014-2024 Holger Levsen <holger at layer-acht.org>
 #         © 2015-2023 Mattia Rizzolo <mattia at debian.org>
 # released under the GPLv2
 
@@ -410,12 +410,19 @@ if [ -n "$PSCALL" ] ; then
 	echo
 fi
 
-# find builds which should not be there
+# find and kill builds which should not be there
 RESULTS=$(pgrep -f reproducible_build.sh --parent 1 || true)
 if [ -n "$RESULTS" ] ; then
 	DIRTY=true
-	echo "Warning: found reproducible_build.sh processes which have pid 1 as parent (and not sshd), thus something went wrong… please investigate."
-	echo -e "$RESULTS"
+	echo "found reproducible_build.sh processes which have pid 1 as parent (and not sshd), trying to kill them now."
+	for pid in $RESULTS ; do
+		echo "killing PID $pid and all children."
+		sudo kill $(ps -s $pid -o pid=)
+	done
+	RESULTS=$(pgrep -f reproducible_build.sh --parent 1 || true)
+	if [ -n "$RESULTS" ] ; then
+		echo "Warning: found reproducible_build.sh processes which have pid 1 as parent (and not sshd), thus something went wrong… please investigate."
+	fi
 fi
 
 # remove debian ci builds artifacts older than a day



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/4ceea1539208fe9a4cf1a5deb9477207c0cc5f50

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/4ceea1539208fe9a4cf1a5deb9477207c0cc5f50
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20240103/f968fb70/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list