[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Possible bug in monitor code
From: |
Apollon Oikonomopoulos |
Subject: |
Re: [Qemu-devel] Possible bug in monitor code |
Date: |
Fri, 24 Jan 2014 12:52:52 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Hi all,
On 12:14 Fri 24 Jan , Stratos Psomadakis wrote:
> On 01/23/2014 08:28 PM, Luiz Capitulino wrote:
> > Not yet, I may have some time tomorrow. How reproducible is it for
> > you?
>
> We can trigger it (by following the steps described in the first mail)
> consistently.
>
> > Another question: have you tried to reproduce with an old qemu version
> > (say v1.0) to see if this bug always existed? If the bug was introduced
> > in some recent QEMU version you could try to bisect it.
>
> v1.1 is not affected. I checked the code and it seems the monitor code
> has been refactored since v1.1.
>
> > Maybe you could try to reproduce with a different subsystem so that we
> > can rule out or confirm monitor's involvement? Like -serial?
>
> It's actually a fault of the monitor_flush() function. As far as I can
> understand, monitor_flush() calls qemu_chr_fe_write() and doesn't handle
> all of the return codes / error cases properly (as I described in a
> previous mail). If you check the function, you'll see that the final
> case (where it set ups a watch / callback) always assumes an EAGAIN /
> EWOULDBLOCK error.
>
> If you can verify / confirm that this is the case and that the patch
> sent resolves the issue in a sane / correct way, I'll resubmit it
> properly (with git-format-patch, a git log msg etc).
Please see the attached testcase (python script) that programmatically
reproduces this. Sample output with qemu 1.7.0:
------------------------------------------------------------------------
$ ./test-qmp.py
Spawning qemu
Connecting client 1
Monitor output:
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 7, "major": 1}, "package": "
(Debian 1.7.0+dfsg-2)"}, "capabilities": []}}
Connecting client 2
Monitor output:
(timeout, disconnecting)
Disconnecting client 1
Connecting client 3
Monitor output
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 7, "major": 1}, "package": "
(Debian 1.7.0+dfsg-2)"}, "capabilities": []}}
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 7, "major": 1}, "package": "
(Debian 1.7.0+dfsg-2)"}, "capabilities": []}}
Terminating qemu
qemu: terminating on signal 15 from pid 11269
------------------------------------------------------------------------
Regards,
Apollon
test-qmp.py
Description: Text Data
- [Qemu-devel] Possible bug in monitor code, Stratos Psomadakis, 2014/01/22
- Re: [Qemu-devel] Possible bug in monitor code, Fam Zheng, 2014/01/23
- Re: [Qemu-devel] Possible bug in monitor code, Luiz Capitulino, 2014/01/23
- Re: [Qemu-devel] Possible bug in monitor code, Luiz Capitulino, 2014/01/23
- Re: [Qemu-devel] Possible bug in monitor code, Stratos Psomadakis, 2014/01/23
- Re: [Qemu-devel] Possible bug in monitor code, Luiz Capitulino, 2014/01/23
- Re: [Qemu-devel] Possible bug in monitor code, Stratos Psomadakis, 2014/01/24
- Re: [Qemu-devel] Possible bug in monitor code, Luiz Capitulino, 2014/01/24
- Re: [Qemu-devel] Possible bug in monitor code,
Apollon Oikonomopoulos <=