[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] chardev's and fd's in monitors
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] chardev's and fd's in monitors |
Date: |
Fri, 21 Oct 2016 10:45:14 +0100 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
* Markus Armbruster (address@hidden) wrote:
> "Dr. David Alan Gilbert" <address@hidden> writes:
>
> > * Markus Armbruster (address@hidden) wrote:
> >> "Daniel P. Berrange" <address@hidden> writes:
> [...]
> >> > Realistically all the major backend subsystems (chardev, network, block,
> >> > ui and migration) need to be converted to Error ** propagation, since
> >> > they all ultimately call into some common code that reports Error **.
> >>
> >> Infrastucture generally doesn't know how it's used, which means
> >> error_report() is generally wrong there. Sufficiently simple functions
> >> can keep returning -errno, null, whatever, but the interesting stuff
> >> needs to use Error.
> >> > Very few places will end up being able to stick with -errno, or plain
> >> > error_report in the long term.
> >>
> >> Not sure about "very few". Less than now. We'll see.
> >
> > I'd also prefer we got the very-few level; Migration used to be
> > characterised by getting a 'load of migration failed -22' and having
> > no clue in the logs to why; I've slowly fought back to be able
> > to get an error from the lowest level that caused the failure.
> > I want more of that, so that when someone gets a rare failure in the field
> > I can see why.
>
> When it's about details that are only useful for debugging, logging
> might be a practical alternative. No excuse for shoddy error reporting,
> of course.
It's detail I want in the initial error report rather than future debug;
to give a real example:
qemu-system-ppc64: 9223477658187168481 != 9223477658187151905
qemu-system-ppc64: Failed to load cpu:env.insns_flags
qemu-system-ppc64: error while loading state for instance 0x0 of device 'cpu'
qemu-system-ppc64: load of migration failed: Invalid argument
I wouldn't want to log the value loaded from each field unless I'm in the
pain of really bad debugging; but when one goes wrong like this getting the
value mismatch, the field name, and the device that failed is what I want
in the logs.
One point here is that those lines each come from a different function
as we come back up out of the failure; the one at the bottom doesn't
have the information on the device it's loading, just that it's loading
an integer and it's not the expected value.
Dave
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-devel] chardev's and fd's in monitors, (continued)
- Re: [Qemu-devel] chardev's and fd's in monitors, Daniel P. Berrange, 2016/10/20
- Re: [Qemu-devel] chardev's and fd's in monitors, Markus Armbruster, 2016/10/20
- Re: [Qemu-devel] chardev's and fd's in monitors, Dr. David Alan Gilbert, 2016/10/20
- Re: [Qemu-devel] chardev's and fd's in monitors, Markus Armbruster, 2016/10/21
- Re: [Qemu-devel] chardev's and fd's in monitors, Daniel P. Berrange, 2016/10/21
- Re: [Qemu-devel] chardev's and fd's in monitors, Dr. David Alan Gilbert, 2016/10/21
- Re: [Qemu-devel] chardev's and fd's in monitors,
Dr. David Alan Gilbert <=
- Re: [Qemu-devel] chardev's and fd's in monitors, Paolo Bonzini, 2016/10/19
- Re: [Qemu-devel] chardev's and fd's in monitors, Dr. David Alan Gilbert, 2016/10/19
- Re: [Qemu-devel] chardev's and fd's in monitors, Paolo Bonzini, 2016/10/19
- Re: [Qemu-devel] chardev's and fd's in monitors, Daniel P. Berrange, 2016/10/20
Re: [Qemu-devel] chardev's and fd's in monitors, Markus Armbruster, 2016/10/18
Re: [Qemu-devel] chardev's and fd's in monitors, Daniel P. Berrange, 2016/10/18