GNU bug report logs - #54545
[Guix Home] ‘shepherd’ started twice?

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Thu, 24 Mar 2022 14:22:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#54545: closed (Re: bug#54545: [Guix Home] ‘shepherd’
 started twice?)
Date: Fri, 15 Apr 2022 16:00:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#54545: [Guix Home] ‘shepherd’ started twice?

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 54545 <at> debbugs.gnu.org.

-- 
54545: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=54545
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Andrew Tropin <andrew <at> trop.in>
Cc: 54545-done <at> debbugs.gnu.org
Subject: Re: bug#54545: [Guix Home] ‘shepherd’ started
 twice?
Date: Fri, 15 Apr 2022 17:59:14 +0200
Hi,

Andrew Tropin <andrew <at> trop.in> skribis:

[...]

> for example I can't find info about
> Fixes line even with search

That part is not written (yet!), but you’ve had the opportunity to look
at the Git log I guess.  :-)

>>> From 56d16b4cd511f6837329b888dade0c6d6da4d89d Mon Sep 17 00:00:00 2001
>>> From: Andrew Tropin <andrew <at> trop.in>
>>> Date: Tue, 12 Apr 2022 12:19:50 +0300
>>> Subject: [PATCH 2/3] home: shepherd: Use run-on-change to reload shepherd
>>>  config.
>>>
>>> * gnu/home/services/shepherd.scm: Add shepherd configuration to
>>> XDG_CONFIG_HOME and use it instead of full path to the store. It's necessary
>>> to use run-on-change service.

[...]

>> How does this relate to the bug at hand?
>>
>>   https://issues.guix.gnu.org/54545
>>
>
> Almost directly.
>
> During activation if there is no shepherd process we tried to launch a
> new one, which was useful back in the days, when I was testing changes
> frequently, but can be kinda unexpected for user, if they stopped
> Shepherd for some reason, but during activation it started again
> automatically.  As we discussed earlier:
>
>>>> Probably we need to do config reload using on-change service and also
>>>> not trigger on-change stuff if user isn't logged in.
>
>>>   Makes sense.
>
> it would be nice to reload configuration only if it's changed.  To make
> run-on-change work we need to store a config somewhere in
> home-environment, to make it possible to compare with previous
> generation.  files/.config/shepherd/init.scm looks like a good match
> here, in addition to on-change functionality it increases explorability.

Hmm let’s not invent some new fancy way to update Shepherd services and
instead use what we already have for Guix System.

I’m closing this issue; please open a new one if there’s more to
discuss!

Thanks,
Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: [Guix Home] ‘shepherd’ started twice?
Date: Thu, 24 Mar 2022 15:21:26 +0100
Hi,

From what can be seen in ‘guix home container’, it would seem that
‘shepherd’ is started twice, leading to this error while attempting to
bind(2) the second time (thus it’s actually harmless, but suboptimal):

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env  guix home container /tmp/t.scm
WARNING: (guile-user): imported module (guix build utils) overrides core binding `delete'
Symlinking /home/ludo/.bash_profile -> /gnu/store/flqaxzvgfv2g3415mhmq6c0zbzdzv2k4-bash_profile... done
Symlinking /home/ludo/.profile -> /gnu/store/dann7r1095xll0kji5yl0ql07096rc8j-shell-profile... done
Symlinking /home/ludo/.bashrc -> /gnu/store/g78w0adqg25z3jl8jq71n0n0z32f7dbx-bashrc... done
Symlinking /home/ludo/.config/fontconfig/fonts.conf -> /gnu/store/4261pxafny0g2myhh9yj1771ry7k05lc-fonts.conf... done
 done
Finished updating symlinks.

Comparing /gnu/store/non-existing-generation/profile/share/fonts and
          /gnu/store/vvfrdbvmb0g41k00xxmd9qpgzavkvd32-home/profile/share/fonts... done (same)
Evaluating on-change gexps.

On-change gexps evaluation finished.

Service root has been started.
WARNING: Use of `load' in declarative module (#{ g56}#).  Add #:declarative? #f to your define-module invocation.
Starting services...
Service mcron has been started.

Service root has been started.
WARNING: Use of `load' in declarative module (#{ g56}#).  Add #:declarative? #f to your define-module invocation.
Starting services...
Service mcron has been started.

Backtrace:
           4 (primitive-load "/gnu/store/vza48khbaq0fdmcsrn27xj5y5yy?")
In shepherd.scm:
~$    316:10  3 (main "--logfile" "/home/ludo/.local/var/log/shepherd.?" ?)
    56:14  2 (call-with-server-socket "/run/user/1000/shepherd/sock?" ?)
     49:6  1 (open-server-socket "/run/user/1000/shepherd/socket")
In unknown file:
           0 (bind #<input-output: socket 12> #(1 "/run/user/1000?") #)

ERROR: In procedure bind:
In procedure bind: Address already in use
--8<---------------cut here---------------end--------------->8---

I suspect the problem is in activation snippets, but I’m open to other
hypotheses.  :-)

Thoughts?

Ludo’.



This bug report was last modified 3 years and 38 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.