Subject: bug#54919: closed (Re: bug#54779: guix home reconfigure throw error after Shepherd updata)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 20 Apr 2022 22:12:02 +0000

Your bug report

#54779: Guix hangs near the end of ‘home’ operations

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
54779: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54779
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#54779: guix home reconfigure throw error after Shepherd updata
From: Ludovic Courtès <[email-masked]>
To: Aleksandr Vityazev <[email-masked]>
Cc: [email-masked], Nicolas Graves <[email-masked]>
Date: Thu, 21 Apr 2022 00:11:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

Aleksandr Vityazev <[email-masked]> skribis:

> guix home reconfigure config.scm [1], throw error and freezes even
> ctrl-c doesn't help

Indeed, this can be reproduced like so:

--8<---------------cut here---------------start------------->8---
$ herd load root /gnu/store/1xx98q22c6ijr0p5pjbq3wnxd5yyxlmy-shepherd.conf
WARNING: Use of `load' in declarative module (#{ g139}#).  Add #:declarative? #f to your define-module invocation.
Uncaught exception in task:
In fibers.scm:
    150:8  9 (_)
In ice-9/boot-9.scm:
  1747:15  8 (with-exception-handler #<procedure 7f52c6b31390 at ic…> …)
In shepherd.scm:
    432:9  7 (_)
In ice-9/boot-9.scm:
  1747:15  6 (with-exception-handler #<procedure 7f52c6b312d0 at ic…> …)
In ice-9/exceptions.scm:
   406:15  5 (_)
In ice-9/boot-9.scm:
  1752:10  4 (with-exception-handler _ _ #:unwind? _ # _)
In shepherd.scm:
   502:23  3 (_)
In srfi/srfi-1.scm:
   586:17  2 (map1 (#<<service> 7f52c8f77f30>))
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1683:16  0 (raise-exception _ #:continuable? _)
ice-9/boot-9.scm:1683:16: In procedure raise-exception:
Zero values returned to single-valued continuation
--8<---------------cut here---------------end--------------->8---

(‘guix home reconfigure’ invokes the same command as above.)

The problem is that ‘start-in-the-background’ returns zero values, as
indicated above, but shepherd expects user commands to return one value.

So the fix, as you suggest, is to return one value at the end of
shepherd.conf.

You suggested redirecting stdin, which is also a good idea, but for a
different reason.  :-)  Anyway I’ve done both.

  dd2ab92d9d home: shepherd: Redirect input port to /dev/null.
  bc867b2ab0 home: shepherd: "shepherd.conf" returns one value.

Thank you!

Ludo’.

Subject: Guix hangs near the end of ‘home’ operations
From: Brian Cully <[email-masked]>
To: [email-masked]
Date: Wed, 13 Apr 2022 15:43:11 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

	During ‘home reconfigure’ after it says ‘Finished updating symlinks.’,
guix hangs forever. Attempting to interrupt with ^C failed, and I had to
force-close my ssh session.

	Logging back in, ‘home list-generations’ claims to have
installed a new generation and moved forward. I no longer knew the state
of this generation, since I had to forcefully quit the previous
operation, so I felt it safest to try to roll back my home.

	Again, ‘home roll-back’ got to ‘Finished updating symlinks’ and
hard hung. I probably don’t need to tell anyone how this makes me feel
about the stability of this system or any guarantees of atomicity in
transactions.

-bjc