From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6629320495720300544 X-Received: by 2002:adf:dd08:: with SMTP id a8mr1845369wrm.13.1543841967093; Mon, 03 Dec 2018 04:59:27 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:b727:: with SMTP id l39ls4039790wre.3.gmail; Mon, 03 Dec 2018 04:59:26 -0800 (PST) X-Google-Smtp-Source: AFSGD/W/JgH261h/fbahqA1grEYSiPK/7gKMA5SYfiV5vgNIAKbl8CMQ6JB8creZPn2fQuZ3AQJ6 X-Received: by 2002:adf:f248:: with SMTP id b8mr1890716wrp.9.1543841966551; Mon, 03 Dec 2018 04:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543841966; cv=none; d=google.com; s=arc-20160816; b=LkkjOEnrAr+/JHRBYGyNRcC7MedCV1LJ7cQY+WjGRwLSDy06ykHsEE1C5s6wBWvzuX XoFGux5HUaZFF4WAn2gBfygiTrNRVscB8ucaGrQxjolZfGHIbDf9YObrWPkBbvT6q1Us iDaFpYDzzkDQ7cmFxwGs92hDagLwsXWLBx/R4VACOh3yaMn+8uRAGYUALqVmnt7rsOMF 6kQRlJ0ffkP8+h+fUmD6/8y+j65fXoy31N6naQx/Bllo6wSovpQwdlC35anWu7yMcwQr xMhlN9tZB8xEjY+KXYzrl9ZiThzGqOZbIq4+c1AyOCJVOG6csT6Iuwby8CAQd2AwWDDG cnYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=drblPJM7XQmoJIKq/EdAokf381EPwYGpTozVonnEAns=; b=Rpns9n8zhRiJqhUw918PwTcf0tCQOP0O5/yq0K5/T0MGdQnHR3kQBu+2CjDTsmUSPl lAizZQX0HXmuH7lp34zUXvLgl2aSACXlxBjGv2mmhHV67YW5Vv1g7jjU5wRDz/8PKEJU reIqI5PFx5eAsHHJSHZipE012GclU+NAFzN1aCF2mYllxK8bYopbSOtrDUsVjCddyi7C GiWTqjeSMq/ImZRdTyZbxHmkw006DibEtNS6kHp0NQB+SSmab3BRDVtR/XBqfCy1c2cv UgJI8HFi7b7vR3byXm0UAWLMPJ3rohjHMm19PO9/Pf64F8Ob7EnyqvAbG6Pxsi67y33v Z9dA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id k140si267378wmd.2.2018.12.03.04.59.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 04:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id wB3CxQie030815 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Dec 2018 13:59:26 +0100 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id wB3CxPTl023480; Mon, 3 Dec 2018 13:59:25 +0100 Subject: Re: [PATCH] isar-bootstrap: Fix and cleanup bind mounting To: "Maxim Yu. Osipov" Cc: Henning Schild , isar-users , Cedric Hombourger References: <6f5714bc-d5f5-c08f-c408-b32bab9169fc@siemens.com> <20181129193929.61a35056@md1za8fc.ad001.siemens.net> From: Jan Kiszka Message-ID: <2229f975-0752-ebe3-c165-979e1d5864b2@siemens.com> Date: Mon, 3 Dec 2018 13:59:24 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: gGeUEKBYZl12 On 30.11.18 10:20, Maxim Yu. Osipov wrote: > Hi Jan, > > I've just tried this patch (on the 'next' with reverted patch d40a9ac0) and ran > "fast" CI > > isar$mount | wc -l > 34 > > isar$./scripts/ci_build.sh -q -f > > CI script hung on CI stage when dpkg-base is modified > causing rebuilding recipes based on dpkg-base. > > The mount reports less (!) mount points than before launching the script. > > mount | wc -l > 31 Any news on what's different on your side? Where exactly does your build hang? Was your CI environment in a clean state when running this test? Before the comment lots of things leaked. We still do not see problems with this bug fix, neither locally nor in CI (which is ci_build-based now, too). And it's actually a precondition to make "isar-image: umount base-apt when doing offline build" work as expected. Thanks, Jan > > Maxim. > > On 11/29/18 9:39 PM, Henning Schild wrote: >> Maybe that is where the leftover mounts came from, and the reverts are >> not required. >> >> Henning >> >> Am Thu, 29 Nov 2018 17:29:17 +0100 >> schrieb "[ext] Jan Kiszka" : >> >>> First, wrong variables were used (there is no BUILDCHROOT_DIR for >>> isar_bootstrap). And then we simply left the mount points active after >>> completing the bootstrap. The led to setup_root_file_system copying >>> all the mount point content over into the buildchroot or rootfs - >>> including base-apt when it was used. >>> >>> Signed-off-by: Jan Kiszka >>> --- >>> >>> This is a precondition for "isar-image: umount base-apt when doing >>> offline build" to work properly. IOW, that patch reveal these bugs. >>> >>> Possibly, this also explains the increasing mount count that was >>> visible in CI. >>> >>>   meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 21 >>> +++++++++++---------- 1 file changed, 11 insertions(+), 10 >>> deletions(-) >>> >>> diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc >>> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index >>> 8ea3b08..da077d0 100644 --- >>> a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ >>> b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -185,12 >>> +185,8 @@ isar_bootstrap() { sudo -E flock "${ISAR_BOOTSTRAP_LOCK}" >>> -c "\ set -e >>>           if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then >>> -            if [ -e "${ROOTFSDIR}" ]; then >>> -               umount -R -l "${ROOTFSDIR}/dev" || true >>> -               umount -l "${ROOTFSDIR}/proc" || true >>> -               umount -R -l "${ROOTFSDIR}/sys" || true >>> -               rm -rf "${ROOTFSDIR}" >>> -            fi >>> +            rm -rf "${ROOTFSDIR}" >>> + >>>               if [ ${IS_HOST} ]; then >>>                   ${DEBOOTSTRAP} $debootstrap_args \ >>>                                  ${@get_distro_components_argument(d, >>> True)} \ @@ -247,17 +243,22 @@ isar_bootstrap() { >>>               "${ROOTFSDIR}/chroot-setup.sh" "setup" "${ROOTFSDIR}" >>>               # update APT >>> -            mount --rbind /dev ${BUILDCHROOT_DIR}/dev >>> -            mount --make-rslave ${BUILDCHROOT_DIR}/dev >>> +            mount --rbind /dev ${ROOTFSDIR}/dev >>> +            mount --make-rslave ${ROOTFSDIR}/dev >>>               mount -t proc none ${ROOTFSDIR}/proc >>> -            mount --rbind /sys ${BUILDCHROOT_DIR}/sys >>> -            mount --make-rslave ${BUILDCHROOT_DIR}/sys >>> +            mount --rbind /sys ${ROOTFSDIR}/sys >>> +            mount --make-rslave ${ROOTFSDIR}/sys >>>               export DEBIAN_FRONTEND=noninteractive >>>               chroot "${ROOTFSDIR}" /usr/bin/apt-get update -y >>>               chroot "${ROOTFSDIR}" /usr/bin/apt-get dist-upgrade -y \ >>>                                     -o Debug::pkgProblemResolver=yes >>> +            umount -R -l "${ROOTFSDIR}/dev" >>> +            umount -l "${ROOTFSDIR}/proc" >>> +            umount -R -l "${ROOTFSDIR}/sys" >>> +            umount -l "${ROOTFSDIR}/base-apt" || true >>> + >>>               # Finalize debootstrap by setting the link in deploy >>>               ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}" >>>           fi" >> > > -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux