Subject: bug#53027: Backtrace with `guix pull --debug=2`

From: Oskar Berndal <[email-masked]>
Date: Wed, 5 Jan 2022 16:19:39 +0100

I tried running `guix pull` with the `--debug=2` flag. However, it led
a backtrace, that I include at the bottom. I tried the command twice
with the same backtrace, and then I tried without the debug flag,
simply running `guix pull`. This worked without error. Trying to run
with the debug flag again also worked immediately after that.

Prior to all of this, I made a system reconfiguration where I changed
the uid but not the name of a user. I needed to manually change the
ownership of some files to the new user id so that guix wouldn't trip
at some point. Maybe that's a clue, that it is due to some other files
being of wrong ownership (but not producing an error message I can
understand this time).

Other info:
- guix 1.3.0
- Installed on WSL

These are all things I can think of to add at the moment, please let
me know if there is something else that might be helpful if I can
provide.
Cheers,
Oskar

```
$ guix pull --debug=2
...
building path(s)
`/gnu/store/z0i0wwc7wvch9a8n0gd47gkay9lj1qb0-module-import-compiled'
|   @ build-started
/gnu/store/5m4pr3gskpzgshza09ashiysz4a3pd4v-module-import-compiled.drv
- x86_64-linux /var/log/guix/drvs/5m//4pr3gskpzgshza09ashiysz4a3pd4v-module-import-compiled.drv.bz2
3102
Backtrace:
In guix/channels.scm:
    890:2 19 (_ _)
In ./guix/monads.scm:
    471:9 18 (_ _)
In guix/store.scm:
   1956:8 17 (_ _)
In guix/channels.scm:
   641:14 16 (_ #<store-connection 256.99 7efc327c44b0>)
In guix/store.scm:
  2119:24 15 (run-with-store #<store-connection 256.99 7efc327c44b0> …)
   1320:8 14 (call-with-build-handler _ _)
   1320:8 13 (call-with-build-handler #<procedure 7efc32b9d6d0 at g…> …)
In guix/channels.scm:
   656:14 12 (_)
In guix/store.scm:
  2119:24 11 (run-with-store #<store-connection 256.99 7efc327c44b0> …)
In unknown file:
          10 (_ #<procedure 7efc1b421000 at ice-9/eval.scm:330:13 ()> …)
In guix/store.scm:
  1991:38  9 (_ #<store-connection 256.99 7efc2761b820>)
  1417:15  8 (_ #<store-connection 256.99 7efc2761b820> _ _)
   759:13  7 (process-stderr _ _)
In unknown file:
           6 (display "@ build-log 3102 39\n[ 1/78] Loading './gcry…" …)
In guix/status.scm:
   745:19  5 (write! _ _ _)
In srfi/srfi-1.scm:
   460:18  4 (fold #<procedure 7efc3281ac40 at guix/status.scm:635:…> …)
In guix/status.scm:
   636:15  3 (_ (build-log 3102 "[ 1/78] Loading './gcrypt/hash.s…") #)
   179:23  2 (update-build #<<build-status> building: () downloadin…> …)
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:
In procedure struct-vtable: Wrong type argument in position 1
(expecting struct): #f
```