unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: raid5atemyhomework via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: "pengmeiyu@riseup.net" <pengmeiyu@riseup.net>,
	"46942@debbugs.gnu.org" <46942@debbugs.gnu.org>,
	zimoun <zimon.toutoune@gmail.com>
Subject: bug#46942: ci.guix.gnu.org is slow from my system
Date: Mon, 15 Mar 2021 10:14:28 +0000	[thread overview]
Message-ID: <z6nOXvNtoKQBgCIH0RxAjdfgS_C2_YkwftJ0puBjlrdolBkZ1ZgklW4qwg-LyMiHHLdUBgSdme5Z8WIA1qa7cQxJNI7FFTml37BI14FEklM=@protonmail.com> (raw)
In-Reply-To: <Bzc3UqqEf-Z40v5LkTwMLOPNf5TuKM4PGiGoK67rUgzyn5wccw_BnbfBs4RZ1VUHdLyprDWXcfqifMO_zgoLZg8hmhL-XqkPWdmVCluLjT8=@protonmail.com>


> Hi Maxime,
>
> > On Mon, 2021-03-15 at 00:13 +0000, raid5atemyhomework via Bug reports for GNU Guix wrote:
> >
> > > Hello all,
> > > [...]
> > > I recently had to rebuild an OS (because I was dumb; the Guix language
> > > for shepherd services can easily lead you deadlocking shepherd itself)
> > > and had supreme difficulty reinstalling, [...]
> >
> > Reinstalling after a messed up configuration file shouldn't be necessary.
> > At least when using GRUB as bootloader, guix keeps some old (& presumably
> > not broken) system generations around, that can be selected when booting
> > from the bootloader. (I don't recall exactly how the menu is named,
> > maybe ‘Old system generations of $HOSTNAMES?)
>
> Unfortunately I had a long-standing latent bug in my configuration file that triggered on a (persistent on-disk) edge case which would cause the shepherd process to enter an infinite loop (because the shepherd configuration language is Turing-complete enough to allow infinite loops in the first place). All the remaining generations (since I didn't like keeping more than a dozen, and had recently been excessively tweaking the configuration file) had this bug, so I had no way of reverting to an even older generation that predated the bug.


And regardless, this kind of problem shouldn't occur in the first place.

* Instead of running the `start` code in the same process 1 (which is special enough that no amount of `kill -s SIGKILL 1` will work even if you manage to log into a console), `shepherd` should really run it in a separate process and monitor it if it's taking too long and possibly allow the operator to break out of it.  Principle of least power and all that...
  * If you want details: there is a shepherd service A that is a requirement of shepherd service B, however the daemon launched by A needed to reach a particular point in its initialization before B can start talking to it.  B itself will fail to start if A has not reached that point in initialization.  The extra code I added to the `start` of shepherd service A was to wait for that point of initialization before A was considered "started".  It turned out it was buggy in that if the point was not reached in 1 second it would inadvertently enter an incorrect looping logic (ironically, the logic was supposed to exit it after 60 seconds, but I got increment/decrement crossed, meaning it would always loop as long as you never reached -60 seconds, which was impossible....) that ended up being an infinite loop and preventing process 1 from advancing.  And this point was getting delayed when the process launched by A had to do a lot of (important) data on-disk that it needed to process at startup, so it was persistent on-disk data that would need > 1 second to process, thus ensuring that the buggy code would be entered.
* If this was a new computer it would also be just as screwed during installation anyway, you should consider this a fortuitous discovery of a latent bug.
  * New users trying out Guix System that happen to get hit by this bug might very well decide that Guix is not stable enough for them to commit to using.

Thanks
raid5atemyhomework





  reply	other threads:[~2021-03-15 10:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 11:22 bug#46942: ci.guix.gnu.org is slow from my system raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 11:48 ` Christopher Baines
2021-03-05 12:12   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:26   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:41     ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 12:41 ` zimoun
2021-03-05 13:00   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 14:46     ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 18:39       ` zimoun
2021-03-05 22:57         ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 23:48           ` zimoun
2021-03-06  0:23           ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-06  0:42             ` zimoun
2021-03-15  0:13               ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-15  7:21                 ` Maxime Devos
2021-03-15 10:01                   ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-15 10:14                     ` raid5atemyhomework via Bug reports for GNU Guix [this message]
2021-03-16 12:38                       ` raid5atemyhomework via Bug reports for GNU Guix
2021-03-05 19:40 ` Leo Famulari
2021-03-05 21:53   ` Julien Lepiller
2021-03-05 22:12     ` Leo Famulari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='z6nOXvNtoKQBgCIH0RxAjdfgS_C2_YkwftJ0puBjlrdolBkZ1ZgklW4qwg-LyMiHHLdUBgSdme5Z8WIA1qa7cQxJNI7FFTml37BI14FEklM=@protonmail.com' \
    --to=bug-guix@gnu.org \
    --cc=46942@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=pengmeiyu@riseup.net \
    --cc=raid5atemyhomework@protonmail.com \
    --cc=zimon.toutoune@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).