From patchwork Thu May 31 07:05:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 923210 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mind.be Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=mind-be.20150623.gappssmtp.com header.i=@mind-be.20150623.gappssmtp.com header.b="QUDrBElX"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40xJQ43qnNz9s01 for ; Thu, 31 May 2018 17:05:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id AAFA888720; Thu, 31 May 2018 07:05:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fvYRpVExLn45; Thu, 31 May 2018 07:05:27 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 8F3E3886E1; Thu, 31 May 2018 07:05:27 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 74F711C0156 for ; Thu, 31 May 2018 07:05:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7275B864EE for ; Thu, 31 May 2018 07:05:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVqdCuuBDVcH for ; Thu, 31 May 2018 07:05:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 044B7865B1 for ; Thu, 31 May 2018 07:05:24 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id r15-v6so24312582wmc.1 for ; Thu, 31 May 2018 00:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind-be.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=TqapPnwRO+B+2Kh8zB71Qmukh7vzTxAHk6/RVWZ8HlE=; b=QUDrBElX3lDIPOEZjoXGvyjFwVEIJW5A+WikKnlt0GalSx7ywVyzksdwggckULgRLl H1xeuRY7BasTt7jBABsj5rhK5WYtL5MKa3HYwaL/bimxU+gpRWJaMD2XMWG5yui3jPcg 3dY0Nr5quU7iJB6pSUy2x88lw8e/Z9HXTfq+tHXtX1RBqQgTq4/d8pC83GZqINvu83Pa NxK/bNCABqzTqhHMljgMemTczrjU7bAFsHWYeCsPyG6MwmL1SJ8T00RhpFhvY2ryIw7h cFKhSIBRPttpmN4VJUpy7dHOGv5KnyhhuVLuCgX3zImA1Ixa4gEtuvHEL0gvpS4wkAHq RO3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TqapPnwRO+B+2Kh8zB71Qmukh7vzTxAHk6/RVWZ8HlE=; b=UXI3OO/rr8mmiraH1hDVI/unaN36V8V47kzllItT7tFNZwe6hFRmIZcpgT6RpXKmCn JDxwlFWQYoK70UmpsW/gkQ/UyFRYVAgFQouZ6tjLWeGedIL4PVcebCH+iNPiuHtbdvqR oRBg7cAfCBRy5J3aDa6fuQvn9S6Ej+omNlMApZGe48FNqrxFakvVphwTH21VO5HH8fEk ThdimO+k/mkOatJXx2c4G9sRZSgSVKxeoMSSnL1Jp2rVGCVB5CtcC5rwfJ4vrsVmruHn zgOBt4u/R77cgkU50cdwCKz0OBMjPaU8JNihtF9NhkaAt7YIwQQXQIN2IGrvM2zC4pkc SVdw== X-Gm-Message-State: ALKqPwcIhKI/X71de7oYrtBrUqrC3natmkMn/73omWJRGWz8r8wIuvsa B/H3xn7lu4KAxOGuHx+EiD/auo5CFrs= X-Google-Smtp-Source: ADUXVKKCUnF34fX8qWAS0mYvuS0O6bENU2J36dQQnfFwbLcEh2ddFTYqfsYGyY+Q824fGW7zp4NPYw== X-Received: by 2002:a50:b654:: with SMTP id c20-v6mr6691611ede.190.1527750322749; Thu, 31 May 2018 00:05:22 -0700 (PDT) Received: from vandecaa-laptop.local.ess-mail.com (d51A4E7A0.access.telenet.be. [81.164.231.160]) by smtp.gmail.com with ESMTPSA id v37-v6sm6312959edm.0.2018.05.31.00.05.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 May 2018 00:05:22 -0700 (PDT) From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Thu, 31 May 2018 09:05:19 +0200 Message-Id: <20180531070520.24242-1-arnout@mind.be> X-Mailer: git-send-email 2.17.1 Subject: [Buildroot] [PATCH 1/2] download/cvs: add a 10 minute timeout X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Apparently, CVS servers can be deadlocked and in that case clients will retry connecting to them indefinitely. Cfr. http://autobuild.buildroot.net/results/23d/23d1034b33d0354de15de2ec4a8ccd0603e8db78/build-end.log Apparently, the sf.net CVS server got in such a deadlock on 2018-05-18, and almost 2 weeks later it is still not fixed. Instead of just hanging, we should fall back on BR2_SECONDARY_SITE. To achieve this, it's sufficient to add a timeout to the CVS command. The timeout value is of course arbitrary. However, we can assume that nobody will be putting large projects under CVS any more. So if the download takes more than 5 minutes, it's probably broken. Let's put the timeout at 10 minutes then. Fixes: http://autobuild.buildroot.net/results/db3/db33d4fa507fb3b4132423cd0a7e25a1fe6e4105 http://autobuild.buildroot.net/results/b6d/b6d927dcc73ac8d754422577dacefff4ff918a5c http://autobuild.buildroot.net/results/23d/23d1034b33d0354de15de2ec4a8ccd0603e8db78 http://autobuild.buildroot.net/results/127/1272a3aa3077e434c9805ec3034f35e6fcc330d4 Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- support/download/cvs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/support/download/cvs b/support/download/cvs index 3f77b849e4..9d0dc3cb3a 100755 --- a/support/download/cvs +++ b/support/download/cvs @@ -33,9 +33,13 @@ done shift $((OPTIND-1)) # Get rid of our options # Caller needs to single-quote its arguments to prevent them from -# being expanded a second time (in case there are spaces in them) +# being expanded a second time (in case there are spaces in them). +# If the CVS server is deadlocked, the client will never return (cfr. +# http://autobuild.buildroot.net/results/23d/23d1034b33d0354de15de2ec4a8ccd0603e8db78/build-end.log +# ). Since nobody sane will put large code bases in CVS, a timeout of +# 10 minutes should do the trick. _cvs() { - eval ${CVS} "${@}" + eval timeout 10m ${CVS} "${@}" } if [[ ${rev} =~ ^[0-9] ]]; then