All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [Qemu-devel] reporting 9pfs init errors
Date: Mon, 25 Aug 2014 11:55:34 +0400	[thread overview]
Message-ID: <53FAEBF6.5000300@msgid.tls.msk.ru> (raw)

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

             reply	other threads:[~2014-08-25  7:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25  7:55 Michael Tokarev [this message]
2014-08-26  6:05 ` [Qemu-devel] reporting 9pfs init errors Aneesh Kumar K.V

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53FAEBF6.5000300@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.