not receiving RESET event after system_reset command causes QMP connection to die

Bug #1156632 reported by Bram Klein Gunnewiek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Expired
Undecided
Unassigned

Bug Description

I have written my own implementation to control machine running KVM instances with the QMP protocol. Its a pretty basic implementation that sends/receives in the same thread. This means that all of the events QEMU sents are received only when the application expects a reply from a command. In the following scenario, i'm unable to (re)connect to the QMP socket from QEMU after I closed the connection:

1) Connect to QMP
2) Sent qmp_capabilities
3) Receive reply
4) Send system_reset
5) Receive reply
6) close socket
7) Connect to socket -> connection refused

However, in the following scenario, I am able to connect after I disconnect the socket because I have read the two RESET events:
1) Connect to QMP
2) Sent qmp_capabilities
3) Receive reply
4) Send system_reset
5) Receive reply
6) Receive reply (is a RESET event)
7) Receive reply (is a RESET event)
8) close socket
9) Connect to socket -> ok

I don't know if this is a bug or expected behavior. I can't find any proper way to disconnect the socket documentated. Am I doïng something wrong, or is this a bug in the QMP implementation of QEMU?

Tags: qmp
Revision history for this message
Bram Klein Gunnewiek (i-bram) wrote :

For what its worth, i'm using Ubuntu 12.10:
kvm --version
QEMU emulator version 1.2.0 (qemu-kvm-1.2.0+noroms-0ubuntu2.12.10.3, Debian), Copyright (c) 2003-2008 Fabrice Bellard

Revision history for this message
Thomas Huth (th-huth) wrote :

Triaging old bug tickets... can you still reproduce this issue with the latest version of QEMU? Or could we close this ticket nowadays?

Changed in qemu:
status: New → Incomplete
Revision history for this message
Bram Klein Gunnewiek (i-bram) wrote :

I'm not sure, the current implementation is multi-threaded so I won't hit this bug if its still present. If I can find the time I will make a proof of concept and test if the bug is still present.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for QEMU because there has been no activity for 60 days.]

Changed in qemu:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.