From: Kevin Wolf <kwolf@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Cc: "Fam Zheng" <fam@euphon.net>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paul Burton" <pburton@wavecomp.com>,
"Jeff Cody" <codyprime@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"Michael Roth" <mdroth@linux.vnet.ibm.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"Juan Quintela" <quintela@redhat.com>,
"Aleksandar Rikalo" <arikalo@wavecomp.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Eric Farman" <farman@linux.ibm.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Greg Kurz" <groug@kaod.org>,
"Yuval Shaia" <yuval.shaia@oracle.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"David Hildenbrand" <david@redhat.com>,
"John Snow" <jsnow@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"integration@gluster.org" <integration@gluster.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"qemu-s390x@nongnu.org" <qemu-s390x@nongnu.org>,
"Max Reitz" <mreitz@redhat.com>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v3 04/25] error: auto propagated local_err
Date: Tue, 1 Oct 2019 11:19:44 +0200 [thread overview]
Message-ID: <20191001091944.GB4688@linux.fritz.box> (raw)
In-Reply-To: <8d55df7a-abe6-bebc-a6bd-a1a2db4b8946@virtuozzo.com>
Am 01.10.2019 um 10:39 hat Vladimir Sementsov-Ogievskiy geschrieben:
> 30.09.2019 19:39, Kevin Wolf wrote:
> > Am 30.09.2019 um 18:26 hat Vladimir Sementsov-Ogievskiy geschrieben:
> >> 30.09.2019 19:00, Kevin Wolf wrote:
> >>> Am 30.09.2019 um 17:19 hat Vladimir Sementsov-Ogievskiy geschrieben:
> >>>> 30.09.2019 18:12, Kevin Wolf wrote:
> >>>>> Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben:
> >>>>>> Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of
> >>>>>> functions with errp parameter.
> >>>>>
> >>>>> A bit of bike shedding, but FOO_BEGIN suggests to me that a FOO_END will
> >>>>> follow. Can we find a different name, especially now that we won't use
> >>>>> this macro in every function that uses an errp, so even the "errp
> >>>>> function" part isn't really correct any more?
> >>>>>
> >>>>> How about ERRP_AUTO_PROPAGATE?
> >>>>
> >>>> I have an idea that with this macro we can (optionally) get the whole call stack
> >>>> of the error and print it to log, so it's good to give it more generic name, not
> >>>> limited to propagation..
> >>>
> >>> Hm, what's the context for this feature?
> >>>
> >>> The obvious one where you want to have a stack trace is &error_abort,
> >>> but that one crashes, so you get it automatically. If it's just a normal
> >>> error (like a QAPI option contains an invalid value and some function
> >>> down the call chain checks it), why would anyone want to know what the
> >>> call chain in the QEMU code was?
> >>>
> >>
> >> When I have bug from testers, call stack would be a lot more descriptive, than just
> >> an error message.
> >>
> >> We may add trace point which will print this information, so with disabled trace point
> >> - no extra output.
> >
> > But wouldn't it make much more sense then to optionally add this
> > functionality to any trace point? I really don't see how this is related
> > specifically to user-visible error messages.
>
> Interesting idea
>
> >
> > However, even if we decide that we want to have this in Error objects,
> > wouldn't it make much more sense to use the real C stack trace and save
> > it from the innermost error_set() using backtrace() or compiler
> > built-ins rather than relying on an error_propagate() chain?
> >
> Hmm, I thought about this.. And in concatenation with the fact that
> we'll have macro not everywhere, backtrace may be better..
>
> On the other hand, backtrace will not show coroutine entries..
Hm, good point. I wonder if we can easily get a stack trace not starting
at the current point, but from a jmp_buf. Then we could just switch to
the coroutine caller whenever we reach coroutine_trampoline().
But glibc doesn't seem to support this case easily, so that might mean
rewriting all of the stack unwinding inside QEMU... Maybe not then.
> OK, anyway, if we will track some additional information in
> trace-events or in macros or in error_* API functions, it's not bad to
> track some additional information in macro named ERRP_AUTO_PROPAGATE.
Yes, I think tracking the information where we use ERRP_AUTO_PROPAGATE
anyway is okay. I just wouldn't add the macro everywhere just for the
sake of the additional information.
Kevin
next prev parent reply other threads:[~2019-10-01 9:22 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 20:08 [PATCH v3 00/25] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 01/25] errp: rename errp to errp_in where it is IN-argument Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 02/25] hw/core/loader-fit: fix freeing errp in fit_load_fdt Vladimir Sementsov-Ogievskiy
2019-09-24 20:38 ` Eric Blake
2019-09-25 7:24 ` Vladimir Sementsov-Ogievskiy
2019-09-25 7:45 ` Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 03/25] net/net: fix local variable shadowing in net_client_init Vladimir Sementsov-Ogievskiy
2019-09-24 20:39 ` Eric Blake
2019-09-24 20:08 ` [PATCH v3 04/25] error: auto propagated local_err Vladimir Sementsov-Ogievskiy
2019-09-24 20:46 ` Eric Blake
2019-09-30 15:12 ` Kevin Wolf
2019-09-30 15:19 ` Vladimir Sementsov-Ogievskiy
2019-09-30 16:00 ` Kevin Wolf
2019-09-30 16:26 ` Vladimir Sementsov-Ogievskiy
2019-09-30 16:39 ` Kevin Wolf
2019-10-01 8:39 ` Vladimir Sementsov-Ogievskiy
2019-10-01 9:19 ` Kevin Wolf [this message]
2019-09-24 20:08 ` [PATCH v3 05/25] scripts: add coccinelle script to fix error_append_hint usage Vladimir Sementsov-Ogievskiy
2019-09-24 20:48 ` Eric Blake
2019-09-25 16:06 ` Vladimir Sementsov-Ogievskiy
2019-09-24 20:52 ` Eric Blake
2019-09-24 20:08 ` [PATCH v3 06/25] python: add commit-per-subsystem.py Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 07/25] s390: Fix error_append_hint usage Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 08/25] ARM TCG CPUs: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 09/25] PowerPC " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 10/25] arm: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 11/25] SmartFusion2: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 12/25] PCI: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 13/25] SCSI: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 14/25] USB: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 15/25] VFIO: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 16/25] virtio: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 17/25] virtio-9p: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 18/25] block: " Vladimir Sementsov-Ogievskiy
2019-09-24 21:03 ` Eric Blake
2019-09-24 20:08 ` [PATCH v3 19/25] chardev: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 20/25] cmdline: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 21/25] QOM: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:08 ` [PATCH v3 22/25] Migration: " Vladimir Sementsov-Ogievskiy
2019-09-24 20:09 ` [PATCH v3 23/25] Sockets: " Vladimir Sementsov-Ogievskiy
2019-09-24 21:07 ` Eric Blake
2019-09-24 20:09 ` [PATCH v3 24/25] nbd: " Vladimir Sementsov-Ogievskiy
2019-09-24 21:12 ` Eric Blake
2019-09-25 7:39 ` Vladimir Sementsov-Ogievskiy
2019-09-24 20:09 ` [PATCH v3 25/25] PVRDMA: " Vladimir Sementsov-Ogievskiy
2019-09-25 10:09 ` [PATCH v3 00/25] error: auto propagated local_err no-reply
2019-09-25 10:16 ` Vladimir Sementsov-Ogievskiy
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=20191001091944.GB4688@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=arikalo@wavecomp.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=codyprime@gmail.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=david@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=fam@euphon.net \
--cc=farman@linux.ibm.com \
--cc=groug@kaod.org \
--cc=integration@gluster.org \
--cc=jasowang@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=pburton@wavecomp.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=quintela@redhat.com \
--cc=rth@twiddle.net \
--cc=sundeep.lkml@gmail.com \
--cc=vsementsov@virtuozzo.com \
--cc=yuval.shaia@oracle.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).