Guix Cuirass Issue with Input channels

  • Done
  • quality assurance status badge
Details
4 participants
  • Clément Lassieur
  • Ludovic Courtès
  • Reza Alizadeh Majd
  • Glenn Morris
Owner
unassigned
Submitted by
Reza Alizadeh Majd
Severity
normal

Debbugs page

Reza Alizadeh Majd wrote 6 years ago
(address . bug-guix@gnu.org)
f3f783bf-05d4-4aa1-a854-9c8a76aac6af@www.fastmail.com
Package: cuirass

adding additional inputs to cuirass specification with name started with `p` letter, fails the evaluation of specification.


considering following specification:

Toggle snippet (22 lines)
(list
'((#:name . "hello-spec")
(#:load-path-inputs . ("guix"))
(#:package-path-inputs . ())
(#:proc-input ."guix")
(#:proc-file . "build-aux/cuirass/gnu-system.scm")
(#:proc . cuirass-jobs)
(#:proc-args . ((subset . "hello")
(systems . ("x86_64-linux"))))
(#:inputs . (((#:name . "guix")
(#:url . "git://git.savannah.gnu.org/guix.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))
((#:name . "pkginput")
(#:url . "git://git.savannah.gnu.org/guix/guix-cuirass.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))
))))

we receive following error:

Toggle snippet (49 lines)
root@panther ~/ci# cuirass --listen=0.0.0.0 --port=8082 -D test.db -S tttt.scm
...
2019-06-25T19:17:33 fetching input 'guix' of spec 'hello-spec'
2019-06-25T19:17:33 fetching input 'pkginput' of spec 'hello-spec'
2019-06-25T19:17:35 fetched input 'pkginput' of spec 'hello-spec' (commit "fed15b83b0b54d17057733935eb53e94e1a2c926")
2019-06-25T19:17:35 fetched input 'guix' of spec 'hello-spec' (commit "5fbb9f0b51a1caeb86009192654f650c5cb4d167")
2019-06-25T19:17:35 next evaluation in 300 seconds
2019-06-25T19:17:35 evaluating spec 'hello-spec'
Backtrace:
17 (apply-smob/1 #<catch-closure 128b780>)
In ice-9/boot-9.scm:
705:2 16 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
619:8 15 (_ #(#(#<directory (guile-user) 1316140>)))
293:34 14 (_ #(#(#(#(#(#(#(#(#(#(#(…) …) …) …) …) …) …) …) …) …) …))
159:9 13 (_ _)
619:8 12 (_ #(#(#(#<module (#{ g18}#) 1339640>) #<store-co…> …) …))
626:19 11 (_ #(#(#(#<module (#{ g18}#) 1339640>) #<store-co…> …) …))
In guix/store.scm:
1794:24 10 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
In guix/channels.scm:
498:2 9 (_ _)
455:2 8 (_ _)
In guix/monads.scm:
482:9 7 (_ _)
In guix/store.scm:
1667:8 6 (_ _)
In guix/gexp.scm:
708:2 5 (_ _)
In guix/monads.scm:
482:9 4 (_ _)
In guix/gexp.scm:
573:13 3 (_ _)
In guix/store.scm:
1667:13 2 (_ _)
In guix/gexp.scm:
210:2 1 (lower-object #f _ #:target _)
189:36 0 (lookup-compiler #f)

guix/gexp.scm:189:36: In procedure lookup-compiler:
In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f

Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message.
2019-06-25T19:17:36 failed to evaluate spec 'hello-spec'

but by just renaming the `pkginput` to something that is not starts with `p` word like `_pkginput` spec evaluation will succeed.


Toggle snippet (31 lines)
root@panther ~/ci# cuirass --listen=0.0.0.0 --port=8082 -D test.db -S bug.scm
...
2019-06-25T19:41:34 fetching input 'guix' of spec 'hello-spec'
2019-06-25T19:41:34 fetching input '_pkginput' of spec 'hello-spec'
2019-06-25T19:41:35 fetched input 'guix' of spec 'hello-spec' (commit "5fbb9f0b51a1caeb86009192654f650c5cb4d167")
2019-06-25T19:41:35 fetched input '_pkginput' of spec 'hello-spec' (commit "fed15b83b0b54d17057733935eb53e94e1a2c926")
2019-06-25T19:41:35 next evaluation in 300 seconds
2019-06-25T19:41:35 evaluating spec 'hello-spec'
warning:
building things during evaluation
'build-things' arguments: (("/gnu/store/h8fsfj550mikscspyg4x9fi7jgliq8qa-compute-guix-derivation.drv") 0)
Computing Guix derivation for 'x86_64-linux'... -
warning:
building things during evaluation
'build-things' arguments: (("/gnu/store/sz3l35mnfhphqnrgzg78k84chm3fys5i-profile.drv") 0)

Some deprecated features have been used. Set the environment
variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
program to get more information. Set it to "no" to suppress
this message.
2019-06-25T19:42:35 evaluation 1 for 'hello-spec' completed
2019-06-25T19:42:35 building 1 jobs for 'hello-spec'
2019-06-25T19:42:35 evaluation 1 registered 1 new derivations
2019-06-25T19:42:35 building 1 derivations in batches of 200
2019-06-25T19:42:35 building batch of 200 derivations (0/1)
2019-06-25T19:42:35 done with 1 derivations
2019-06-25T19:42:35 outputs:
/gnu/store/md2plii4g5sk66wg9cgwc964l3xwhrm9-hello-2.10
2019-06-25T19:42:35 success: 1, fail: 0

--
Reza
Glenn Morris wrote 6 years ago
control message for bug 36378
(address . control@debbugs.gnu.org)
E1hfo0P-0007a6-Pi@fencepost.gnu.org
reassign 36378 guix
Ludovic Courtès wrote 6 years ago
Re: bug#36378: Guix Cuirass Issue with Input channels
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 36378@debbugs.gnu.org)
87ftnqunu2.fsf@gnu.org
Hello Reza,

"Reza Alizadeh Majd" <r.majd@pantherx.org> skribis:

Toggle quote (4 lines)
> Package: cuirass
>
> adding additional inputs to cuirass specification with name started with `p` letter, fails the evaluation of specification.

[...]

Toggle quote (44 lines)
> 2019-06-25T19:17:35 evaluating spec 'hello-spec'
> Backtrace:
> 17 (apply-smob/1 #<catch-closure 128b780>)
> In ice-9/boot-9.scm:
> 705:2 16 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
> In ice-9/eval.scm:
> 619:8 15 (_ #(#(#<directory (guile-user) 1316140>)))
> 293:34 14 (_ #(#(#(#(#(#(#(#(#(#(#(…) …) …) …) …) …) …) …) …) …) …))
> 159:9 13 (_ _)
> 619:8 12 (_ #(#(#(#<module (#{ g18}#) 1339640>) #<store-co…> …) …))
> 626:19 11 (_ #(#(#(#<module (#{ g18}#) 1339640>) #<store-co…> …) …))
> In guix/store.scm:
> 1794:24 10 (run-with-store _ _ #:guile-for-build _ #:system _ # _)
> In guix/channels.scm:
> 498:2 9 (_ _)
> 455:2 8 (_ _)
> In guix/monads.scm:
> 482:9 7 (_ _)
> In guix/store.scm:
> 1667:8 6 (_ _)
> In guix/gexp.scm:
> 708:2 5 (_ _)
> In guix/monads.scm:
> 482:9 4 (_ _)
> In guix/gexp.scm:
> 573:13 3 (_ _)
> In guix/store.scm:
> 1667:13 2 (_ _)
> In guix/gexp.scm:
> 210:2 1 (lower-object #f _ #:target _)
> 189:36 0 (lookup-compiler #f)
>
> guix/gexp.scm:189:36: In procedure lookup-compiler:
> In procedure struct_vtable: Wrong type argument in position 1 (expecting struct): #f
>
> Some deprecated features have been used. Set the environment
> variable GUILE_WARN_DEPRECATED to "detailed" and rerun the
> program to get more information. Set it to "no" to suppress
> this message.
> 2019-06-25T19:17:36 failed to evaluate spec 'hello-spec'
>
>
> but by just renaming the `pkginput` to something that is not starts with `p` word like `_pkginput` spec evaluation will succeed.

I find it hard to believe this has anything to do with the name starting
with ‘p’.

If you change back from ‘_pkginput’ to ‘pkginput’, does it fail again?

Thanks,
Ludo’.
Reza Alizadeh Majd wrote 6 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 36378@debbugs.gnu.org)
1b114de6-5918-4878-afb5-d9884334dcea@www.fastmail.com
Hi Ludo,


Toggle quote (7 lines)
>
> I find it hard to believe this has anything to do with the name starting
> with ‘p’.
>
> If you change back from ‘_pkginput’ to ‘pkginput’, does it fail again?
>

yes, renaming the input name back to `pkginput` I received same error
again.

It is so strange for me, but I had various tests, and received same results
on each attempt.

steps to reproduce this issue:

1. install GuixSD on a virtual machine
2. update package repository using `guix pull`
3. install cuirass using `guix package -i cuirass`
4. create an spec file with following contents:

Toggle snippet (21 lines)
(list
'((#:name . "hello-spec")
(#:load-path-inputs . ("guix"))
(#:package-path-inputs . ())
(#:proc-input . "guix")
(#:proc-file . "build-aux/cuirass/gnu-system.scm")
(#:proc . cuirass-jobs)
(#:proc-args . ((subset . ("hello" "wget"))
(systems . ("x86_64-linux"))))
(#:inputs . (((#:name . "guix")
(#:url . "git://git.savannah.gnu.org/guix.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))
((#:name . "pkginput")
(#:url . "git://git.savannah.gnu.org/guix/guix-cuirass.git")
(#:load-path . ".")
(#:branch . "master")
(#:no-compile? . #t))))))

5. run cuirass manually using following command shows the issue:
`cuirass --listen=0.0.0.0 --port=8082 -D test.db -S spec.scm`

6. removing the `test.db` and rename the `pkginput` to `_pkginput`
cuirass starts without problem.

7. restore back the name of `_pkginput` to `pkginput`, remove the
`test.db` file, and re run the cuirass, same error occurs again.


Best,
Reza
Reza Alizadeh Majd wrote 6 years ago
bug#36378: Guix Cuirass Issue with Input channels
(address . 36378@debbugs.gnu.org)
82be6b2a-8762-4894-bb29-71acc482b43b@www.fastmail.com
Hi,

Does anyone checked steps to reproduce this issue?
Is it occur for anyone else?

Best,
Reza
Clément Lassieur wrote 5 years ago
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(name . Ludovic Court ès)(address . ludo@gnu.org)(address . 36378@debbugs.gnu.org)
87sgmnxm4d.fsf@lassieur.org
Hi Reza and Ludo,

Reza Alizadeh Majd <r.majd@pantherx.org> writes:

Toggle quote (3 lines)
> adding additional inputs to cuirass specification with name started
> with `p` letter, fails the evaluation of specification.

Thank you for reporting this! It actually fails with names that come
after the first input (in this case: "guix") in alphabetical order.

Toggle quote (23 lines)
> considering following specification:
>
> (list
> '((#:name . "hello-spec")
> (#:load-path-inputs . ("guix"))
> (#:package-path-inputs . ())
> (#:proc-input ."guix")
> (#:proc-file . "build-aux/cuirass/gnu-system.scm")
> (#:proc . cuirass-jobs)
> (#:proc-args . ((subset . "hello")
> (systems . ("x86_64-linux"))))
> (#:inputs . (((#:name . "guix")
> (#:url . "git://git.savannah.gnu.org/guix.git")
> (#:load-path . ".")
> (#:branch . "master")
> (#:no-compile? . #t))
> ((#:name . "pkginput")
> (#:url . "git://git.savannah.gnu.org/guix/guix-cuirass.git")
> (#:load-path . ".")
> (#:branch . "master")
> (#:no-compile? . #t))
> ))))

It's because the 'proc' you use (CUIRASS-JOBS, from the Guix
repository), interprets the first input it finds as a Guix checkout.
There's a comment about this[1]:

;; Extract metadata about the 'guix' checkout. Its key in ARGUMENTS may
;; vary, so pick up the first one that's neither 'subset' nor 'systems'.

The argument list you sent to 'proc' looked like this:

'((pkginput
(no-compile? . #t)
(load-path . ".")
(revision . "8bf095fc503ddac18a9457e1379e497ae16324fa")
(file-name . "/gnu/store/fcq3axxh5kpva6kphi58ibklfz4wnbnr-cuirass-8bf095f"))
(guix
(no-compile? . #t)
(load-path . ".")
(revision . "3e9ca3358a8cfffaeb4997389bb767065e70876a")
(file-name . "/gnu/store/5nmsf6464vhdifmvzassp3b3cwfis5j4-guix-3e9ca33"))
(subset . "hello"))

so the 'proc' thought 'pkginput' was a Guix checkout and tried to build
Guix with a Cuirass source, which obviously doesn't work. (It fails
line 60 of [1].)

If the input name were "cuirass" instead of "pkginput", you would have
sent:

'((guix
(no-compile? . #t)
(load-path . ".")
(revision . "3e9ca3358a8cfffaeb4997389bb767065e70876a")
(file-name . "/gnu/store/5nmsf6464vhdifmvzassp3b3cwfis5j4-guix-3e9ca33"))
(cuirass
(no-compile? . #t)
(load-path . ".")
(revision . "8bf095fc503ddac18a9457e1379e497ae16324fa")
(file-name . "/gnu/store/fcq3axxh5kpva6kphi58ibklfz4wnbnr-cuirass-8bf095f"))
(subset . "hello"))

And it would have worked.

So it's indeed a bug in Guix, introduced by commit
b5f8c2c88543158e8aca76aa98f9009f6b9e743a (hydra: Compute jobs in an
inferior). We can't just take the first input we find, build it and
open an inferior for it. I believe we should take the input whose name
is "guix" (as we do with manifests[2]).

What do you think?

Clément

Clément Lassieur wrote 5 years ago
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(name . Ludovic Court ès)(address . ludo@gnu.org)(address . 36378@debbugs.gnu.org)
8736empyqj.fsf@lassieur.org
Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (6 lines)
> So it's indeed a bug in Guix, introduced by commit
> b5f8c2c88543158e8aca76aa98f9009f6b9e743a (hydra: Compute jobs in an
> inferior). We can't just take the first input we find, build it and
> open an inferior for it. I believe we should take the input whose name
> is "guix" (as we do with manifests[2]).

Well, we need something a bit more subtle, because in
https://ci.guix.infoGuix inputs are named "core-updates", "guix",
"guix-modular", "staging", "version-1.0.0", "version-1.0.1",
"wip-haskell-updates".
Clément Lassieur wrote 5 years ago
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(name . Ludovic Court ès)(address . ludo@gnu.org)(address . 36378@debbugs.gnu.org)
878soe7a1r.fsf@lassieur.org
Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (11 lines)
>> So it's indeed a bug in Guix, introduced by commit
>> b5f8c2c88543158e8aca76aa98f9009f6b9e743a (hydra: Compute jobs in an
>> inferior). We can't just take the first input we find, build it and
>> open an inferior for it. I believe we should take the input whose name
>> is "guix" (as we do with manifests[2]).
>
> Well, we need something a bit more subtle, because in
> https://ci.guix.info Guix inputs are named "core-updates", "guix",
> "guix-modular", "staging", "version-1.0.0", "version-1.0.1",
> "wip-haskell-updates".

Attached is a patch that makes sure the checkout is from the Guix input
providing the 'proc'.

I'm not sure about one thing: in gnu/ci.scm I call FIND-CURRENT-CHECKOUT
in case the current Guix is not an inferior. But I don't know if it can
happen. If it can't happen, we could just do:

(define checkout
(assq-ref arguments 'superior-guix-checkout))

What do you think?
Clément
Clément Lassieur wrote 5 years ago
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 36378@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87zhgdk607.fsf@lassieur.org
Hi,

Clément Lassieur <clement@lassieur.org> writes:

Toggle quote (3 lines)
> Attached is a patch that makes sure the checkout is from the Guix input
> providing the 'proc'.

I'll push this tomorrow if nobody objects.

Thanks,
Clément
Clément Lassieur wrote 5 years ago
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 36378-done@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
871rtotjxw.fsf@lassieur.org
Pushed, closing.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 36378@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 36378
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help