Subject: bug#62213: GSSH ERROR while sending store items with 'guix deploy'

From: Maxim Cournoyer <[email-masked]>
Date: Wed, 15 Mar 2023 22:02:20 -0400

Hi,

I'm trying to update one of my machines using 'guix deploy' and I keep
getting the following error:

--8<---------------cut here---------------start------------->8---
guix deploy: sending 599 store items (3,794 MiB) to 'x200.local'...
 20% ▕███████████████████▋                                                                               ▏
 27% ▕██████████████████████████▎                                                                        ▏;;; [2023/03/15 21:57:28.007492, 0] [GSSH ERROR] Parent session is not connected: #<unknown channel (freed) 7fca183c31c0>
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/deploy.scm:
    166:6 18 (_)
In guix/store.scm:
  2168:25 17 (run-with-store #<store-connection 256.99 7fca0e115d70> …)
In gnu/machine/ssh.scm:
    528:8 16 (_ _)
   530:30 15 (_ _)
In ice-9/boot-9.scm:
  1752:10 14 (with-exception-handler _ _ #:unwind? _ # _)
In gnu/machine/ssh.scm:
   530:30 13 (_)
In guix/store.scm:
  2168:25 12 (run-with-store #<store-connection 256.99 7fca0c81c140> …)
In guix/remote.scm:
   136:10 11 (_ _)
In guix/store.scm:
  2040:38 10 (_ #<store-connection 256.99 7fca0c81c140>)
In guix/ssh.scm:
    530:7  9 (send-files _ _ _ #:recursive? _ #:log-port _)
In guix/store.scm:
  1764:12  8 (export-paths #<store-connection 256.99 7fca0c81c140> _ …)
  1731:22  7 (export-path #<store-connection 256.99 7fca0c81c140> _ # …)
   716:13  6 (process-stderr _ _)
In guix/build/utils.scm:
  1014:11  5 (loop _ _)
In unknown file:
           4 (put-bytevector #<unknown channel (freed) 7fca183c31c0> …)
In ice-9/boot-9.scm:
  1685:16  3 (raise-exception _ #:continuable? _)
  1683:16  2 (raise-exception _ #:continuable? _)
  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 `guile-ssh-error' with args `("write_to_channel_port"
"Parent session is not connected" #<unknown channel (freed)
7fca183c31c0> #f)'.
--8<---------------cut here---------------end--------------->8---

It works for a while, so it'll eventually succeeds, but that seems a new
regression (it didn't use to do that).

-- 
Thanks,
Maxim