From: Stefan Hajnoczi <stefanha@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>, Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete
Date: Fri, 18 Oct 2013 10:52:00 +0200 [thread overview]
Message-ID: <20131018085200.GH9292@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <20131017130023.GD2942@dhcp-200-207.str.redhat.com>
On Thu, Oct 17, 2013 at 03:00:23PM +0200, Kevin Wolf wrote:
> Am 17.10.2013 um 14:49 hat Stefan Hajnoczi geschrieben:
> > On Wed, Oct 16, 2013 at 08:56:49PM +0200, Max Reitz wrote:
> > > On 2013-10-15 04:23, Fam Zheng wrote:
> > > The reason I object it here is that error_propagate *currently* is a
> > > no-op. But this may change in the future: I have already sent an RFC
> > > which extends error_propagate so it can generate an error backtrace
> > > if enabled through configure. If this (or something similar which
> > > extends error_propagate to do more than basically just *errp =
> > > local_err) is merged to/implemented in qemu later on, I believe we
> > > want to call error_propagate in every function that touches an error
> > > variable in order to generate a backtrace with maximum verbosity.
> >
> > Did you check if glib's backtrace(3) APIs can be used in error_set()
> > instead of rolling our own backtrace?
> >
> > Also, what is the purpose of the backtrace? If the problem is that
> > error messages don't identify unique errors, then we should fix that
> > instead of relying on backtraces. For example, a function that opens
> > two separate files shouldn't just fail with "File not found" since we
> > don't know which of the two files wasn't found.
>
> Mostly debugging, I guess. Even if you have unique error messages that
> can only come from a single place, finding that single place by looking
> at all called functions from a given QMP command can take quite a bit of
> time. I can see it useful.
>
> And we don't even have the unique error messages yet, so we shouldn't
> fall in the trap of rejecting an improvement because it's not perfect.
Relying on a backtrace is a workaround that only helps developers, not
users. Users cannot interpret the backtrace to troubleshoot their own
problem. If developers become content with backtraces then we won't fix
the actual error messages.
Error messages are useful to both users and developers so we should
focus on them. They will reduce the amount of troubleshooting and help
that developers need to field from users who are left stuck by poor
error messages.
Stefan
next prev parent reply other threads:[~2013-10-18 8:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 2:23 [Qemu-devel] [PATCH v2] mirror: drop local_err in mirror_complete Fam Zheng
2013-10-15 3:05 ` Eric Blake
2013-10-15 3:12 ` Fam Zheng
2013-10-16 18:56 ` Max Reitz
2013-10-17 12:49 ` Stefan Hajnoczi
2013-10-17 13:00 ` Kevin Wolf
2013-10-18 8:51 ` Fam Zheng
2013-10-18 17:59 ` Max Reitz
2013-10-19 8:05 ` Kevin Wolf
2013-10-19 20:02 ` Max Reitz
2013-10-19 8:50 ` Paolo Bonzini
2013-10-18 8:52 ` Stefan Hajnoczi [this message]
2013-10-17 12:51 ` Stefan Hajnoczi
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=20131018085200.GH9292@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).