From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6739560601010307072 X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr19122752edv.233.1569846127428; Mon, 30 Sep 2019 05:22:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:907:4420:: with SMTP id om24ls2810442ejb.2.gmail; Mon, 30 Sep 2019 05:22:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqymGaQcnMx+mS90yMiD/EqUzx7ZbXf/OqtGMsY6DWsoBGcWoMboQP1EzEXjL33OC8zEJfm7 X-Received: by 2002:a17:906:e251:: with SMTP id gq17mr19016752ejb.85.1569846126897; Mon, 30 Sep 2019 05:22:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569846126; cv=none; d=google.com; s=arc-20160816; b=bLG7JazzBcex01ho2kqILc4TsvTgT6qUlvxxjDzEv+QGmW+TuAemv6tq5jpYkDrDKs n2NIqIzuirmHlPLHoekf+6+8TX6ywoH8OI8ubh7AUnRNl1J7w/g2y+Qyfwjuxu9xABOp eCvhq7QKfZTyqSTnwnMgTeU/W0d53T19bdPtwz8vo/OCzCB2wYS+o/R4M1nyhr6A7QIx yqfjix6OdoHARCY0X7Df8tSwtwTlVUADGx1uhJAxnxMZHNgN3wc1QzAdhLjtGtT0xhVk x1yDmWEhs3CEKcLTSdpxM5awsNAFo9RnljXO/RsGQAMxt3/2cogYiV1f9wGHPcIsGYXk QNRQ== 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:to:subject; bh=kmvx7RWCWYRmLRkg1sEwhre/LxldpJ4D+4q57Nl6kcQ=; b=Xr/ngZBOd+4kg9caewpX+Ojwgonh3DxV2xsC4rReVEjA/hzd7H0CuUw8A7mUH4/Wj2 B33XivWVWkgcxFjIepHWkAFzzQpZRAw/KmL9fbZ7o+5jb1/st26Y5AYdf4YomfcyZLiL cTnDjBWxyLKgCMGawR3h2sEpa54RL2x3n6zJ7BtcFBI/i5msONZaAAD83stU20ul4oDH wrF7icjN+uDaR15WMNR+wj3FlAL0pnP1mJgQAnD+D521MNNeFzzGVX+aLU9D01EsWCYS HVHW4ipwHYtDk9bc+cJ2vFgR71eZ/QC/5hBf/WTblD8x8EP7tjTVxCA2lh1JB+vK0su2 U4Lw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id q8si614151edn.5.2019.09.30.05.22.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Sep 2019 05:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id x8UCM6cu012364 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 30 Sep 2019 14:22:06 +0200 Received: from [139.25.68.37] (md1q0hnc.ad001.siemens.net [139.25.68.37] (may be forged)) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8UCM6Un024021 for ; Mon, 30 Sep 2019 14:22:06 +0200 Subject: Re: [PATCH v5 19/27] dpkg-base: Wait for umount to succeed To: isar-users@googlegroups.com References: <94b59dd0e5a14ece5f2d6b7131984ba944350b08.1569176231.git.jan.kiszka@siemens.com> <20190930110730.q4zxjwubhl53vtgi@yssyq.m.ilbers.de> From: Jan Kiszka Message-ID: Date: Mon, 30 Sep 2019 14:22:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190930110730.q4zxjwubhl53vtgi@yssyq.m.ilbers.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: DaH9hhjEnp1t On 30.09.19 13:07, Baurzhan Ismagulov wrote: > On Sun, Sep 22, 2019 at 08:17:03PM +0200, Jan Kiszka wrote: >> Rather than ignoring a still busy BUILDROOT mount point, wait for it to >> become free. If that should ever get stuck, the user can still forcibly >> terminate. But normally, this is just about giving some detached >> processes time to finish. > ... >> dpkg_undo_mounts() { >> - sudo umount ${BUILDROOT} 2>/dev/null || true >> - sudo rmdir ${BUILDROOT} 2>/dev/null || true >> + while ! sudo umount ${BUILDROOT} 2>/dev/null; do >> + sleep 0.1 >> + done >> + sudo rmdir ${BUILDROOT} > > I agree that we shouldn't ignore failing umounts. However, hanging forever > leads to bad user experience. I suggest to introduce a timeout or a number of > attempts and fail. Let's not over-engineer: CI runs have top-level timeouts, tuned to the requirements of the particular runtime environment. Local builds have ctrl-c. And defining such a micro-timeout would not be trivial as well. So let's merge and look that this again when this really shows up, based on that concrete case. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux