From owner-freebsd-bugs@freebsd.org Sat Apr 25 03:36:49 2020 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1ACA82CA332 for ; Sat, 25 Apr 2020 03:36:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 498GtS71zgz4T9K for ; Sat, 25 Apr 2020 03:36:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id EEB602CA331; Sat, 25 Apr 2020 03:36:48 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE7E92CA330 for ; Sat, 25 Apr 2020 03:36:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 498GtS66JZz4T9J for ; Sat, 25 Apr 2020 03:36:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CD488FB7 for ; Sat, 25 Apr 2020 03:36:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 03P3amo2040716 for ; Sat, 25 Apr 2020 03:36:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 03P3am5S040715 for bugs@FreeBSD.org; Sat, 25 Apr 2020 03:36:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 169748] [patch] bsdinstall(8): when distfile fetch is complete on some distfiles, but not entire set, progress can go over 100%; installer gets confused with distfiles and halts Date: Sat, 25 Apr 2020 03:36:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 9.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: tom@hur.st X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2020 03:36:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D169748 Thomas Hurst changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tom@hur.st --- Comment #4 from Thomas Hurst --- + if (fetchStatURL(urls[i], &ustat, "") =3D=3D -1) { + snprintf(errormsg, sizeof(errormsg), + "Error while determining file size for %s: %s\n= ", + urls[i], fetchLastErrString); + items[i*2 + 1] =3D "Failed"; + dialog_msgbox("Fetch Error", errormsg, 0, 0, + TRUE); + return (-1); + } I'd suggest it best here just to quietly reset total_bytes =3D 0 and abort = trying to get the sizes up-front. HEAD requests failing isn't fatal, the code can fall back to just calculating percentage from the number of files. I've seen this sort of thing more than once: https://www.reddit.com/r/freebsd/comments/g7gdc9/is_that_normal_overall_pro= gress_208/ i.e. *only* the first fetchStatURL() failed. Resetting total_bytes to 0 wo= uld have left them with a functional but coarse-grained total progress bar, whi= le this patch would have errored out the entire operation. --=20 You are receiving this mail because: You are the assignee for the bug.=