unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 47172@debbugs.gnu.org
Subject: bug#47172: Shepherd 0.8.1 tests fail on core-updates
Date: Sun, 23 May 2021 12:25:27 +0200	[thread overview]
Message-ID: <87zgwl4ui0.fsf@gnu.org> (raw)
In-Reply-To: <37305bfa08faea95b45a6496623154c2ebab1f11.camel@zaclys.net> ("Léo Le Bouter"'s message of "Mon, 15 Mar 2021 19:51:24 +0100")

Hi there,

Léo Le Bouter <lle-bout@zaclys.net> skribis:

> Some tests fail:
>
> FAIL: tests/no-home.sh
> FAIL: tests/status-sexp.sh
> PASS: tests/misbehaved-client.sh

[...]

> It seems this is due to guile 3.0.5, GNU Shepherd 0.8.1 does not work
> with it, it works with guile 3.0.2 however.

This turns out to be due to a… miscompilation bug.

In (shepherd scripts herd), ‘run-command’ has this code:

  (let ((sock    (open-connection socket-file))
        (action* (if (and (eq? action 'detailed-status)
                          (memq service '(root shepherd)))
                     'status
                     action)))
    …)

Problem is that everything works as if (eq? action 'detailed-status)
was omitted, such that ‘herd stop root’ is interpreted as ‘herd status
root’.

Simply wrapping the condition in (pk …) “fixes” the problem.

The peval output looks good (it contains the 'detailed-status
comparison), but the assembly seems to lack the 'detailed-status
comparison altogether:

--8<---------------cut here---------------start------------->8---
Disassembly of <unnamed function> at #x29e0:

   0    (instrument-entry 15700)                              at shepherd/scripts/herd.scm:127:2
   2    (assert-nargs-ee/locals 1 11)   ;; 12 slots (0 args)
   3    (static-ref 10 15369)           ;; #f                 at shepherd/scripts/herd.scm:128:19
   5    (immediate-tag=? 10 7 0)        ;; heap-object?
   7    (je 9)                          ;; -> L1
   8    (static-ref 10 14166)           ;; #f
  10    (static-ref 9 15372)            ;; open-connection
  12    (call-scm<-scm-scm 10 10 9 111) 
  14    (static-set! 10 15358)          ;; #f
L1:
  16    (scm-ref/immediate 7 10 1)      
  17    (scm-ref/immediate 6 11 2)      
  18    (handle-interrupts)                                   at shepherd/scripts/herd.scm:128:18
  19    (call 4 2)                      
  21    (receive 1 4 12)                
  23    (scm-ref/immediate 9 11 3)      
  24    (static-ref 8 15360)            ;; #f                 at shepherd/scripts/herd.scm:134:6
  26    (immediate-tag=? 8 7 0)         ;; heap-object?
  28    (je 9)                          ;; -> L2
  29    (static-ref 8 14145)            ;; #f
  31    (static-ref 7 15363)            ;; write-command
  33    (call-scm<-scm-scm 8 8 7 111)   
  35    (static-set! 8 15349)           ;; #f
L2:
  37    (scm-ref/immediate 8 8 1)       
  38    (static-ref 7 15358)            ;; #f                 at shepherd/scripts/herd.scm:134:21
  40    (immediate-tag=? 7 7 0)         ;; heap-object?
  42    (je 9)                          ;; -> L3
  43    (static-ref 7 14131)            ;; #f
  45    (static-ref 6 15361)            ;; shepherd-command
  47    (call-scm<-scm-scm 7 7 6 111)   
  49    (static-set! 7 15347)           ;; #f
L3:
  51    (scm-ref/immediate 7 7 1)       
  52    (scm-ref/immediate 6 11 4)      
  53    (static-ref 5 15363)            ;; root
  55    (eq? 6 5)                       
  56    (je 5)                          ;; -> L4
  57    (static-ref 5 13655)            ;; shepherd
  59    (eq? 6 5)                       
  60    (jne 3)                         ;; -> L5
L4:
  61    (static-ref 9 15365)            ;; status             at shepherd/scripts/herd.scm:131:22
L5:
  63    (static-ref 1 15375)            ;; #:arguments        at shepherd/scripts/herd.scm:134:54
  65    (scm-ref/immediate 0 11 5)      
  66    (mov 4 7)                                             at shepherd/scripts/herd.scm:134:20
--8<---------------cut here---------------end--------------->8---

(This is compiled with 3.0.7 and the default optimizations, so -O2.)

To be continued…

Ludo’.




  parent reply	other threads:[~2021-05-23 10:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 18:51 bug#47172: GNU Shepherd 0.8.1 fails on core-updates Léo Le Bouter via Bug reports for GNU Guix
2021-03-24 13:25 ` Léo Le Bouter via Bug reports for GNU Guix
2021-05-23 10:25 ` Ludovic Courtès [this message]
2021-05-23 13:49   ` bug#47172: Shepherd 0.8.1 tests fail " Ludovic Courtès
2021-05-23 15:23     ` Marius Bakke
2021-05-23 21:43       ` Ludovic Courtès
2021-09-30  8:57       ` 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=87zgwl4ui0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=47172@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).