From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>,
"Jason J . Herne" <jjherne@linux.vnet.ibm.com>,
Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2
Date: Wed, 7 Jun 2017 18:21:19 +0100 [thread overview]
Message-ID: <20170607172119.GM2099@work-vm> (raw)
In-Reply-To: <a918bec2-971e-c51f-9909-f4b7149ad98e@linux.vnet.ibm.com>
* Halil Pasic (pasic@linux.vnet.ibm.com) wrote:
>
>
> On 06/07/2017 07:10 PM, Dr. David Alan Gilbert wrote:
> > * Halil Pasic (pasic@linux.vnet.ibm.com) wrote:
> >>
> >>
> >> On 06/07/2017 02:01 PM, Dr. David Alan Gilbert wrote:
> >>> * Halil Pasic (pasic@linux.vnet.ibm.com) wrote:
> >>>>
> >>>>
> >>>> On 06/07/2017 01:07 PM, Dr. David Alan Gilbert wrote:
> >>>>> * Halil Pasic (pasic@linux.vnet.ibm.com) wrote:
> >>>>>> Verbose error reporting for the _EQUAL family. Modify the standard _EQUAL
> >>>>>> so the hint states the assertion probably failed due to a bug. Introduce
> >>>>>> _EQUAL_HINT for specifying a context specific hint.
> >>>>>>
> >>>>>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
> >>>>>
> >>>>> I'd prefer not to print 'Bug!?' by default - they already get the
> >>>>> message telling them something didn't match and the migration fails.
> >>>>> There are none-bug ways of this happening, e.g. a user starting a VM on
> >>>>> the source and destination with different configs.
> >>>>
> >>>> I admit, my objective with 'Bug!?' was to provoke. My train of thought is
> >>>> to encourage the programmer to think about and document the circumstances
> >>>> under which such an assertion is supposed to fail (and against which it
> >>>> is supposed to guard).
> >>>>
> >>>> I do not know how skillful are our users but a 4 != 5 then maybe a name
> >>>> of a vmstate field is probably quite scary and not very revealing. I doubt
> >>>> a non qemu developer can use it for something else that reporting a bug.
> >>>>
> >>>> Consequently if there are non-bug ways one can use the hint and state them.
> >>>> Your example with the misconfigured target, by the way, is IMHO also be due
> >>>> to a bug of the management software IMHO.
> >>>>
> >>>> To sum it up: IMHO the message provided by a failing _EQUAL is to ugly
> >>>> and Qemuspeak to be presented to an user-user in non-bug cases. Agree?
> >>>> Disagree?
> >>>
> >>> Disagree.
> >>>
> >>> I don't mind giving field names etc; they make it easy for us as
> >>> developers to track down what's happening, but also sometimes they help
> >>> endusers work around a prolem or see where the problem is; of course
> >>> that varies depending on the field name, but some of our names are
> >>> reasonable (e.g. there's a VMSTATE_INT32_EQUAL on 'queue_size' in
> >>> vmmouse.c). They're also pretty good if two end users hit the same
> >>> problem they can see the same error message in a bug report.
> >>>
> >>> We often have customer-facing support people look at logs before they
> >>> get as far as us developers; if we have bugs that are
> >>> 'if it's a failing BLAH device complaining about the BAR field'
> >>> then this fixes it, then that helps them find workarounds/fixes quickly
> >>> even if they don't understand what the BAR field is.
> >>>
> >>
> >> You seem to forget, that I'm not proposing omitting this information,
> >> but extending it with something civilized so one can distinguish between
> >> an assert failed should have never happened situation an a as good as
> >> reasonable error handling for an expected error scenario. IMHO the current
> >> EQUAL looks more like the former (assert) and less like the later (error
> >> reporting for an expected error scenario). Agree? Dissagree?
> >
> > Yes, the current EQUAL is very terse; but we can't actually tell from
> > the use which case it is; it'll all work nicely when people actually add
> > the correct hint text in useful locations.
> >
>
> You are right.
>
> Since Juan also requested the adding an extra param to the original
> macros variant I will go with that.
>
> I shied away form it in the first place because I did not want to
> bother the users of the macros without clarifying with the migration
> gurus how the new interface should look like.
If you just make the existing callers pass NULL then that's fine.
Dave
> Thanks a lot!
>
> Regards,
> Halil
>
> >> Having a field name is great! That's beyond discussion.
> >>
> >> I see, my 'sum it up' above was a bit unfortunate: it sounds like I'm
> >> against the inclusion of technical info and not against a lack of non
> >> technical info. Sorry for that!
> >
> > No, that's fine.
> >
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2017-06-07 17:21 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 16:55 [Qemu-devel] [RFC PATCH 0/3] vmstate: error hint for failed equal checks Halil Pasic
2017-06-06 16:55 ` [Qemu-devel] [RFC PATCH 1/3] " Halil Pasic
2017-06-07 9:51 ` Dr. David Alan Gilbert
2017-06-08 11:05 ` Halil Pasic
2017-06-14 13:51 ` Halil Pasic
2017-06-22 8:22 ` Dr. David Alan Gilbert
2017-06-22 13:18 ` Halil Pasic
2017-06-22 17:06 ` Dr. David Alan Gilbert
2017-06-29 19:04 ` Eric Blake
2017-06-30 14:41 ` Halil Pasic
2017-06-30 14:54 ` Eric Blake
2017-06-30 16:10 ` Halil Pasic
2017-07-03 13:52 ` Markus Armbruster
2017-07-03 16:21 ` Halil Pasic
2017-07-04 6:42 ` Markus Armbruster
2017-07-04 11:25 ` Halil Pasic
2017-06-06 16:55 ` [Qemu-devel] [RFC PATCH 2/3] vmstate: error hint for failed equal checks part 2 Halil Pasic
2017-06-07 11:07 ` Dr. David Alan Gilbert
2017-06-07 11:30 ` Halil Pasic
2017-06-07 12:01 ` Dr. David Alan Gilbert
2017-06-07 12:19 ` Halil Pasic
2017-06-07 17:10 ` Dr. David Alan Gilbert
2017-06-07 17:18 ` Halil Pasic
2017-06-07 17:21 ` Dr. David Alan Gilbert [this message]
2017-06-07 16:35 ` Juan Quintela
2017-06-07 16:56 ` Halil Pasic
2017-06-06 16:55 ` [Qemu-devel] [RFC PATCH 3/3] s390x/css: add hint for devno missmatch Halil Pasic
2017-06-07 11:22 ` Dr. David Alan Gilbert
2017-06-07 11:47 ` Halil Pasic
2017-06-07 12:07 ` Dr. David Alan Gilbert
2017-06-07 16:37 ` Juan Quintela
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=20170607172119.GM2099@work-vm \
--to=dgilbert@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).