* wrong type of agument... where ?
@ 2017-12-31 11:39 Catonano
2017-12-31 12:23 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Catonano @ 2017-12-31 11:39 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
In attempting to test my trytond service wit hthhis line
make check-system TESTS="trytond"
I get this errror
[...]
adding user 'guixbuilder08'...
adding user 'guixbuilder09'...
adding user 'guixbuilder10'...
adding user 'trytond'...
adding user 'postgres'...
registering public key
'/gnu/store/94y24as2zk3n3n39602vlanqb1g5j0c0-guix-0.13.0-12.0a154c1/share/guix/hydra.gnu.org.pub'...
ERROR: In procedure append:
ERROR: In procedure append: Wrong type argument in position 1 (expecting
empty list): "-c en_US.utf8"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)>
Where does this -c en_US.utf8 string come from ?
Where is append being called ?
Could I have a slighhtly more verbose error message ?
Thanks
[-- Attachment #2: Type: text/html, Size: 1318 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 11:39 wrong type of agument... where ? Catonano
@ 2017-12-31 12:23 ` Danny Milosavljevic
2017-12-31 13:04 ` Catonano
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2017-12-31 12:23 UTC (permalink / raw)
To: Catonano; +Cc: guix-devel
Hi Catonano,
On Sun, 31 Dec 2017 12:39:07 +0100
Catonano <catonano@gmail.com> wrote:
> In attempting to test my trytond service wit hthhis line
>
> make check-system TESTS="trytond"
>
> I get this errror
>
> [...]
> adding user 'guixbuilder08'...
> adding user 'guixbuilder09'...
> adding user 'guixbuilder10'...
> adding user 'trytond'...
> adding user 'postgres'...
> registering public key
> '/gnu/store/94y24as2zk3n3n39602vlanqb1g5j0c0-guix-0.13.0-12.0a154c1/share/guix/hydra.gnu.org.pub'...
> ERROR: In procedure append:
> ERROR: In procedure append: Wrong type argument in position 1 (expecting
> empty list): "-c en_US.utf8"
>
> Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> GNU Guile 2.2.2
> Copyright (C) 1995-2017 Free Software Foundation, Inc.
>
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
>
> Enter `,help' for help.
> scheme@(guile-user)>
>
>
> Where does this -c en_US.utf8 string come from ?
> Where is append being called ?
>
> Could I have a slighhtly more verbose error message ?
Write ,bt (including the comma)
I agree, the error message could be better. Let's see where it comes from.
Or is that not an interactive REPL?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 12:23 ` Danny Milosavljevic
@ 2017-12-31 13:04 ` Catonano
2017-12-31 14:35 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Catonano @ 2017-12-31 13:04 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]
2017-12-31 13:23 GMT+01:00 Danny Milosavljevic <dannym@scratchpost.org>:
> Hi Catonano,
>
> On Sun, 31 Dec 2017 12:39:07 +0100
> Catonano <catonano@gmail.com> wrote:
>
> > In attempting to test my trytond service wit hthhis line
> >
> > make check-system TESTS="trytond"
> >
> > I get this errror
> >
> > [...]
> > adding user 'guixbuilder08'...
> > adding user 'guixbuilder09'...
> > adding user 'guixbuilder10'...
> > adding user 'trytond'...
> > adding user 'postgres'...
> > registering public key
> > '/gnu/store/94y24as2zk3n3n39602vlanqb1g5j0c0-guix-0.13.0-12.0a154c1/
> share/guix/hydra.gnu.org.pub'...
> > ERROR: In procedure append:
> > ERROR: In procedure append: Wrong type argument in position 1 (expecting
> > empty list): "-c en_US.utf8"
> >
> > Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
> > GNU Guile 2.2.2
> > Copyright (C) 1995-2017 Free Software Foundation, Inc.
> >
> > Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> > This program is free software, and you are welcome to redistribute it
> > under certain conditions; type `,show c' for details.
> >
> > Enter `,help' for help.
> > scheme@(guile-user)>
> >
> >
> > Where does this -c en_US.utf8 string come from ?
> > Where is append being called ?
> >
> > Could I have a slighhtly more verbose error message ?
>
> Write ,bt (including the comma)
>
> I agree, the error message could be better. Let's see where it comes from.
>
> Or is that not an interactive REPL?
>
Yes, there iis a REPL but
,bt
doesn't return a prrompt. It remains suspended, like this
[...]
adding user 'guixbuilder08'...
adding user 'guixbuilder09'...
adding user 'guixbuilder10'...
adding user 'trytond'...
adding user 'postgres'...
registering public key
'/gnu/store/94y24as2zk3n3n39602vlanqb1g5j0c0-guix-0.13.0-12.0a154c1/share/guix/hydra.gnu.org.pub'...
ERROR: In procedure append:
ERROR: In procedure append: Wrong type argument in position 1 (expecting
empty list): "-c en_US.utf8"
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
GNU Guile 2.2.2
Copyright (C) 1995-2017 Free Software Foundation, Inc.
Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.
Enter `,help' for help.
scheme@(guile-user)> ,bt
[-- Attachment #2: Type: text/html, Size: 3378 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 13:04 ` Catonano
@ 2017-12-31 14:35 ` Danny Milosavljevic
2017-12-31 14:48 ` Catonano
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2017-12-31 14:35 UTC (permalink / raw)
To: Catonano; +Cc: guix-devel
Is the tryton test using marionette-operating-system ?
marionette-shepherd-service seems to already try to remote-control the system - but it seems that this case has not been handled?
Check out marionette-shepherd-service in gnu/tests.scm for the general mechanism. Maybe add some (display "XXX") in there in order to find out where it goes off the deep end.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 14:35 ` Danny Milosavljevic
@ 2017-12-31 14:48 ` Catonano
2017-12-31 23:03 ` Catonano
2017-12-31 23:39 ` Danny Milosavljevic
0 siblings, 2 replies; 13+ messages in thread
From: Catonano @ 2017-12-31 14:48 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
2017-12-31 15:35 GMT+01:00 Danny Milosavljevic <dannym@scratchpost.org>:
> Is the tryton test using marionette-operating-system ?
>
I believe it is
Anyway, here's the definition of the service
https://gitlab.com/humanitiesNerd/guix-hacks/blob/trytonservice/gnu/services/trytond.scm
And here's the test
https://gitlab.com/humanitiesNerd/guix-hacks/blob/trytonservice/gnu/tests/trytond.scm
> marionette-shepherd-service seems to already try to remote-control the
> system - but it seems that this case has not been handled?
>
> Check out marionette-shepherd-service in gnu/tests.scm for the general
> mechanism. Maybe add some (display "XXX") in there in order to find out
> where it goes off the deep end
I'll take a look
Thanks
[-- Attachment #2: Type: text/html, Size: 1526 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 14:48 ` Catonano
@ 2017-12-31 23:03 ` Catonano
2017-12-31 23:39 ` Danny Milosavljevic
1 sibling, 0 replies; 13+ messages in thread
From: Catonano @ 2017-12-31 23:03 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1017 bytes --]
I made it
the first trytond test (to check if trytond is running) passed successfully
make check-system TESTS="trytond"
And it's exactly midnight !
Happy New Year !
2017-12-31 15:48 GMT+01:00 Catonano <catonano@gmail.com>:
>
>
> 2017-12-31 15:35 GMT+01:00 Danny Milosavljevic <dannym@scratchpost.org>:
>
>> Is the tryton test using marionette-operating-system ?
>>
>
> I believe it is
>
> Anyway, here's the definition of the service
> https://gitlab.com/humanitiesNerd/guix-hacks/blob/trytonservice/gnu/
> services/trytond.scm
>
> And here's the test
> https://gitlab.com/humanitiesNerd/guix-hacks/blob/trytonservice/gnu/tests/
> trytond.scm
>
>
>
>> marionette-shepherd-service seems to already try to remote-control the
>> system - but it seems that this case has not been handled?
>>
>> Check out marionette-shepherd-service in gnu/tests.scm for the general
>> mechanism. Maybe add some (display "XXX") in there in order to find out
>> where it goes off the deep end
>
>
> I'll take a look
> Thanks
>
>
>
[-- Attachment #2: Type: text/html, Size: 2245 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 14:48 ` Catonano
2017-12-31 23:03 ` Catonano
@ 2017-12-31 23:39 ` Danny Milosavljevic
2018-01-01 10:54 ` Catonano
2018-01-07 1:46 ` Chris Marusich
1 sibling, 2 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2017-12-31 23:39 UTC (permalink / raw)
To: Catonano; +Cc: guix-devel
Try this:
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 4dd740174..810a0d63f 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -507,7 +507,14 @@ to it are lost."
(switch-root "/root")
(format #t "loading '~a'...\n" to-load)
- (primitive-load to-load)
+ (catch #t
+ (lambda ()
+ (primitive-load to-load))
+ (lambda (key . args)
+ (format (current-error-port) "Error: ~a: ~a\n" key args)
+ (reboot))
+ (lambda (key . args)
+ (display-backtrace (make-stack #t) (current-error-port))))
(format (current-error-port)
"boot program '~a' terminated, rebooting~%"
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 23:39 ` Danny Milosavljevic
@ 2018-01-01 10:54 ` Catonano
2018-01-01 14:01 ` Danny Milosavljevic
2018-01-07 1:46 ` Chris Marusich
1 sibling, 1 reply; 13+ messages in thread
From: Catonano @ 2018-01-01 10:54 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2348 bytes --]
Danny,
2018-01-01 0:39 GMT+01:00 Danny Milosavljevic <dannym@scratchpost.org>:
> Try this:
>
> diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
> index 4dd740174..810a0d63f 100644
> --- a/gnu/build/linux-boot.scm
> +++ b/gnu/build/linux-boot.scm
> @@ -507,7 +507,14 @@ to it are lost."
> (switch-root "/root")
> (format #t "loading '~a'...\n" to-load)
>
> - (primitive-load to-load)
> + (catch #t
> + (lambda ()
> + (primitive-load to-load))
> + (lambda (key . args)
> + (format (current-error-port) "Error: ~a: ~a\n" key args)
> + (reboot))
> + (lambda (key . args)
> + (display-backtrace (make-stack #t)
> (current-error-port))))
>
> (format (current-error-port)
> "boot program '~a' terminated, rebooting~%"
>
thank you so much for this !
I don't know if it' s current anymore, though
In fact, I have discovered some errors I made in the code
Now the trytond test succeeds (yay !) and I don't get ushered in a REPL
anymore
There wee seveal problems
First, I hadn't pdated gnulocal.mk with my new files
gnu/services/trytond.scm
gnu/tests/trytond.scm
Also the Gexpression used in my trytond activation was garbled, so the
shepherd serrvice coldn't run
As a consequence, in the test definition this piece of code
(marionette-eval
'(begin
(use-modules (gnu services herd))
(match (start-service 'trytond)
(#f #f)
(('service response-parts ...)
(match (assq-ref response-parts 'running)
((pid) (number? pid))))))
marionette))
didn't succeed. In the match clause, the (#f #f) case ensued (I suppose)
I discovered all this by creating a virtual machine based on my trytond
branch and running it manually
After I fixed all these glitches, the system test run as a charm
So now I'm a bit overwhelmed and I don't know if your suggestion is still
currrent
I can tell you, though, that I feel very reassured by the fact that someone
tried to help me out !
I'll keep your suggestion in mind, should I have any further problems with
the marionette service
Happy New Year !
Ciao
Cato
[-- Attachment #2: Type: text/html, Size: 3949 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2018-01-01 10:54 ` Catonano
@ 2018-01-01 14:01 ` Danny Milosavljevic
0 siblings, 0 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2018-01-01 14:01 UTC (permalink / raw)
To: Catonano; +Cc: guix-devel
Hi Catonano,
On Mon, 1 Jan 2018 11:54:50 +0100
Catonano <catonano@gmail.com> wrote:
> thank you so much for this !
You're welcome.
> I don't know if it' s current anymore, though
It's always good to improve the error reporting. I'll try to get it into guix master (bug 29922).
> Now the trytond test succeeds (yay !) and I don't get ushered in a REPL
> anymore
Nice :)
Happy new year!
Cheers,
Danny
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2017-12-31 23:39 ` Danny Milosavljevic
2018-01-01 10:54 ` Catonano
@ 2018-01-07 1:46 ` Chris Marusich
2018-01-07 10:46 ` Danny Milosavljevic
1 sibling, 1 reply; 13+ messages in thread
From: Chris Marusich @ 2018-01-07 1:46 UTC (permalink / raw)
To: Danny Milosavljevic; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]
Danny Milosavljevic <dannym@scratchpost.org> writes:
> Try this:
>
> diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
> index 4dd740174..810a0d63f 100644
> --- a/gnu/build/linux-boot.scm
> +++ b/gnu/build/linux-boot.scm
> @@ -507,7 +507,14 @@ to it are lost."
> (switch-root "/root")
> (format #t "loading '~a'...\n" to-load)
>
> - (primitive-load to-load)
> + (catch #t
> + (lambda ()
> + (primitive-load to-load))
> + (lambda (key . args)
> + (format (current-error-port) "Error: ~a: ~a\n" key args)
> + (reboot))
> + (lambda (key . args)
> + (display-backtrace (make-stack #t) (current-error-port))))
>
> (format (current-error-port)
> "boot program '~a' terminated, rebooting~%"
>
In some other languages (e.g., Java, Python), we get stack traces by
default when an unhandled exception is thrown. Is this not the case in
Guile?
--
Chris
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2018-01-07 1:46 ` Chris Marusich
@ 2018-01-07 10:46 ` Danny Milosavljevic
2018-01-07 23:22 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2018-01-07 10:46 UTC (permalink / raw)
To: Chris Marusich; +Cc: guix-devel
Hi Chris,
On Sat, 06 Jan 2018 17:46:46 -0800
Chris Marusich <cmmarusich@gmail.com> wrote:
> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> > Try this:
> >
> > diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
> > index 4dd740174..810a0d63f 100644
> > --- a/gnu/build/linux-boot.scm
> > +++ b/gnu/build/linux-boot.scm
> > @@ -507,7 +507,14 @@ to it are lost."
> > (switch-root "/root")
> > (format #t "loading '~a'...\n" to-load)
> >
> > - (primitive-load to-load)
> > + (catch #t
> > + (lambda ()
> > + (primitive-load to-load))
> > + (lambda (key . args)
> > + (format (current-error-port) "Error: ~a: ~a\n" key args)
> > + (reboot))
> > + (lambda (key . args)
> > + (display-backtrace (make-stack #t) (current-error-port))))
> >
> > (format (current-error-port)
> > "boot program '~a' terminated, rebooting~%"
> >
>
> In some other languages (e.g., Java, Python), we get stack traces by
> default when an unhandled exception is thrown. Is this not the case in
> Guile?
It is the case in Guile, too. But Guile does even more - it automatically drops you into a debugger prompt. Then the tester VM hangs waiting for keyboard input (typing a debugger command) - which we
(1) don't want to provide (we want it to fail the unit test automatically and not only after writing "please fail the unit test already" there) and
(2) can't provide through the Makefile (right now).
Also, we already catch some other exceptions in (guix ui) - and I wanted to pre-empt that.
Also, for some reason, directly modifying (guix ui) (see "call-with-error-handling") to handle our new error doesn't work.
I tried extending (guix ui) to print a message and that message doesn't appear at runtime either for (gnu build linux-boot) - but visual source code inspection says that (gnu build linux-boot) DOES use (guix ui)'s call-with-error-handling. No idea what's up with that. Maybe some not-rebuilding problem.
Every testing round (in this thread, Catonano describes how to test it) takes hours on my computer so if I find a better way it will be by doing a little, from time to time, over weeks. But a quick workaround is the above.
Furthermore, the automatic stack trace printer (which is the same as display-backtrace) does some ellipsizing (to keep the total line length under 78 characters or something) and omits valuable information in the stack trace (cuts strings etc). I don't know what's the idea with omitting half the stuff in information meant only for *programmers* in the first place.
Therefore, I put a better stack trace printer into bug# 29922 - which is otherwise similar in approach to what I did in this thread here.
Also, I think that there's a further bug in Guix in that marionette-operating-system (which is only used for testing) doesn't even exit on guest kernel panic (it just hangs there forever). I've also includes a fix for that in the same patch.
I think it's necessary to improve error handling - errors in error handling drive me up a wall. If some contributor already has to battle his own error, we shouldn't prevent him from finding it by our errors :)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2018-01-07 10:46 ` Danny Milosavljevic
@ 2018-01-07 23:22 ` Danny Milosavljevic
2018-01-08 18:36 ` Danny Milosavljevic
0 siblings, 1 reply; 13+ messages in thread
From: Danny Milosavljevic @ 2018-01-07 23:22 UTC (permalink / raw)
Cc: guix-devel
> Also, for some reason, directly modifying (guix ui) (see "call-with-error-handling") to handle our new error doesn't work.
Aha, it's using a released "guix" package in the test VM. Where can I change that to "guix-devel"?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: wrong type of agument... where ?
2018-01-07 23:22 ` Danny Milosavljevic
@ 2018-01-08 18:36 ` Danny Milosavljevic
0 siblings, 0 replies; 13+ messages in thread
From: Danny Milosavljevic @ 2018-01-08 18:36 UTC (permalink / raw)
Cc: guix-devel
> > Also, for some reason, directly modifying (guix ui) (see "call-with-error-handling") to handle our new error doesn't work.
>
> Aha, it's using a released "guix" package in the test VM. Where can I change that to "guix-devel"?
(services (modify-services (operating-system-user-services %trytond-os)
(guix-service-type config =>
(guix-configuration
(inherit config)
(guix (current-guix)))))))
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2018-01-08 18:36 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-31 11:39 wrong type of agument... where ? Catonano
2017-12-31 12:23 ` Danny Milosavljevic
2017-12-31 13:04 ` Catonano
2017-12-31 14:35 ` Danny Milosavljevic
2017-12-31 14:48 ` Catonano
2017-12-31 23:03 ` Catonano
2017-12-31 23:39 ` Danny Milosavljevic
2018-01-01 10:54 ` Catonano
2018-01-01 14:01 ` Danny Milosavljevic
2018-01-07 1:46 ` Chris Marusich
2018-01-07 10:46 ` Danny Milosavljevic
2018-01-07 23:22 ` Danny Milosavljevic
2018-01-08 18:36 ` Danny Milosavljevic
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).