From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 86946E00FB8; Tue, 23 Aug 2016 04:45:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Greylist: delayed 62 seconds by postgrey-1.32 at yocto-www; Tue, 23 Aug 2016 04:45:56 PDT Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 2B180E00ECC for ; Tue, 23 Aug 2016 04:45:56 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 23 Aug 2016 04:44:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,565,1464678000"; d="scan'208";a="159770246" Received: from linux.intel.com ([10.54.29.200]) by fmsmga004.fm.intel.com with ESMTP; 23 Aug 2016 04:44:53 -0700 Received: from ed.fi.intel.com (ed.fi.intel.com [10.237.72.179]) by linux.intel.com (Postfix) with ESMTP id 3158A6A4006 for ; Tue, 23 Aug 2016 04:44:35 -0700 (PDT) From: Ed Bartosh To: toaster@yoctoproject.org Date: Tue, 23 Aug 2016 14:44:40 +0300 Message-Id: X-Mailer: git-send-email 2.6.6 Subject: [PATCH 0/4] improved process management X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Aug 2016 11:45:57 -0000 Hi, This is a set of improvements for process management in toaster script. It includes a bit of cleanup (first 2 patches) and quite serious changes in the way toaster script starts and stops runbuild and runserver processes: - usage of process groups (PGID) instead of PID - usage of pid namespaces http://man7.org/linux/man-pages/man7/pid_namespaces.7.html Both changes should hopefully make toaster to stop running processes more reliably. One side effect and a partial reason of this work: it should fix #7973: stopping toaster kills ALL django apps running on the machine. Testing instructions: - run toaster - run build in Toaster UI - wait until you see a lot of build-related processes in 'ps x' output - stop toaster. expected outcome: no toaster or build-related processes in 'ps x' output The following changes since commit 34ccad16d40ec0685f405b8d7116250fb58e323d: buildinfohelper: discover kernel artifacts correctly (2016-08-23 14:29:32 +0300) are available in the git repository at: git://git.yoctoproject.org/poky-contrib ed/toaster/kill-toaster-pid-namespace-7973 http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/toaster/kill-toaster-pid-namespace-7973 Ed Bartosh (4): toaster: don't kill toaster on start toaster: remove handling of .toasterui.pid toaster: use process group id to kill processes toaster: run builds in pid namespace bitbake/bin/toaster | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) -- Regards, Ed