From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6631438923266523136 X-Received: by 2002:a1c:2d07:: with SMTP id t7mr274661wmt.17.1544020027057; Wed, 05 Dec 2018 06:27:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:5846:: with SMTP id m67ls3861421wmb.8.canary-gmail; Wed, 05 Dec 2018 06:27:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/UjL3we8S6AUy+9370QbWHd2dTCSt+6IT2MazOVfC1S/y/PLq9icyPC+argF0mMjF14rX+E X-Received: by 2002:a1c:9089:: with SMTP id s131mr2165371wmd.7.1544020026637; Wed, 05 Dec 2018 06:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544020026; cv=none; d=google.com; s=arc-20160816; b=H3/KhmNMpJyHjj3TMY2zmcSrt4eNEwIzojf6JxkeQDjZU8wqI0AEKeQdzEsDKAlUqX lYLd56oWt6eX/wCUkYGuXpB1WjNXSaB+rbiiHE2SL2LBPcn5/YlUUBwiIvqkOU8RqzrK z3+pZA1yMZCHdEq572OUHaFdCidh4gF/KjCv2+hDemimxPApgEfuhRw2akslvtn+up4/ QM6SQYrCFj+bTbi8wUOKxlygGPbOAIlbEkSm6wOt4FBwlvhVIfBaw/DbYmo5XHyOKZ00 96WqIgBDADguuvJa07bWIAOC8Eae8tI326Oo65xbqT7vPoi3lmPvO0fCZ3wIEa3plEWG 4N6w== 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:organization:from:references:cc:to :subject; bh=gqwnMMQ3fV8bRM4Fk99sF4C0ar9ADws0+1GBVL3GMGg=; b=06erKaPI5ri5kk4Q7POT/0fsCv9NClFfn020pzS7owxAZ5QetCPYjWCigUkPavwD/G IodOcUMgqZtErnqkE+M8f4hEmt2wuZ6v0celtAO2yuTRYBBWyzGE5NjDfOVb3BHn9btW dktKOcxnnwsmYJjwH4aiEkE/hAGXI8IA2vpHKESp1oOt8j0fDdDjRBg88Piixw7oQFsr 2PO6LHeQv33AzJAGIS35FkJhAz18B8y8Qo5P4togPCzO1X7DOk9iyMs6Dtl58uYiRTtq BvOmPnwg08yCgD8jiD6j3/CGEhJAvroDVqppI8NTfXstUXDoGhyVE2iyQx7+S7HQwrCH UALA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id j45si536481wre.0.2018.12.05.06.27.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 06:27:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of mosipov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=mosipov@ilbers.de Received: from [192.168.50.180] (nat-ppp-217.71.235.199-satnet-spb.ru [217.71.235.199] (may be forged)) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id wB5ER30U028786 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 5 Dec 2018 15:27:05 +0100 Subject: Re: [PATCH 0/3] umount fixes and cleanups To: Jan Kiszka , isar-users Cc: Cedric Hombourger References: <02edaac4-fc2d-44ea-6471-52ad8fc3d421@siemens.com> From: "Maxim Yu. Osipov" Organization: ilbers GmbH Message-ID: <7267182f-b841-0763-9870-833c0ccdfee8@ilbers.de> Date: Wed, 5 Dec 2018 17:26:58 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <02edaac4-fc2d-44ea-6471-52ad8fc3d421@siemens.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TUID: itarrDO9Uso7 On 12/5/18 3:14 PM, Jan Kiszka wrote: > On 05.12.18 12:12, Maxim Yu. Osipov wrote: >> On 12/5/18 12:29 PM, Jan Kiszka wrote: >>> Patches related to resolving the pending CI issues as well as >>> simplifying the umounts used during cleanup. >> >> Tried to run in patch queue: >> >> 027b7cf Remove redundant recursive umounts >> c1bdc33 isar-events: Improve umount handler >> b354273 ci: Wait for bitbake worker to finish before deleting artifacts >> 9cf29e6 isar-bootstrap: Fix and cleanup bind mounting >> b354026 isar-image: umount base-apt when doing offline build >> e965c0d gitlab-ci: Switch to ci_build.sh >> ... >> >> After execution of problematic test case (I rebooted PC and executed >> steps in clean tree): >> >> my stretch Debian system was entered into unusable state >> as many important mounts were disappeared (see log of mount points >> before and after execution  of last command attached). > > OK, so I took the time and extracted the root cause. We may see a Debian > 4.9 kernel bug here: > > # mkdir my-mnt > # mount --rbind /sys my-mnt > # mount --make-rslave my-mnt > # umount {-R,-l,-R -l} my-mnt > # rmdir my-mnt > rmdir: failed to remove 'my-mnt': Device or resource busy > > This works fine on my Leap 15.0 kernel (4.12) as well as the 4.4 kernel > (Ubuntu) used on our CI server. This also works fine on my Debian 4.9 kernel (I've ran this sequence for every combination of {-R, -l , -R -l}): > root@tiberius:~# uname -a > Linux tiberius 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux > root@tiberius:~# mkdir my-mnt > root@tiberius:~# mount --rbind /sys my-mnt > root@tiberius:~# mount --make-rslave my-mnt > root@tiberius:~# umount -R my-mnt/ > root@tiberius:~# rmdir my-mnt/ > root@tiberius:~# mkdir my-mnt > root@tiberius:~# mount --rbind /sys my-mnt > root@tiberius:~# mount --make-rslave my-mnt > root@tiberius:~# umount -l my-mnt > root@tiberius:~# rmdir my-mnt/ > root@tiberius:~# mkdir my-mnt > root@tiberius:~# mount --rbind /sys my-mnt > root@tiberius:~# mount --make-rslave my-mnt > root@tiberius:~# umount -R -l my-mnt > root@tiberius:~# rmdir my-mnt/ > root@tiberius:~# Thanks, Maxim. > *This* is information we can base commits on. Also, we can file a bug > against Debian with this. Could you do that (keep my in CC)? > Thanks, > Jan > -- Maxim Osipov ilbers GmbH Maria-Merian-Str. 8 85521 Ottobrunn Germany +49 (151) 6517 6917 mosipov@ilbers.de http://ilbers.de/ Commercial register Munich, HRB 214197 General Manager: Baurzhan Ismagulov