unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw@netris.org>
Cc: George myglc2 Clemmer <myglc2@gmail.com>,
	help-guix <help-guix@gnu.org>,
	31268@debbugs.gnu.org
Subject: bug#31268: 'guix system vm-image' hangs
Date: Mon, 30 Apr 2018 16:18:20 +0200	[thread overview]
Message-ID: <87bme0ydzn.fsf@gnu.org> (raw)
In-Reply-To: <87r2mxw1ax.fsf@netris.org> (Mark H. Weaver's message of "Mon, 30 Apr 2018 04:23:02 -0400")

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

Hello Mark,

Mark H Weaver <mhw@netris.org> skribis:

> FYI, I just pushed commit 8c21c64e59d3f4d223d8aeef91f06fdde7de1ab7 which
> updates linux-libre to 4.16.6.  Would you like to see if the problem
> still persists?

It does.

I instrumented the code to see what happens.  Opening /dev/vda works
fine, invoking “parted --version” works, so it’s really just ‘parted’
that hangs when asked to do the real thing (with 0% CPU consumption.)

However, if we strace it as with the patch below, it succeeds.  It
doesn’t seem to be a simple timing issue because adding (sleep 2) before
the parted invocation doesn’t make a difference.

To be continued…

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1526 bytes --]

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 527b4c495..b73c8f912 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -242,9 +242,21 @@ actual /dev name based on DEVICE."
                                      partition-size)
                             partitions)
                        ", "))
-  (apply invoke "parted" "--script"
+  (pk 'parted (which "parted"))
+  (pk 'parted2 (stat (which "parted")))
+  (pk 'opts device partitions offset)
+  (pk 'actual-options "parted" "--script"
          device "mklabel" label-type
          (options partitions offset))
+  (pk 'stat device (stat device))
+  (invoke "parted" "--version")
+  ;; (pk 'open-device device (open-fdes device O_WRONLY))
+  (pk 'parted)
+  (apply invoke "strace" "-s" "123"
+         "parted" "--script"
+         device "mklabel" label-type
+         (options partitions offset))
+  (pk 'parted-done)
 
   ;; Set the 'device' field of each partition.
   (reverse
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 09a11af86..ba54a71dd 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -304,7 +304,7 @@ the image."
                       (ice-9 binary-ports))
 
          (let ((inputs
-                '#$(append (list qemu parted e2fsprogs dosfstools)
+                '#$(append (list strace qemu parted e2fsprogs dosfstools)
                            (map canonical-package
                                 (list sed grep coreutils findutils gawk))
                            (if register-closures? (list guix) '())))

  parent reply	other threads:[~2018-04-30 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87604en3u5.fsf@gmail.com>
     [not found] ` <20180425223706.22d91e40@centurylink.net>
2018-04-26  4:07   ` 'guix system vm-image' hangs George myglc2 Clemmer
2018-04-26 14:09     ` bug#31268: " Ludovic Courtès
2018-04-30  8:23     ` Mark H Weaver
     [not found]     ` <87r2mxw1ax.fsf@netris.org>
2018-04-30 14:18       ` Ludovic Courtès [this message]
2018-04-30 16:36         ` Mark H Weaver
2018-05-18 14:22           ` Clément Lassieur
2018-05-18 16:39             ` Ludovic Courtès
2018-05-18 22:03               ` Clément Lassieur
2018-05-18 22:13                 ` Ludovic Courtès
2018-05-22 16:23               ` Ludovic Courtès
2018-05-22 18:45                 ` Efraim Flashner
2018-05-22 22:55                 ` Mark H Weaver
2018-05-23  7:27                   ` Ludovic Courtès
2018-05-23  8:23                     ` 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=87bme0ydzn.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=31268@debbugs.gnu.org \
    --cc=help-guix@gnu.org \
    --cc=mhw@netris.org \
    --cc=myglc2@gmail.com \
    /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).