Received: from eggs.gnu.org ([2001:4830:134:3::10]:60304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnPVt-0005AZ-7I for qemu-devel@nongnu.org; Mon, 13 Mar 2017 08:55:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnPVo-0003Rq-Am for qemu-devel@nongnu.org; Mon, 13 Mar 2017 08:55:49 -0400 Received: from indium.canonical.com ([91.189.90.7]:54620) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnPVo-0003Rc-4g for qemu-devel@nongnu.org; Mon, 13 Mar 2017 08:55:44 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1cnPVm-0000u3-Sj for ; Mon, 13 Mar 2017 12:55:43 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 2E5472E80C0 for ; Mon, 13 Mar 2017 12:55:41 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 13 Mar 2017 12:48:12 -0000 From: Leo Gaspard <1672365@bugs.launchpad.net> Reply-To: Bug 1672365 <1672365@bugs.launchpad.net> Sender: bounces@canonical.com References: <20170313123815.23571.92915.malonedeb@gac.canonical.com> Message-Id: <20170313124813.25399.44473.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1672365] Re: nested 9pfs read fail List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Oh, I forgot to mention: it first worked for some time, then in the middle of a shell session running over a screen /var/lib/vm/consoles/nginx/screen from the outer VM (socat-linked to /var/lib/vm/consoles/nginx/socket.unix to provide a predictable pty link), the 9pfs stopped returning any data, and it didn't go away after a reboot of the inner VM, as it then no longer managed to boot. I was unfortunately unable to identify exactly which operation caused the thing to "stop working", but I'd say it is due to zsh's path-full autocompletion in paths including directories with ~700 entries, without being certain of that. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1672365 Title: nested 9pfs read fail Status in QEMU: New Bug description: tl;dr: A virtfs read fails. The init being on this virtfs (mounted by the initrd), the linux kernel guest is unable to boot, and kernel panics. The fact that qemu still takes 100%cpu after the kernel panic makes me think it's a qemu bug. Here is the setup (some hashes replaced with "..."): * A (NixOS) host system, with /nix/store as a btrfs on lvm on cryptsetup * Running a qemu-kvm NixOS guest, with /nix/.ro-store as a virtfs mappin= g to host /nix/store: ``` exec /nix/store/...-qemu-x86-only-for-vm-tests-2.8.0/bin/qemu-kvm \ -name test \ -m 8192 \ -cpu kvm64 \ -net nic,vlan=3D0,model=3Dvirtio -net user,vlan=3D0 \ -virtfs local,path=3D/nix/store,security_model=3Dnone,mount_tag=3Dsto= re \ -virtfs local,path=3D/tmp/nix-vm..../xchg,security_model=3Dnone,mount= _tag=3Dxchg \ -virtfs local,path=3D/tmp/nix-vm..../xchg,security_model=3Dnone,mount= _tag=3Dshared \ -drive index=3D0,id=3Ddrive1,file=3D/home/ekleog/nixos/test.qcow2,if= =3Dvirtio,cache=3Dwriteback,werror=3Dreport \ -kernel /nix/store/...-nixos-system-test-17.09.git.deee8da/kernel \ -initrd /nix/store/...-nixos-system-test-17.09.git.deee8da/initrd \ -append "$(cat /nix/store/...-nixos-system-test-17.09.git.deee8da/kernel-= params) init=3D/nix/store/...-nixos-system-test-17.09.git.deee8da/init regI= nfo=3D/nix/store/...-reginfo" \ -vga std -usbdevice tablet ``` * With /nix/store as an overlayfs between /nix/.ro-store and /nix/.rw-st= ore * Running a qemu-kvm NixOS guest, with /nix/.ro-store as a virtfs mappin= g to host /nix/store/...-vm-nginx-store: ``` /nix/store/...-qemu-2.8.0/bin/qemu-kvm \ -name nginx -m 128 -smp 2 -cpu kvm64 \ -nographic -serial unix:"/var/lib/vm/consoles/nginx/socket.unix",server= ,nowait \ -drive file=3D"/var/lib/vm/images/nginx.img",if=3Dvirtio,media=3Ddisk \ -virtfs local,path=3D"/nix/store/...-vm-nginx-store",security_model=3Dn= one,mount_tag=3Dstore \ -netdev type=3Dtap,id=3Dnet0,ifname=3Dvm-nginx,script=3Dno,dscript=3Dno= -device virtio-net-pci,netdev=3Dnet0,mac=3D56:00:00:00:00:01 \ -kernel /nix/store/...-nixos-system-nginx-17.09.git.deee8da/kernel \ -initrd /nix/store/...-nixos-system-nginx-17.09.git.deee8da/initrd \ -append "$(cat /nix/store/...-nixos-system-nginx-17.09.git.deee8da/kern= el-params) init=3D/nix/store/...-nixos-system-nginx-17.09.git.deee8da/init = console=3DttyS0 boot.shell_on_fail" \ -virtfs local,path=3D"/var/lib/vm/persist/nginx/home",security_model=3D= mapped-xattr,mount_tag=3D"shared1" \ -virtfs local,path=3D"/var/lib",security_model=3Dmapped-xattr,mount_tag= =3D"shared2" \ -virtfs local,path=3D"/tmp",security_model=3Dmapped-xattr,mount_tag=3D"= shared3" ``` * With /nix/store as an overlayfs between /nix/.ro-store and /nix/.rw-st= ore * With init in /nix/store What happens is that at boot time the inner VM doesn't manage to read the init script after the initrd has mounted the 9pfs and overlayfs. What makes me think it's a qemu bug is that htop in the outer VM shows the inner VM's qemu as using 100% cpu, despite the fact the kernel it's running is under kernel panic, thus doing nothing. What do you think about this? To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1672365/+subscriptions