GNU bug report logs - #20037
'guix system reconfigure' without 'gnu/system/linux.go' fails with duplicates login pam-service

Previous Next

Package: guix;

Reported by: 宋文武 <iyzsong <at> gmail.com>

Date: Sun, 8 Mar 2015 10:33:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20037 in the body.
You can then email your comments to 20037 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#20037; Package guix. (Sun, 08 Mar 2015 10:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to 宋文武 <iyzsong <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 08 Mar 2015 10:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: 宋文武 <iyzsong <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: 'guix system reconfigure' without 'gnu/system/linux.go' fails with
 duplicates login pam-service
Date: Sun, 08 Mar 2015 18:32:01 +0800
[Message part 1 (text/plain, inline)]
I can reproduce the issue Tomáš Čech (Sleep_Walker) reported at IRC,
but only when reconfigure under 'pre-inst-env' and without 'gnu/system/linux.go':

$ cd guix; make clean-go
# .../guix/pre-inst-env guix system reconfigure config.scm

;;; Failed to autoload make-session in (gnutls):
;;; ERROR: missing interface for module (gnutls)
;;; Failed to autoload connection-end/client in (gnutls):
;;; ERROR: missing interface for module (gnutls)
;;; Failed to autoload make-session in (gnutls):
;;; ERROR: missing interface for module (gnutls)
The following derivations will be built:
   /gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv
   /gnu/store/8jg5iqrd04hj1k8nx6fzcm9lz16nmk4r-grub.cfg.drv
   /gnu/store/d53lbndj9yryrzgb3p4vjlb9gyh1rri0-activate.drv
   /gnu/store/y3i8spghyv4dg8d8yl78bvkjb3xcbarb-boot.drv
   /gnu/store/mrlw80nawfbc8mhq3pz6gbxxpgjbabij-pam.d.drv
   /gnu/store/sf3n6ijagmc64ik7mn96p8c69xk30nmv-etc.drv
