qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Edwards <gedwards@ddn.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] char: report errors from qio_channel_{read, write}v_full
Date: Fri, 29 Sep 2017 15:59:23 -0600	[thread overview]
Message-ID: <20170929215922.GC4541@psuche> (raw)
In-Reply-To: <2e1d2e56-7969-cb58-b462-dc140c3ff91c@redhat.com>

On Fri, Sep 29, 2017 at 11:12:41AM +0200, Paolo Bonzini wrote:
> On 28/09/2017 22:52, Greg Edwards wrote:
>> Two callers of qio_channel_{read,write}v_full were not passing in an
>> Error pointer, missing any error messages from the channel class
>> io_{read,write}v methods.
>
> This is on purpose in order to avoid "spamming" the logs.  In
> particular, for sockets it can be a normal thing for the other side to
> disconnect.

Thanks for the background, Paolo.

We had encountered a vhost-user-scsi initialization failure, and were
looking for the errno from the recvmsg failure from
VHOST_USER_GET_FEATURES:

qemu-system-x86_64: -device vhost-user-scsi-pci,chardev=vus0,bootindex=2: Failed to read msg header. Read -1 instead of 12. Original request 1.
qemu-system-x86_64: -device vhost-user-scsi-pci,chardev=vus0,bootindex=2: vhost-user-scsi: vhost initialization failed: Operation not permitted

In this case, the strerror in vhost_user_scsi_realize is just reporting
on the -1 returned from the vhost_user_read failure, not the errno of
original offender.  That's what started me down this path.

Greg

      reply	other threads:[~2017-09-29 21:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 20:52 [Qemu-devel] [PATCH] char: report errors from qio_channel_{read, write}v_full Greg Edwards
2017-09-29  9:12 ` Paolo Bonzini
2017-09-29 21:59   ` Greg Edwards [this message]

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=20170929215922.GC4541@psuche \
    --to=gedwards@ddn.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.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 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).