Qemu VirtFS mounts are not accessible after resuming guest from hibernation

Bug #1634852 reported by Daniel Harding
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux
New
Undecided
Unassigned

Bug Description

Host OS: Funtoo Linux
Host Kernel: 4.7.4-gentoo
Qemu Version: 2.7.0
Guest OS: Ubuntu 14.04
Guest Kernel: reproduced with both 4.4.0-42-generic and 3.13.0-98-generic

Qemu command line:

qemu-system-x86_64 \
    -machine type=pc,accel=kvm \
    -cpu host \
    -smp 3 \
    -m 8G \
    -netdev bridge,id=hn0,vhost=on \
    -device virtio-net-pci,netdev=hn0,mac=52:54:fa:70:35:f7 \
    -drive file=/dev/mapper/vg-ubuntu,format=raw,if=virtio,cache=none,discard=on \
    -virtfs local,path=/home/dharding/code,security_model=passthrough,mount_tag=code \
    -virtfs local,path=/home/dharding/xfer,security_model=passthrough,mount_tag=xfer \
    -display gtk

Relevant lines from guest /etc/fstab:
code /home/dharding/code 9p trans=virtio,version=9p2000.L,msize=262144,_netdev 0 0
xfer /home/dharding/xfer 9p trans=virtio,version=9p2000.L,msize=262144,_netdev 0 0

Steps to reproduce:
- start qemu using the above command line
- in the guest, run "sudo pm-hibernate"
- after qemu exits, run again using the same command line
- once the guest resumes from hibernation, run "ls /home/dharding/code"
- the ls command will hang forever

The ls call stack is:

[<ffffffffc00743a0>] p9_client_rpc+0x110/0x460 [9pnet]
[<ffffffffc0076a50>] p9_client_getattr_dotl+0x60/0x160 [9pnet]
[<ffffffffc009ef77>] v9fs_vfs_getattr_dotl+0x47/0xa0 [9p]
[<ffffffff81202a5c>] vfs_getattr_nosec+0x2c/0x40
[<ffffffff81202b26>] vfs_getattr+0x26/0x30
[<ffffffff81202bf5>] vfs_fstatat+0x65/0xa0
[<ffffffff8120306f>] SYSC_newstat+0x1f/0x40
[<ffffffff812032be>] SyS_newstat+0xe/0x10
[<ffffffff817fa4f6>] entry_SYSCALL_64_fastpath+0x16/0x75

Revision history for this message
Greg Kurz (gkurz) wrote :

The root cause lies in the 9pnet_virtio driver in the guest kernel: it does not support suspend/hibernation...

affects: qemu → linux
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.