unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#28240: bad backtrace on “guix archive -x”
@ 2017-08-26 12:23 Ricardo Wurmus
  2021-02-25  0:08 ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2017-08-26 12:23 UTC (permalink / raw)
  To: 28240

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28240: bad backtrace on “guix archive -x”
  2017-08-26 12:23 bug#28240: bad backtrace on “guix archive -x” Ricardo Wurmus
@ 2021-02-25  0:08 ` zimoun
  2022-10-26 20:29   ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2021-02-25  0:08 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 28240

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28240: bad backtrace on “guix archive -x”
  2021-02-25  0:08 ` zimoun
@ 2022-10-26 20:29   ` zimoun
  2022-10-27 11:30     ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2022-10-26 20:29 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 28240

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28240: bad backtrace on “guix archive -x”
  2022-10-26 20:29   ` zimoun
@ 2022-10-27 11:30     ` Ricardo Wurmus
  2022-10-28  8:08       ` zimoun
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2022-10-27 11:30 UTC (permalink / raw)
  To: zimoun; +Cc: 28240


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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#28240: bad backtrace on “guix archive -x”
  2022-10-27 11:30     ` Ricardo Wurmus
@ 2022-10-28  8:08       ` zimoun
  0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2022-10-28  8:08 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: 28240

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-28  8:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-26 12:23 bug#28240: bad backtrace on “guix archive -x” Ricardo Wurmus
2021-02-25  0:08 ` zimoun
2022-10-26 20:29   ` zimoun
2022-10-27 11:30     ` Ricardo Wurmus
2022-10-28  8:08       ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).