Backtrace:
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure e365c0> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure e365c0>]
In ice-9/boot-9.scm:
  63: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 7 [eval # #]
In ice-9/boot-9.scm:
2401: 6 [save-module-excursion #<procedure e53980 at ice-9/boot-9.scm:4045:3 ()>]
4050: 5 [#<procedure e53980 at ice-9/boot-9.scm:4045:3 ()>]
1724: 4 [%start-stack load-stack #<procedure e66ae0 at ice-9/boot-9.scm:4041:10 ()>]
1729: 3 [#<procedure e6af00 ()>]
In unknown file:
   ?: 2 [primitive-load "/gnu/store/dmsgr6bsp9k0x7c2dmcvhqrgrqqal7kb-pam.d-builder"]
In ice-9/boot-9.scm:
 775: 1 [for-each #<procedure eec7e0 at ice-9/eval.scm:416:20 (a)> (# # # # ...)]
In unknown file:
   ?: 0 [symlink "/gnu/store/pn2wmdczwcknksxhdn4jl6sh49h0vidm-login" ...]

ERROR: In procedure symlink:
ERROR: In procedure symlink: File exists
builder for `/gnu/store/mrlw80nawfbc8mhq3pz6gbxxpgjbabij-pam.d.drv' failed with exit code 1
cannot build derivation `/gnu/store/sf3n6ijagmc64ik7mn96p8c69xk30nmv-etc.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv': 1 dependencies couldn't be built
killing process 2317
guix system: error: build failed: build of `/gnu/store/8576w1km2a8ij7k66k6n37gyhxzpxda4-system.drv' failed


the pam.d-builder contains duplicates login entries
(I have 3 mingetty-service)
[dmsgr6bsp9k0x7c2dmcvhqrgrqqal7kb-pam.d-builder (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
After add '(pretty-print services)' to 'pam-services->directory', I get:
[x (application/octet-stream, attachment)]
[Message part 5 (text/plain, inline)]
After 'make gnu/system/linux.go', it works with a different pam.d-builder:
[1g1ik6jp04x8j204482hkzvfq4dxly0h-pam.d-builder (application/octet-stream, attachment)]

Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 10 Mar 2015 17:14:03 GMT) Full text and rfc822 format available.

Notification sent to 宋文武 <iyzsong <at> gmail.com>:
bug acknowledged by developer. (Tue, 10 Mar 2015 17:14:03 GMT) Full text and rfc822 format available.

Message #10 received at 20037-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: 宋文武 <iyzsong <at> gmail.com>
Cc: 20037-done <at> debbugs.gnu.org
Subject: Re: bug#20037: 'guix system reconfigure' without
 'gnu/system/linux.go' fails with duplicates login pam-service
Date: Tue, 10 Mar 2015 18:13:23 +0100
宋文武 <iyzsong <at> gmail.com> skribis:

> I can reproduce the issue Tomáš Čech (Sleep_Walker) reported at IRC,
> but only when reconfigure under 'pre-inst-env' and without 'gnu/system/linux.go':

Thanks a lot for finding it out, it’s an interesting bug!

The problem was that ‘pam-service->directory’ would get a different list
of objects depending on whether (gnu packages linux) is evaluated or
running from bytecode: when evaluated, the list would contain duplicate
services, leading to the build error you reported, but when running from
bytecode, the list is deduplicated.

This is because (gnu system) would call ‘delete-duplicates’ on the list
of PAM services, thereby using ‘equal?’ to compare them.  But since
<pam-service> include gexps, which include closures, ‘equal?’ could
return #t when running the compiled code (because in effect the gexps in
‘unix-pam-service’ would not lead to the allocation of fresh closures at
each call, so the gexps would be ‘eq?’), whereas with the evaluated
code, it would systematically return #f (we get fresh closures at each
‘unix-pam-service’ call.)

Commit 11dddd8 fixes that.

Thanks to both of you!

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#20037; Package guix. (Thu, 02 Apr 2015 15:25:02 GMT) Full text and rfc822 format available.

Message #13 received at 20037 <at> debbugs.gnu.org (full text, mbox):

From: Tomáš Čech <sleep_walker <at> gnu.org>
To: 20037 <at> debbugs.gnu.org
Subject: problem still persist
Date: Thu, 2 Apr 2015 17:24:49 +0200
[Message part 1 (text/plain, inline)]
I'm afraid I can reproduce it.

I'm at revision bfe3c6857251c1fff24317da602b9cd762c1c112, running guix from
GIT through pre-inst-env.

I was able to remove all my local modifications so no GUIX_PACKAGE_PATH is in
place.

----------------------%<----my-config.scm----begin---->%-------------------
(use-modules (gnu))
(use-package-modules
 ;; generic guix packages modules
 admin autotools avahi base bash commencement cryptsetup curl
 emacs enlightenment gdb glib gnutls gnuzilla grub links linux lsh mail
 mc patchutils slim synergy texinfo version-control video wget wicd
 xfce xorg dwm avahi ssh xorg vpn openssl)
(use-service-modules
 avahi base dbus networking ssh xorg)

(operating-system
 (host-name "venom")
 (timezone "Europe/Prague")
 (locale "cs_CZ.utf8")
 (bootloader (grub-configuration
	      (device "/dev/sda")
	      (menu-entries
	       (list
		(menu-entry
		 (label "Gentoo")
		 (linux "/vmlinuz-gentoo")
		 (linux-arguments (list
				   "root=/dev/venom/gentoo"
				   "init=/usr/lib/systemd/systemd"))
		 (initrd "/initramfs-gentoo")
		 )))))
 (file-systems (append (list (file-system
			      (device "/dev/sda3") ; or partition label
			      (mount-point "/")
			      (type "ext4"))
;;			     (file-system
;;			      (device "/dev/venom/home")
;;			      (mount-point "/home")
;;			      (type "ext4"))
			     )
		       %base-file-systems))
 (swap-devices '("/dev/sda2"))
 (users (list (user-account
	       (name "tcech")
	       (uid 1000) (group "users")
	       (comment "Tomas Cech")
	       (password "password")
	       (home-directory "/home/tcech"))))
 (packages
  (append
   (list
    ;; absolutely necessary
    emacs lvm2 mc bash texinfo
    grub nss-mdns procps cryptsetup alsa-utils
    
    ;; networking
    iw iproute wicd links wpa-supplicant dbus
    vpnc openconnect openssl lsh
    
    ;; minimal Xorg
    slim xrandr xterm slock
    
    ;; mail
    mutt mu gnutls

    ;; web
    icecat wget curl
    
    ;; enlightenment
    terminology enlightenment

    ;; xfce
    xfce

    ;; other X stuff
    synergy
    ;; multimedia
    mplayer mplayer2 vlc
    ;; mpv
    ;; development
    git magit subversion cvs rcs quilt patchutils patch gcc-toolchain-4.9 gnu-make
    automake autoconf gdb
    strace ltrace

    ;; other
    htop
    ;; not packaged yet
    ;; isync cmus cscope ctags the-silver-searcher
    )
   %base-packages))
 (services
  (append
   (list
    (lsh-service #:port-number 22 #:root-login? #t #:initialize? #t)
    (slim-service)
    (wicd-service)
    (avahi-service)
    (dbus-service (list avahi wicd))
    (mingetty-service "ttyS0"))
   %base-services))
 )
----------------------%<----my-config.scm----end------>%-------------------

As I lost ability to boot after repartitioning so I run it from chroot from
openSUSE. Guix daemon is started from chroot.

Failure is happening with:

$ guix system reconfigure my-config.scm
substitute-binary: updating list of substitutes from 'http://hydra.gnu.org'...
The following derivations will be built:
   /gnu/store/igkyyxgpyvizzpkygji34dkyiivrbqbj-system.drv
   /gnu/store/khgv41ycwz0vg6sadgzrbrpsl93mii5c-grub.cfg.drv
   /gnu/store/j1s6vh555l6bjmf343wf9f1iyzdzwnv8-activate.drv
   /gnu/store/mx0rmnfqi998lpdv8iaywj66wdjnhmsy-boot.drv
   /gnu/store/wnj7qwhn1i7akk6crkg6s0diksi3lhyr-pam.d.drv
   /gnu/store/7dm59cc020dfma43b24pilrp98zgsbs8-etc.drv
Backtrace:
In ice-9/boot-9.scm:
 157: 10 [catch #t #<catch-closure 1143920> ...]
In unknown file:
   ?: 9 [apply-smob/1 #<catch-closure 1143920>]
In ice-9/boot-9.scm:
  63: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 7 [eval # #]
In ice-9/boot-9.scm:
2401: 6 [save-module-excursion #<procedure 1160980 at ice-9/boot-9.scm:4045:3 ()>]
4050: 5 [#<procedure 1160980 at ice-9/boot-9.scm:4045:3 ()>]
1724: 4 [%start-stack load-stack ...]
1729: 3 [#<procedure 1176f00 ()>]
In unknown file:
   ?: 2 [primitive-load "/gnu/store/b027n4gx00y19bpyi1h5hasvnpp95ff4-pam.d-builder"]
In srfi/srfi-1.scm:
 616: 1 [for-each #<procedure 1217de0 at ice-9/eval.scm:416:20 (a)> (# # # # ...)]
In unknown file:
   ?: 0 [symlink "/gnu/store/z95z25d73kjza99s3w95lrdsiqlcdv0a-login" ...]

ERROR: In procedure symlink:
ERROR: In procedure symlink: File exists
builder for `/gnu/store/wnj7qwhn1i7akk6crkg6s0diksi3lhyr-pam.d.drv' failed with exit code 1
cannot build derivation `/gnu/store/7dm59cc020dfma43b24pilrp98zgsbs8-etc.drv': 1 dependencies couldn't be built
cannot build derivation `/gnu/store/igkyyxgpyvizzpkygji34dkyiivrbqbj-system.drv': 1 dependencies couldn't be built
killing process 7202
guix system: error: build failed: build of `/gnu/store/igkyyxgpyvizzpkygji34dkyiivrbqbj-system.drv' failed



It seems to be identical to the report. Furthermore - `make clean' in my GIT
repository is not helping so right now I'm not sure how to progress.

I'd appreciate if you have any other hints how to progress or what else to
wipe.


S_W
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#20037; Package guix. (Sun, 05 Apr 2015 21:06:01 GMT) Full text and rfc822 format available.

Message #16 received at 20037 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Tomáš Čech <sleep_walker <at> gnu.org>
Cc: 20037 <at> debbugs.gnu.org
Subject: Re: bug#20037: problem still persist
Date: Sun, 05 Apr 2015 23:05:34 +0200
Tomáš Čech <sleep_walker <at> gnu.org> skribis:

> I'm afraid I can reproduce it.

It’s a different problem this time.  :-)

> ----------------------%<----my-config.scm----begin---->%-------------------

[...]

>  (packages
>   (append
>    (list
>     ;; absolutely necessary
>     emacs lvm2 mc bash texinfo

(Unrelated, but I personally find it more convenient to have only core
packages in the global profile, and then have the rest in user
profiles.)


[...]

>  (services
>   (append
>    (list
>     (lsh-service #:port-number 22 #:root-login? #t #:initialize? #t)
>     (slim-service)
>     (wicd-service)
>     (avahi-service)
>     (dbus-service (list avahi wicd))
>     (mingetty-service "ttyS0"))

[...]

>    ?: 0 [symlink "/gnu/store/z95z25d73kjza99s3w95lrdsiqlcdv0a-login" ...]
>
> ERROR: In procedure symlink:
> ERROR: In procedure symlink: File exists

The culprit is the ‘mingetty-service’ call above: since it uses a #:motd
different from that used in the other ‘mingetty-service’ calls in
%base-services, the thing tries to create a different pam.d/login file
for it, but that fails because there’s already a pam.d/login file.

The workaround is to write:

    (mingetty-service "ttyS0"
                      #:motd (text-file "motd" "
This is the GNU operating system, welcome!\n\n"))

Since this is the same motd as the other mingetty services, everything
is fine.

This is of course unsatisfactory.  The more general issue is that
service procedures need to be able to share state/configuration info,
which I hope we can fix soon.

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#20037; Package guix. (Mon, 06 Apr 2015 21:07:02 GMT) Full text and rfc822 format available.

Message #19 received at 20037 <at> debbugs.gnu.org (full text, mbox):

From: Tomáš Čech <sleep_walker <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 20037 <at> debbugs.gnu.org
Subject: Re: bug#20037: problem still persist
Date: Mon, 6 Apr 2015 23:06:39 +0200
On Sun, Apr 05, 2015 at 11:05:34PM +0200, Ludovic Courtès wrote:
>Tomáš Čech <sleep_walker <at> gnu.org> skribis:
>
>> I'm afraid I can reproduce it.
>
>It’s a different problem this time.  :-)
>
>> ----------------------%<----my-config.scm----begin---->%-------------------
>
>[...]
>
>>  (packages
>>   (append
>>    (list
>>     ;; absolutely necessary
>>     emacs lvm2 mc bash texinfo
>
>(Unrelated, but I personally find it more convenient to have only core
>packages in the global profile, and then have the rest in user
>profiles.)

(
I do agree with you, but
   emacs - default editor and interface for Guix
   lvm2 - I need it to mount filesystems
   mc - OK, this can be ommited
   bash - regardless being BASH fan and user - this de-facto standard, my
          scripts relies on bashism for speed and cleaner code (really! :)
   texinfo - I really need to access DMD and Guix manuals to be able to use
     	     them (already happened to me when I got lost without Internet
     	     connection)
)

>
>[...]
>
>>  (services
>>   (append
>>    (list
>>     (lsh-service #:port-number 22 #:root-login? #t #:initialize? #t)
>>     (slim-service)
>>     (wicd-service)
>>     (avahi-service)
>>     (dbus-service (list avahi wicd))
>>     (mingetty-service "ttyS0"))
>
>[...]
>
>>    ?: 0 [symlink "/gnu/store/z95z25d73kjza99s3w95lrdsiqlcdv0a-login" ...]
>>
>> ERROR: In procedure symlink:
>> ERROR: In procedure symlink: File exists
>
>The culprit is the ‘mingetty-service’ call above: since it uses a #:motd
>different from that used in the other ‘mingetty-service’ calls in
>%base-services, the thing tries to create a different pam.d/login file
>for it, but that fails because there’s already a pam.d/login file.
>
>The workaround is to write:
>
>    (mingetty-service "ttyS0"
>                      #:motd (text-file "motd" "
>This is the GNU operating system, welcome!\n\n"))

FTR (in case someone will face the same problem), text-file is in (guix store)
module so you will need to add that one as well.

>Since this is the same motd as the other mingetty services, everything
>is fine.
>
>This is of course unsatisfactory.  The more general issue is that
>service procedures need to be able to share state/configuration info,
>which I hope we can fix soon.

Thanks for your analysis. I can confirm that your workaround worked and I can
use Guix once again. Sorry for not recognizing this as another issue.

Thanks,

S_W




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 May 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 357 days ago.

Previous Next


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