* bug#49263: Guix weather backtrace @ 2021-06-28 20:15 Jack Hill 2021-06-28 22:12 ` Maxime Devos 0 siblings, 1 reply; 5+ messages in thread From: Jack Hill @ 2021-06-28 20:15 UTC (permalink / raw) To: 49263 [-- Attachment #1: Type: text/plain, Size: 1151 bytes --] I get the following output when running `guix weather icecat` on aarch64-linux with Guix: $ guix describe Generation 1 Jun 28 2021 01:11:59 (current) guix 364b561 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 364b56124b88398c199aacbfd4fdfc9a1583e634 $ guix weather icecat computing 0 package derivations for aarch64-linux... looking for 0 store items on https://ci.guix.gnu.org... https://ci.guix.gnu.org Backtrace: 7 (primitive-load "/home/jackhill/.config/guix/current/bi…") In guix/ui.scm: 2147:12 6 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 5 (with-exception-handler _ _ #:unwind? _ # _) In guix/scripts/weather.scm: 577:9 4 (_) In guix/build/utils.scm: 569:23 3 (every* #<procedure d88f240 at guix/scripts/weather.sc…> …) In guix/scripts/weather.scm: 579:21 2 (_ "https://ci.guix.gnu.org") 212:22 1 (_ _ () 0) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `numerical-overflow' with args `("/" "Numerical overflow" #f #f)'. Best, Jack ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49263: Guix weather backtrace 2021-06-28 20:15 bug#49263: Guix weather backtrace Jack Hill @ 2021-06-28 22:12 ` Maxime Devos 2021-06-29 3:29 ` Jack Hill 2021-06-29 18:22 ` Mathieu Othacehe 0 siblings, 2 replies; 5+ messages in thread From: Maxime Devos @ 2021-06-28 22:12 UTC (permalink / raw) To: Jack Hill, 49263 [-- Attachment #1.1: Type: text/plain, Size: 1180 bytes --] Jack Hill schreef op ma 28-06-2021 om 16:15 [-0400]: > computing 0 package derivations for aarch64-linux... > [...] > Throw to key `numerical-overflow' with args `("/" "Numerical overflow" #f #f)'. A division by zero problem? Also, this seems architecture-dependent: $ guix weather icecat --system=x86_64-linux icecat 2 pakketdistillaties aan het berekenen voor x86_64-linux... op zoek naar 2 depotobjecten op https://ci.guix.gnu.org... https://ci.guix.gnu.org 100.0% substituten beschikbaar (2 van de 2) ten minste 355,2 MiB aan narbestanden (gecomprimeerd) 377,9 MiB op schijf (ongecomprimeerd) 0,379 seconden per verzoek (0,8 seconden in totaal) 2,6 verzoeken per seconde $ guix weather icecat --system=aarch64-linux icecat 0 pakketdistillaties aan het berekenen voor aarch64-linux... op zoek naar 0 depotobjecten op https://ci.guix.gnu.org... https://ci.guix.gnu.org Backtrace: [...] Throw to key `numerical-overflow' with args `("/" "Numerical overflow" #f #f)'. Seems like the definition of icecat or some dependency of icecat does not support aarch64. Anyway, here is a patch. Could you confirm it works? Greetings, Maxime. [-- Attachment #1.2: 0001-weather-Handle-zero-requested-store-items-gracefully.patch --] [-- Type: text/x-patch, Size: 2776 bytes --] From 1d87e33360c9897a77b7e172f16e3cd1973c959d Mon Sep 17 00:00:00 2001 From: Maxime Devos <maximedevos@telenet.be> Date: Tue, 29 Jun 2021 00:06:34 +0200 Subject: [PATCH] weather: Handle zero requested store items gracefully. This can happen if the weather information of a package is requested for an unsupported system. For example, try "guix weather icecat --system=aarch64-linux". * guix/scripts/weather.scm (report-server-coverage): Do not divide by zero when zero store items are requested from a server. Fixes: <https://issues.guix.gnu.org/49263> Reported-By: Jack Hill <jackhill@jackhill.us> --- guix/scripts/weather.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/guix/scripts/weather.scm b/guix/scripts/weather.scm index 6d925d416c..06312d65a2 100644 --- a/guix/scripts/weather.scm +++ b/guix/scripts/weather.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com> +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; ;;; This file is part of GNU Guix. ;;; @@ -185,9 +186,12 @@ or #f if it could not be determined." #:key display-missing?) "Report the subset of ITEMS available as substitutes on SERVER. When DISPLAY-MISSING? is true, display the list of missing substitutes. -Return the coverage ratio, an exact number between 0 and 1." +Return the coverage ratio, an exact number between 0 and 1. +In case ITEMS is an empty list, return 1 instead." (define MiB (* (expt 2 20) 1.)) + ;; TRANSLATORS: it is quite possible zero store items are + ;; looked for. (format #t (G_ "looking for ~h store items on ~a...~%") (length items) server) @@ -208,9 +212,10 @@ Return the coverage ratio, an exact number between 0 and 1." narinfos)) (time (+ (time-second time) (/ (time-nanosecond time) 1e9)))) - (format #t (G_ " ~,1f% substitutes available (~h out of ~h)~%") - (* 100. (/ obtained requested 1.)) - obtained requested) + (when (> requested 0) + (format #t (G_ " ~,1f% substitutes available (~h out of ~h)~%") + (* 100. (/ obtained requested 1.)) + obtained requested)) (let ((total (/ (reduce + 0 sizes) MiB))) (match (length sizes) ((? zero?) @@ -299,7 +304,9 @@ are queued~%") ;; Return the coverage ratio. (let ((total (length items))) - (/ (- total (length missing)) total))))) + (if (> total 0) + (/ (- total (length missing)) total) + 1))))) \f ;;; -- 2.32.0 [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#49263: Guix weather backtrace 2021-06-28 22:12 ` Maxime Devos @ 2021-06-29 3:29 ` Jack Hill 2021-06-29 8:12 ` Maxime Devos 2021-06-29 18:22 ` Mathieu Othacehe 1 sibling, 1 reply; 5+ messages in thread From: Jack Hill @ 2021-06-29 3:29 UTC (permalink / raw) To: Maxime Devos; +Cc: 49263 [-- Attachment #1: Type: text/plain, Size: 1556 bytes --] On Tue, 29 Jun 2021, Maxime Devos wrote: > Jack Hill schreef op ma 28-06-2021 om 16:15 [-0400]: >> computing 0 package derivations for aarch64-linux... >> [...] >> Throw to key `numerical-overflow' with args `("/" "Numerical overflow" #f #f)'. > > A division by zero problem? > Also, this seems architecture-dependent: […] > Seems like the definition of icecat or some dependency of icecat does > not support aarch64. Anyway, here is a patch. Could you confirm it works? Thanks for taking a look. Yeah, I guess it's not a aarch64 problem per-say, but that it's easier to run into unsupported packages over here. Yes, with the path applied, I can find out what the weather is: $ ./pre-inst-env guix weather icecat computing 0 package derivations for aarch64-linux... looking for 0 store items on https://ci.guix.gnu.org... https://ci.guix.gnu.org unknown substitute sizes 0.0 MiB on disk (uncompressed) 14 queued builds x86_64-linux: 2 (14.3%) i686-linux: 10 (71.4%) aarch64-linux: 2 (14.3%) build rate: .00 builds per hour aarch64-linux: 0.00 builds per hour i686-linux: 0.00 builds per hour x86_64-linux: 0.00 builds per hour looking for 0 store items on https://bordeaux.guix.gnu.org... https://bordeaux.guix.gnu.org unknown substitute sizes 0.0 MiB on disk (uncompressed) (continuous integration information unavailable) Some of the output doesn't quite make sense anymore in the context where we don't expect to find anything, but this is still much improved. Thank you! Jack ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49263: Guix weather backtrace 2021-06-29 3:29 ` Jack Hill @ 2021-06-29 8:12 ` Maxime Devos 0 siblings, 0 replies; 5+ messages in thread From: Maxime Devos @ 2021-06-29 8:12 UTC (permalink / raw) To: Jack Hill; +Cc: 49263 [-- Attachment #1: Type: text/plain, Size: 797 bytes --] Jack Hill schreef op ma 28-06-2021 om 23:29 [-0400]: > On Tue, 29 Jun 2021, Maxime Devos wrote: > > Seems like the definition of icecat or some dependency of icecat does > > not support aarch64. Anyway, here is a patch. Could you confirm it works? > > Thanks for taking a look. Yeah, I guess it's not a aarch64 problem > per-say, but that it's easier to run into unsupported packages over here. > > Yes, with the path applied, I can find out what the weather is: > > [...] > > Some of the output doesn't quite make sense anymore in the context where > we don't expect to find anything, but this is still much improved. Just to be clear, I don't have commit access, so you'll have to wait for a committer to verify the patch works well and commit it. Greetings, Maxime. [-- Attachment #2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 260 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#49263: Guix weather backtrace 2021-06-28 22:12 ` Maxime Devos 2021-06-29 3:29 ` Jack Hill @ 2021-06-29 18:22 ` Mathieu Othacehe 1 sibling, 0 replies; 5+ messages in thread From: Mathieu Othacehe @ 2021-06-29 18:22 UTC (permalink / raw) To: Maxime Devos; +Cc: 49263-done Hello, > Seems like the definition of icecat or some dependency of icecat does > not support aarch64. Anyway, here is a patch. Could you confirm it works? Applied as 5ef96ecaaeeabd5500e406f0103ca52ec079fdb9. Thanks, Mathieu ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-29 18:23 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-06-28 20:15 bug#49263: Guix weather backtrace Jack Hill 2021-06-28 22:12 ` Maxime Devos 2021-06-29 3:29 ` Jack Hill 2021-06-29 8:12 ` Maxime Devos 2021-06-29 18:22 ` Mathieu Othacehe
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.