From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#31268: 'guix system vm-image' hangs Date: Mon, 30 Apr 2018 16:18:20 +0200 Message-ID: <87bme0ydzn.fsf@gnu.org> References: <87604en3u5.fsf@gmail.com> <20180425223706.22d91e40@centurylink.net> <877eoua9v1.fsf@gmail.com> <87r2mxw1ax.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD9dx-00074j-Gb for bug-guix@gnu.org; Mon, 30 Apr 2018 10:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fD9du-0006EX-9L for bug-guix@gnu.org; Mon, 30 Apr 2018 10:19:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fD9du-0006ER-4Z for bug-guix@gnu.org; Mon, 30 Apr 2018 10:19:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fD9dt-00063l-P1 for bug-guix@gnu.org; Mon, 30 Apr 2018 10:19:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87r2mxw1ax.fsf@netris.org> (Mark H. Weaver's message of "Mon, 30 Apr 2018 04:23:02 -0400") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mark H Weaver Cc: George myglc2 Clemmer , help-guix , 31268@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Mark, Mark H Weaver 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 =E2=80=9Cparted --version=E2=80=9D works, so it=E2=80=99s re= ally just =E2=80=98parted=E2=80=99 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=E2=80=99t seem to be a simple timing issue because adding (sleep 2) b= efore the parted invocation doesn=E2=80=99t make a difference. To be continued=E2=80=A6 Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline 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) '()))) --=-=-=--