Bug 947360

Summary: Coredump when using QMP monitor directly after qemu execution
Product: [Fedora] Fedora Reporter: Lukáš Doktor <ldoktor>
Component: qemuAssignee: Fedora Virtualization Maintainers <virt-maint>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: amit.shah, berrange, cfergeau, dwmw2, itamar, pbonzini, rjones, scottt.tw, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-02 10:47:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Doktor 2013-04-02 08:44:06 UTC
Description of problem:
When I run qemu and immediately use QMP it coredumps.

Version-Release number of selected component (if applicable):
qemu-kvm-1.0.1-4.fc17.x86_64
kernel-3.8.3-103.fc17.x86_64

How reproducible:
Always

Steps to Reproduce:
1. echo -e '{ "execute": "qmp_capabilities" }\n{ "execute": "query-commands" }\n{ "execute": "quit" }' | qemu-kvm -qmp stdio
  
Actual results:
Segmentation fault (core dumped)

Expected results:
List the supported qmp commands and exit.

Additional info:
I can also reproduce this with qemu-kvm -qmp unix:/tmp/aaa,server (without nowait) and echo '{ "execute": "qmp_capabilities" }' | socat unix:/tmp/aaa -
When I use nowait and delay the write even for 0.01s sleep it works fine.

Comment 1 Lukáš Doktor 2013-04-02 10:47:49 UTC
It works in upstream 1.3.91 and Fedora 18.