GNU bug report logs

#28240 bad backtrace on “guix archive -x”

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to bug-guix@gnu.org:
bug#28240; Package guix. (Sat, 26 Aug 2017 12:24:02 GMT) (full text, mbox, link).


Acknowledgement sent to Ricardo Wurmus <rekado@elephly.net>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org. (Sat, 26 Aug 2017 12:24:02 GMT) (full text, mbox, link).


Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

From: Ricardo Wurmus <rekado@elephly.net>
To: "'bug-guix\@gnu.org'" <bug-guix@gnu.org>
Subject: bad backtrace on “guix archive -x”
Date: Sat, 26 Aug 2017 14:23:05 +0200
Here’s what I did:

--8<---------------cut here---------------start------------->8---
wget -q -O - https://mirror.hydra.gnu.org/guix/nar/gzip/ykpfif2wzabhnn0a88sw3f96paa33k2z-r-minimal-3.4.0 | guix archive -x /tmp/hydra
Backtrace:
           6 (primitive-load "/gnu/store/gkv8zl774h2qpa89mrf6d74fry3…")
In guix/ui.scm:
  1352:12  5 (run-guix-command _ . _)
In ice-9/boot-9.scm:
    837:9  4 (catch _ _ #<procedure 7f731bea09a8 at guix/ui.scm:450…> …)
    837:9  3 (catch _ _ #<procedure 7f731bea09c0 at guix/ui.scm:538…> …)
In guix/scripts/archive.scm:
   345:28  2 (_)
In guix/serialization.scm:
   316:21  1 (restore-file #<input: file 0> "/tmp/hydra")
In unknown file:
           0 (utf8->string #vu8(0 3 236 189 11 116 92 213 149 32 # …))

ERROR: In procedure utf8->string:
ERROR: Throw to key `decoding-error' with args `("scm_from_utf8_stringn" "input locale conversion error" 0 #vu8(2 3 236 189 11 116 92 213 149 32 122 37 99 35 93 140 100 136 1 135 132 230 32 4 37 9 85 233 227 15 178 141 140 74 82 217 85 65 150 148 146 100 96 97 35 223 170 186 85 186 168 126 169 91 165 143 177 19 51 134 4 45 183 50 76 122 186 87 207 116 214 123 204 91 157 76 122 77 86 154 158 204 155 16 186 131 237 5 193 73 175 204 132 204 234 78 210 157 188 78 79 186 211 145 67 62 116 39 33 36 233 224 183 247 62 159 251 169 42 27 99 32 153 181 82 96 221 123 207 103 159 115 246 217 103 239 125 246 217 231 156 171 53 254 203 91 75 65 163 148 156 179 22 204 96 31 124 55 136 240 14 241 188 66 60 203 203 69 19 159 205 226 59 101 149 204 100 185 80 90 22 223 235 197 211 204 151 41 172 30 156 188 145 35 56 235 196 119 194 202 123 227 11 41 138 127 187 234 33 227 227 254 248 215 89 143 43 197 119 201 204 84 178 70 73 211 101 249 75 102 178 82 54 18 89 83 243 252 154 196 51 89 200 151 161 142 246 31 183 243 239 91 111 233 201 228 43 61 54 52 197 236 153 191 179 183 127 231 252 246 5 99 199 64 118 222 40 38 142 36 151 147 169 35 15 221 153 219 158 120 40 177 45 49 16 76 24 246 92 112 91 104 91 168 175 191 7 48 216 131 223 250 173 108 106 206 204 102 2
…
[pages upon pages of numbers]
…
--8<---------------cut here---------------end--------------->8---

The problem here is that I didn’t gunzip the file, but I guess it could
have told me that instead of giving me all these numbers.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net





Information forwarded to bug-guix@gnu.org:
bug#28240; Package guix. (Thu, 25 Feb 2021 00:19:01 GMT) (full text, mbox, link).


Message #8 received at 28240@debbugs.gnu.org (full text, mbox, reply):

From: zimoun <zimon.toutoune@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 28240@debbugs.gnu.org
Subject: Re: bug#28240: bad backtrace on “guix archive -x”
Date: Thu, 25 Feb 2021 01:08:47 +0100
Hi Ricardo,


On Sat, 26 Aug 2017 at 14:23, Ricardo Wurmus <rekado@elephly.net> wrote:

> wget -q -O - https://mirror.hydra.gnu.org/guix/nar/gzip/ykpfif2wzabhnn0a88sw3f96paa33k2z-r-minimal-3.4.0 | guix archive -x /tmp/hydra
> Backtrace:

This example is not relevant anymore.  Instead,

--8<---------------cut here---------------start------------->8---
wget -O - https://ci.guix.gnu.org/nar/gzip/bhdixzi1c7x4jyh93zx5aqgwzzw3i182-r-minimal-4.0.4 | guix archive -x /tmp/ci
--8<---------------cut here---------------end--------------->8---

still returns the ugly backtrace with…

[...]

> ERROR: Throw to key `decoding-error' with args `("scm_from_utf8_stringn" "input locale conversion error" 0 #vu8(2 3 236 189 11 116 92 213 149 32 122 37 99 35 93 140 100 136 1 135 132 230 32 4 37 9 85 233 227 15 178 141 140 74 82 217 85 65 150 148 146 100 96 97 35 223 170 186 85 186 168 126 169 91 165 143 177 19 51 134 4 45 183 50 76 122 186 87 207 116 214 123 204 91 157 76 122 77 86 154 158 204 155 16 186 131 237 5 193 73 175 204 132 204 234 78 210 157 188 78 79 186 211 145 67 62 116 39 33 36 233 224 183 247 62 159 251 169 42 27 99 32 153 181 82 96 221 123 207 103 159 115 246 217 103 239 125 246 217 231 156 171 53 254 203 91 75 65 163 148 156 179 22 204 96 31 124 55 136 240 14 241 188 66 60 203 203 69 19 159 205 226 59 101 149 204 100 185 80 90 22 223 235 197 211 204 151 41 172 30 156 188 145 35 56 235 196 119 194 202 123 227 11 41 138 127 187 234 33 227 227 254 248 215 89 143 43 197 119 201 204 84 178 70 73 211 101 249 75 102 178 82 54 18 89 83 243 252 154 196 51 89 200 151 161 142 246 31 183 243 239 91 111 233 201 228 43 61 54 52 197 236 153 191 179 183 127 231 252 246 5 99 199 64 118 222 40 38 142 36 151 147 169 35 15 221 153 219 158 120 40 177 45 49 16 76 24 246 92 112 91 104 91 168 175 191 7 48 216 131 223 250 173 108 106 206 204 102 2
> …
> [pages upon pages of numbers]
> …

…pages of numbers.


Moreover, the lzip returns something more comprehensive.

--8<---------------cut here---------------start------------->8---
$ wget -O - https://ci.guix.gnu.org/nar/lzip/…-r-minimal-4.0.4 | guix archive -x /tmp/ci
--2021-02-25 01:02:04--  https://ci.guix.gnu.org/nar/lzip/…-r-minimal-4.0.4
Resolving ci.guix.gnu.org (ci.guix.gnu.org)... 141.80.181.40
Connecting to ci.guix.gnu.org (ci.guix.gnu.org)|141.80.181.40|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24343298 (23M) [application/octet-stream]
Saving to: ‘STDOUT’

-                         100%[=====================================>]  23.21M   486KB/s    in 56s     

2021-02-25 01:03:01 (424 KB/s) - written to stdout [24343298/24343298]

guix archive: error: corrupt input while restoring '/tmp/ci' from #<input: file 0>
--8<---------------cut here---------------end--------------->8---


All the best,
simon




Information forwarded to bug-guix@gnu.org:
bug#28240; Package guix. (Wed, 26 Oct 2022 22:54:03 GMT) (full text, mbox, link).


Message #11 received at 28240@debbugs.gnu.org (full text, mbox, reply):

From: zimoun <zimon.toutoune@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 28240@debbugs.gnu.org
Subject: Re: bug#28240: bad backtrace on “guix archive -x”
Date: Wed, 26 Oct 2022 22:29:27 +0200
Hi,

On Thu, 25 Feb 2021 at 01:08, zimoun <zimon.toutoune@gmail.com> wrote:

> On Sat, 26 Aug 2017 at 14:23, Ricardo Wurmus <rekado@elephly.net> wrote:
>
>> wget -q -O - https://mirror.hydra.gnu.org/guix/nar/gzip/ykpfif2wzabhnn0a88sw3f96paa33k2z-r-minimal-3.4.0 | guix archive -x /tmp/hydra
>> Backtrace:
>
> This example is not relevant anymore.  Instead,
>
> wget -O - https://ci.guix.gnu.org/nar/gzip/bhdixzi1c7x4jyh93zx5aqgwzzw3i182-r-minimal-4.0.4 | guix archive -x /tmp/ci
>
>
> still returns the ugly backtrace with…
>
> [...]
>
>> ERROR: Throw to key `decoding-error' with args `("scm_from_utf8_stringn"
>> "input locale conversion error" 0 #vu8(2 3 236 189 11 116 92 213 149 32 122
>> 37 99 35 93 140 100 136 1 135 132 230 32 4 37 9 85 233 227 15 178 141 140 74
>> 82 217 85 65 150 148 146 100 96 97 35 223 170 186 85 186 168 126 169 91 165
>> 143 177 19 51 134 4 45 183 50 76 122 186 87 207 116 214 123 204 91 157 76
>> 122 77 86 154 158 204 155 16 186 131 237 5 193 73 175 204 132 204 234 78 210
>> 157 188 78 79 186 211 145 67 62 116 39 33 36 233 224 183 247 62 159 251 169
>> 42 27 99 32 153 181 82 96 221 123 207 103 159 115 246 217 103 239 125 246
>> 217 231 156 171 53 254 203 91 75 65 163 148 156 179 22 204 96 31 124 55 136
>> 240 14 241 188 66 60 203 203 69 19 159 205 226 59 101 149 204 100 185 80 90
>> 22 223 235 197 211 204 151 41 172 30 156 188 145 35 56 235 196 119 194 202
>> 123 227 11 41 138 127 187 234 33 227 227 254 248 215 89 143 43 197 119 201
>> 204 84 178 70 73 211 101 249 75 102 178 82 54 18 89 83 243 252 154 196 51 89
>> 200 151 161 142 246 31 183 243 239 91 111 233 201 228 43 61 54 52 197 236
>> 153 191 179 183 127 231 252 246 5 99 199 64 118 222 40 38 142 36 151 147 169
>> 35 15 221 153 219 158 120 40 177 45 49 16 76 24 246 92 112 91 104 91 168 175
>> 191 7 48 216 131 223 250 173 108 106 206 204 102 2
>> …
>> [pages upon pages of numbers]
>> …
>
> …pages of numbers.

This is still relevant.  However, is it still worth to keep it open
because of:

<https://guix.gnu.org/en/blog/2022/sunsetting-gzip-substitutes-availability/>

?


>
> Moreover, the lzip returns something more comprehensive.
>
> $ wget -O - https://ci.guix.gnu.org/nar/lzip/…-r-minimal-4.0.4 | guix archive -x /tmp/ci
> --2021-02-25 01:02:04--  https://ci.guix.gnu.org/nar/lzip/…-r-minimal-4.0.4
> Resolving ci.guix.gnu.org (ci.guix.gnu.org)... 141.80.181.40
> Connecting to ci.guix.gnu.org (ci.guix.gnu.org)|141.80.181.40|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 24343298 (23M) [application/octet-stream]
> Saving to: ‘STDOUT’
>
> -                         100%[=====================================>]  23.21M   486KB/s    in 56s
>
> 2021-02-25 01:03:01 (424 KB/s) - written to stdout [24343298/24343298]
>
> guix archive: error: corrupt input while restoring '/tmp/ci' from #<input: file 0>

The situation is still the same.  Well, is the “guix archive” error the
point of this bug report?


Cheers,
simon




Information forwarded to bug-guix@gnu.org:
bug#28240; Package guix. (Thu, 27 Oct 2022 11:33:02 GMT) (full text, mbox, link).


Message #14 received at 28240@debbugs.gnu.org (full text, mbox, reply):

From: Ricardo Wurmus <rekado@elephly.net>
To: zimoun <zimon.toutoune@gmail.com>
Cc: 28240@debbugs.gnu.org
Subject: Re: bug#28240: bad backtrace on “guix archive -x”
Date: Thu, 27 Oct 2022 13:30:42 +0200
zimoun <zimon.toutoune@gmail.com> writes:

>> guix archive: error: corrupt input while restoring '/tmp/ci' from #<input: file 0>
>
> The situation is still the same.  Well, is the “guix archive” error the
> point of this bug report?

The point is the terrible backtrace.  While this error is a little
better it’s also not great.

But my primary concern is to prevent ’guix archive’ from printing a bad
backtrace.  Doesn’t matter what we feed it.

-- 
Ricardo




Information forwarded to bug-guix@gnu.org:
bug#28240; Package guix. (Fri, 28 Oct 2022 08:48:02 GMT) (full text, mbox, link).


Message #17 received at 28240@debbugs.gnu.org (full text, mbox, reply):

From: zimoun <zimon.toutoune@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: 28240@debbugs.gnu.org
Subject: Re: bug#28240: bad backtrace on “guix archive -x”
Date: Fri, 28 Oct 2022 10:08:49 +0200
Hi Ricardo,

On Thu, 27 Oct 2022 at 13:30, Ricardo Wurmus <rekado@elephly.net> wrote:
> zimoun <zimon.toutoune@gmail.com> writes:
>
>>> guix archive: error: corrupt input while restoring '/tmp/ci' from #<input: file 0>
>>
>> The situation is still the same.  Well, is the “guix archive” error the
>> point of this bug report?
>
> The point is the terrible backtrace.  While this error is a little
> better it’s also not great.

About lzip, the error is catched by call-with-error-handling (guix ui),

--8<---------------cut here---------------start------------->8---
             ((nar-error? c)
              (let ((file (nar-error-file c))
                    (port (nar-error-port c)))
                (if file
                    (leave (G_ "corrupt input while restoring '~a' from ~s~%")
                           file (or (port-filename* port) port))
                    (leave (G_ "corrupt input while restoring archive from ~s~%")
                           (or (port-filename* port) port)))))
--8<---------------cut here---------------end--------------->8---


> But my primary concern is to prevent ’guix archive’ from printing a bad
> backtrace.  Doesn’t matter what we feed it.

In the case of gzip,

--8<---------------cut here---------------start------------->8---
Backtrace:
          12 (primitive-load "/home/simon/.config/guix/current/bin/guix")
In guix/ui.scm:
   2263:7 11 (run-guix . _)
  2226:10 10 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/status.scm:
    835:3  8 (_)
    815:4  7 (call-with-status-report _ _)
In ice-9/boot-9.scm:
  1752:10  6 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _)
In guix/store.scm:
   656:37  5 (thunk)
   1295:8  4 (call-with-build-handler #<procedure 7f6aab46c7e0 at guix/ui.scm:1171:2 (continue store things mo…> …)
In guix/serialization.scm:
   416:21  3 (fold-archive #<procedure 7f6aab8f5d20 at guix/serialization.scm:512:16 (file type content result)> …)
In unknown file:
           2 (utf8->string #vu8(0 3 236 189 13 120 92 87 121 46 58 182 147 96 13 73 228 144 244 212 64 40 59 # …))
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Throw to key `decoding-error' with args `("scm_from_utf8_stringn" "input locale conversion error" 0 #vu8
--8<---------------cut here---------------end--------------->8---

the error is incorrectly handled.  If I read correctly, the handled
errors are,

      (guard* (c ((package-input-error? c)
                  ((package-cross-build-system-error? c)
                  ((gexp-input-error? c)
                  ((profile-not-found-error? c)
                  ((missing-generation-error? c)
                  ((unmatched-pattern-error? c)
                  ((profile-collision-error? c)
                  ((nar-error? c)
                  ((store-connection-error? c)
                  ((store-protocol-error? c)
                  ((derivation-missing-output-error? c)
                  ((file-search-error? c)
                  ((invoke-error? c)
                   ((formatted-message? c)
                   ((message-condition? c)

so this ’decoding-error’ is not handled earlier.  Well, the only catch
of ’decoding-error’ is by maybe-utf8->string from (guix status).


Cheers,
simon




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Wed Apr 16 03:55:18 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.