Bug 617082
Summary: | QMP: parse error when issuing any command with extra "}" | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Mike Cao <bcao> | ||||
Component: | qemu-kvm | Assignee: | Luiz Capitulino <lcapitulino> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 7.0 | CC: | bugproxy, flang, hhuang, jcody, juzhang, lihuang, mazhang, michen, mkenneth, ndai, pbonzini, qzhang, tburke, tools-bugs, virt-maint, xtian | ||||
Target Milestone: | beta | Keywords: | RHELNAK | ||||
Target Release: | 7.0 | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2014-06-13 12:22:25 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 559201, 580449, 580954 | ||||||
Attachments: |
|
Description
Mike Cao
2010-07-22 07:08:52 UTC
This issue has been proposed when we are only considering blocker issues in the current Red Hat Enterprise Linux release. ** If you would still like this issue considered for the current release, ask your support representative to file as a blocker on your behalf. Otherwise ask that it be considered for the next Red Hat Enterprise Linux release. ** This is related to bug #580449, possibly it's even the same issue. But won't close as a duplicated though, not before we figuring it out. However, this is not severe, as it only happens with certain types of bad inputs and the client would have to be buggy too to issue them. Thanks for the report Mike, let's fix it for rhel6.1. This won't be fixed for RHEL6 because it's a minor bug, libvirt would have to send broken json to qemu to trigger this. But this bug exists upstream and will be fixed there in the near future. Will move this BZ to RHEL7.0 so that we can keep track of it. I think this is fixed by Jeff's QAPI backports. *** Bug 815952 has been marked as a duplicate of this bug. *** Created attachment 580269 [details]
sosreport
I believe Paolo is correct, I think this is fixed - here is a quick test on qemu-kvm-0.12.1.2-2.285.el6: [Jeff.Cody@jefflaptop ~]$ telnet localhost 4444 Trying ::1... Connected to localhost. Escape character is '^]'. {"QMP": {"version": {"qemu": {"micro": 1, "minor": 12, "major": 0}, "package": "(qemu-kvm-devel)"}, "capabilities": []}} { "execute": "qmp_capabilities" }} {"return": {}} {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data": {}}} { "execute": "blockdev-snapshot-sync", "arguments": { "device": "virtio0","snapshot-file":"/tmp/f16-snapnew.img","mode": "existing","format": "qcow2" } } {"return": {}} { "execute": "query-status" } {"return": {"status": "running", "singlestep": false, "running": true}} The behavior of the problem has changed, but it's still buggy: QMP is emitting a success response _and_ an error response, this is illegal. The correct behavior is just failing (and query-status shouldn't work, as qmp_capabilities has not succeeded). Haven't checked this on upstream yet. Talked with Jeff on IRC and it turns out he's right (comment 14). The parser is doing the right thing here. First, it parses the qmp_capabilities command dict. The syntax is right and the command is good, so the success response is emitted. Then the parser parses "}", which is invalid, and returns an error message accordingly (look at the 'data' member). No multiple errors as described in the original description. Also, QMP works normally (ie. doesn't get stuck). Moving to QA. The version this got fixed is unknown. This is a quite old bz that we suddenly realized it was fixed. Test this bug on rhel7, but still have a problem, After issue a invalid command, qmp monitor can NOT be used, Any right commands will return error. Host: qemu-kvm-rhev-1.5.3-30.el7.x86_64 kernel-3.10.0-64.el7.x86_64 Guest: RHEL7 Result: Escape character is '^]'. {"QMP": {"version": {"qemu": {"micro": 3, "minor": 5, "major": 1}, "package": " (qemu-kvm-1.5.3-30.el7)"}, "capabilities": []}} {"execute":"qmp_capabilities"}} {"return": {}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"execute":"query-status"} {"return": {"status": "running", "singlestep": false, "running": true}} {"execute":"qmp_capabisadfewfsds"}} {"error": {"class": "CommandNotFound", "desc": "The command qmp_capabisadfewfsds has not been found"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"execute":"qmp_capabilsdfwe234543t)(&% } {"execute":"query-status"} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"execute":"query-status"} {"error": {"class": "GenericError", "desc": "Expected 'object' in QMP input"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Expected 'object' in QMP input"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"execute": "query-block"} {"error": {"class": "GenericError", "desc": "Expected 'object' in QMP input"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Expected 'object' in QMP input"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} {"error": {"class": "GenericError", "desc": "Invalid JSON syntax"}} Well, it's a different pattern that breaks it. This bz is so old that I think it's better to open a new bz for the problem you found. As developer suggestion in comment 20, file a new bug 1048648 against problem in comment 19. This bug has been verified, any problem please let me know. This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |