* [Qemu-devel] reporting 9pfs init errors
@ 2014-08-25 7:55 Michael Tokarev
2014-08-26 6:05 ` Aneesh Kumar K.V
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2014-08-25 7:55 UTC (permalink / raw)
To: qemu-devel; +Cc: Aneesh Kumar K.V
Hello.
I've a bugreport against debian qemu package which basically
states that 9pfs does not work. After some digging it turned
out to be error reporting problem, plain and simple. The
error message is:
qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/home/stevie/Documents/PWK
qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Device initialization failed.
qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Device 'virtio-9p-pci' could not be initialized
and the actual problem is that the path is not accessible from
libvirt-spawned qemu due to permission denied (EPERM) error
returned from statfs() call.
The same happens when you mistype the pathname, or some other
problem, -- in all cases it might be very difficult to find the
actual cause, sort of strace'ing qemu process when it is at
all possible.
In this case, the prob is in hw/9pfs/virtio-9p-local.c:local_init(),
the failing syscall is statfs(). But the thing is -- this init()
method does not have Error argument to push error message, while
upper layer, hw/9pfs/virtio-9p-device.c:virtio_9p_device_realize(),
uses Error objects.
In hw/9pfs/virtio-9p-proxy.c:proxy_init() (which implements the
same init() method), there's a fprintf(stderr) which is used to
report error (not even error_report()!). (And by the way, there,
if socket init fails, there's no error reporting or checking at
all).
Should we revisit error checking and reporting for 9pfs somehow,
so it is easier for the users?
Thanks,
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] reporting 9pfs init errors
2014-08-25 7:55 [Qemu-devel] reporting 9pfs init errors Michael Tokarev
@ 2014-08-26 6:05 ` Aneesh Kumar K.V
0 siblings, 0 replies; 2+ messages in thread
From: Aneesh Kumar K.V @ 2014-08-26 6:05 UTC (permalink / raw)
To: Michael Tokarev, qemu-devel
Michael Tokarev <mjt@tls.msk.ru> writes:
> Hello.
>
> I've a bugreport against debian qemu package which basically
> states that 9pfs does not work. After some digging it turned
> out to be error reporting problem, plain and simple. The
> error message is:
>
> qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Virtio-9p Failed to initialize fs-driver with id:fsdev-fs0 and export path:/home/stevie/Documents/PWK
> qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Device initialization failed.
> qemu-system-x86_64: -device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=pwk,bus=pci.0,addr=0x7: Device 'virtio-9p-pci' could not be initialized
>
> and the actual problem is that the path is not accessible from
> libvirt-spawned qemu due to permission denied (EPERM) error
> returned from statfs() call.
I have run into that issue once and really wanted to improve the error
handling during startup. I guess we have better error handling during
runtime, ie, file system related errors are correctly mapped and
send to guest. We could definitely imporve our init error handling.
-aneesh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-08-26 6:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 7:55 [Qemu-devel] reporting 9pfs init errors Michael Tokarev
2014-08-26 6:05 ` Aneesh Kumar K.V
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 NNTP newsgroup(s).