unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 42053@debbugs.gnu.org
Subject: bug#42053: hidden derivation build with inferiors
Date: Fri, 26 Jun 2020 01:47:12 +0200	[thread overview]
Message-ID: <20200626014712.5620ac06@tachikoma.lepiller.eu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

Hi,

someone (kernel-help) on IRC today was having issues using an inferior
kernel with their os configuration and reported that guix was
"hanging". It turns out that guix was actually building the kernel in
the background, but did not report anything to the user. kernel-help
was kind enough to share their config, and I can confirm that guix is
building the kernel, but doesn't tell anything.

I was able to track this done to a call to operating-system-derivation,
which is supposed to return the path to a .drv file. I did not expect
it to have to build anything, since it's only computing a derivation
name.

Using the attached operating system declaration, defining it as "os",
you can see that calling ((operating-system-derivation os)
(open-connection)) "hangs" with no message, and a build user is
building the kernel (unless you already have the kernel built).

Note that the build process continues even if you interrupt that
procedure, and only stops after you exit guix repl entirely.

Going one step further, operating-system-derivation calls fold-services
(which is fine), then service-value (which is also fine) and calls that
value with the store, which builds the kernel without saying anything.
That value comes from the root service type, system-service-type and its
system-derivation procedure.

With some pk, I was able to find that mapm/accumulate-builds was the
culprit, but I don't know how to investigate further.

[-- Attachment #2: test-inferior.scm --]
[-- Type: text/x-scheme, Size: 2612 bytes --]

(use-modules (gnu)
	     (guix channels)
	     (srfi srfi-1)
	     (guix inferior)
	     (gnu packages linux)
	     (srfi srfi-1)
	     (ice-9 match)
	     (guix packages)
	     (gnu packages gnome))
(use-service-modules desktop networking ssh xorg)

(define kernel-inferior-channel
  ;; This is the old revision from which
  ;; we will obtain our desired kernel version.
  (list (channel
         (name 'guix)
         (url "https://git.savannah.gnu.org/git/guix.git")
	 (commit
	  "4f33bf5709a77a98f3d0330e45753d54675239ff"))))

(define linux-libre-4.19-inferior
  (first
   (lookup-inferior-packages
    (inferior-for-channels kernel-inferior-channel)
    "linux-libre" "4.19.129")))

(define-public gnome-minimal
  (package (inherit gnome)
	   (name "gnome-minimal")
	   (propagated-inputs
	    (remove (match-lambda
		      ((name _)
		       (member name '("baobab"
				      "cheese"
				      "eog"
				      "epiphany"
				      "evince"
				      "file-roller"
				      "gedit"
				      "gnome-boxes"
				      "gnome-calculator"
				      "gnome-calendar"
				      "gnome-characters"
				      "gnome-clocks"
				      "gnome-contacts"
				      "gnome-disk-utility"
				      "gnome-font-viewer"
				      "gnome-maps"
				      "gnome-weather"
				      "simple-scan"
				      "totem"
				      "gnome-default-applications"))))
		    (package-propagated-inputs gnome)))))
	   
(operating-system
 (locale "en_US.utf8")
 (kernel linux-libre-4.19-inferior)
 (timezone "America/Chicago")
 (keyboard-layout (keyboard-layout "us"))
 (host-name "t430")
 (users (cons* (user-account
		(name "brettg")
		(comment "Redacted")
		(group "users")
		(home-directory "/home/redacted")
		(supplementary-groups
		 '("wheel" "netdev" "audio" "video")))
	       %base-user-accounts))
 (packages
  (append
   (list (specification->package "nss-certs"))
   %base-packages))
 (services
  (append
   (list (service gnome-desktop-service-type
		  (gnome-desktop-configuration
		   (inherit config)
		   (gnome gnome-minimal)))
	 (service openssh-service-type)
	 (set-xorg-configuration
	  (xorg-configuration
	   (keyboard-layout keyboard-layout))))
   %desktop-services))
 (bootloader
  (bootloader-configuration
   (bootloader grub-efi-bootloader)
   (target "/boot/efi")
   (keyboard-layout keyboard-layout)))
 (swap-devices (list "/dev/sda2"))
 (file-systems
  (cons* (file-system
	  (mount-point "/boot/efi")
	  (device (uuid "0721-45AE" 'fat32))
	  (type "vfat"))
	 (file-system
	  (mount-point "/")
	  (device
	   (uuid "ce05e959-56a7-4520-ad73-556c82861537"
		 'ext4))
	  (type "ext4"))
	 %base-file-systems)))

             reply	other threads:[~2020-06-25 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 23:47 Julien Lepiller [this message]
2020-06-26 10:17 ` bug#42053: hidden derivation build with inferiors Ludovic Courtès
2020-06-26 10:19   ` Julien Lepiller
2020-06-26 12:08     ` Ludovic Courtès
2020-06-28 20:43   ` Ludovic Courtès

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=20200626014712.5620ac06@tachikoma.lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=42053@debbugs.gnu.org \
    /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).