GNU bug report logs - #30021
system build: unable to parse multi-line device-mapping

Previous Next

Package: guix;

Reported by: Vagrant Cascadian <vagrant <at> debian.org>

Date: Mon, 8 Jan 2018 03:25:02 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

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 30021 in the body.
You can then email your comments to 30021 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#30021; Package guix. (Mon, 08 Jan 2018 03:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vagrant Cascadian <vagrant <at> debian.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 08 Jan 2018 03:25:02 GMT) Full text and rfc822 format available.

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

From: Vagrant Cascadian <vagrant <at> debian.org>
To: bug-guix <at> gnu.org
Subject: system build: unable to parse multi-line device-mapping
Date: Sun, 07 Jan 2018 19:24:27 -0800
[Message part 1 (text/plain, inline)]
After several weeks of not using a machine, and updating guix to

guix (GNU Guix) c04ffadbed7412545555b8be6b78f23eed150d26


Running "guix build system /etc/config.scm" resulted in:

  guix system: error: failed to load '/etc/config.scm':
  /etc/config.scm:23:9: /etc/config.scm:23:9: In procedure allocate-struct: Wrong type argument in\
  position 2: 3


This roughly corresponded to my mapped device section in
/etc/config.scm:

  (mapped-devices
   (list (mapped-device
          (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74"))
          (target "cryptic")
          (type luks-device-mapping))))

Moving it all into a single line worked around the issue, but is a good
deal harder to read:

  (mapped-devices (list (mapped-device (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74")) (target "cryptic") (type luks-device-mapping))))


My guess is it has something to do with some commits relating to
validating mapped devices:

  42ff7d3be642d66ba567f64882a1f2301b1a7bd9
  mapped-devices: 'luks-device-mapping' checks its source device.

  4ca90ff5976434a2b6e758df38df54387ae70c1b 
  mapped-devices: Add 'location' and 'check' fields.


Hope that helps!

live well,
  vagrant
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#30021; Package guix. (Mon, 08 Jan 2018 05:48:02 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: Vagrant Cascadian <vagrant <at> debian.org>
Cc: 30021 <at> debbugs.gnu.org
Subject: Re: bug#30021: system build: unable to parse multi-line device-mapping
Date: Mon, 08 Jan 2018 00:46:54 -0500
Hi,

Vagrant Cascadian <vagrant <at> debian.org> writes:

> After several weeks of not using a machine, and updating guix to
>
> guix (GNU Guix) c04ffadbed7412545555b8be6b78f23eed150d26
>
>
> Running "guix build system /etc/config.scm" resulted in:
>
>   guix system: error: failed to load '/etc/config.scm':
>   /etc/config.scm:23:9: /etc/config.scm:23:9: In procedure allocate-struct: Wrong type argument in\
>   position 2: 3
>
>
> This roughly corresponded to my mapped device section in
> /etc/config.scm:
>
>   (mapped-devices
>    (list (mapped-device
>           (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74"))
>           (target "cryptic")
>           (type luks-device-mapping))))

I ran into the same problem.

> Moving it all into a single line worked around the issue, but is a good
> deal harder to read:
>
>   (mapped-devices (list (mapped-device (source (uuid "c106e43e-0479-4135-a1a8-b5221312bf74")) (target "cryptic") (type luks-device-mapping))))
>
>
> My guess is it has something to do with some commits relating to
> validating mapped devices:
>
>   42ff7d3be642d66ba567f64882a1f2301b1a7bd9
>   mapped-devices: 'luks-device-mapping' checks its source device.
>
>   4ca90ff5976434a2b6e758df38df54387ae70c1b 
>   mapped-devices: Add 'location' and 'check' fields.

You're right that it has to do with those commits, but the work around
simply involves forcing a recompilation of /etc/config.scm.  *Any*
change to config.scm would have fixed the problem, or alternatively you
could have deleted ~/.cache/guile/ccache.  In any case, you can now
reformat the mapped device section as it was before, and it will
continue to work.

What happened here is that commit 4ca90ff5 added two fields to the
<mapped-device> record type.  For efficiency reasons, the
'mapped-device' record constructor (used in /etc/config.scm) is an
*inlined* procedure.  Unfortunately this means that the compiled version
of /etc/config.scm in ~/.cache/guile/ccache was still creating the old
record type.  Guile is not able to detect this case, so the cache must
be manually invalidated somehow.

      Mark




Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Mon, 08 Jan 2018 05:50:01 GMT) Full text and rfc822 format available.

Notification sent to Vagrant Cascadian <vagrant <at> debian.org>:
bug acknowledged by developer. (Mon, 08 Jan 2018 05:50:01 GMT) Full text and rfc822 format available.

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

From: Mark H Weaver <mhw <at> netris.org>
To: Vagrant Cascadian <vagrant <at> debian.org>
Cc: 30021-done <at> debbugs.gnu.org
Subject: Re: bug#30021: system build: unable to parse multi-line device-mapping
Date: Mon, 08 Jan 2018 00:49:19 -0500
Vagrant Cascadian <vagrant <at> debian.org> writes:

> Running "guix build system /etc/config.scm" resulted in:
>
>   guix system: error: failed to load '/etc/config.scm':
>   /etc/config.scm:23:9: /etc/config.scm:23:9: In procedure allocate-struct: Wrong type argument in\
>   position 2: 3

I forgot to mention that there's already a bug filed for this issue:

  https://bugs.gnu.org/29881

I'm closing this bug now.

     Thanks,
       Mark




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

This bug report was last modified 7 years and 194 days ago.

Previous Next


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