Hide Forgot
Description of problem: Console will hang if run Ctrl+C in guest when guest STDOUT Version-Release number of selected component (if applicable): libvirt-0.9.4-18.el6.x86_64 qemu-kvm-0.12.1.2-2.196.el6.x86_64 kernel-2.6.32-207.el6.x86_64 virt-manager-0.9.0-7.el6.x86_64 How reproducible: 30% Steps to Reproduce: 1. prepare a guest with a serial. xml like: <domain type='kvm'> <name>kvm2</name> <uuid>a326b9fd-3f86-12dd-f254-ccff7ff6fd8d</uuid> <memory>1024000</memory> <currentMemory>1024000</currentMemory> <vcpu current='1'>2</vcpu> <os> <type arch='x86_64' machine='rhel6.2.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/kvm2.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </disk> <controller type='ide' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='network'> <mac address='52:54:00:72:c4:5a'/> <source network='default'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <target port='0'/> </serial> <console type='pty'> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </memballoon> </devices> </domain> 2. add console=tty0 console=ttyS0,115200 to the guest kernel line. 3. open virt-manager and open the guest window. start the guest. click "View" --> "Text Consoles" shift the vnc and serial console make sure they are both work fine. 4. login in the guest run # cat /var/log/messages 5. Ctrl+C before "cat /var/log/messages" finished. 6. do several times of step4 and step5 7. press any key in guest theck if the console is hang.and click "View" --> "Text Consoles" shift to the vnc to make sure the guest is fine. in debug info: there is no error in ~/.virt-manager/virt-manager.log Actual results: guest console is hang. Expected results: guest console will not hang.
An additional info: if you use # virsh console guest and do the step 4 and 5. the virsh console will not hang.
Hmm, not being able to ctrl-c significantly reduces the usefulness of the text console. Does restarting virt-manager fix the console hang? How about connecting to virsh console when virt-manager text connection is hung? Any error messages in the virt-manager --debug output?
zhpeng, any info on the questions in comment #2?
Created attachment 558127 [details] virt-manager debug message
(In reply to comment #2) > Hmm, not being able to ctrl-c significantly reduces the usefulness of the text > console. > > Does restarting virt-manager fix the console hang? How about connecting to > virsh console when virt-manager text connection is hung? Any error messages in > the virt-manager --debug output? Does restarting virt-manager fix the console hang? Yes. How about connecting to virsh console when virt-manager text connection is hung? 2 ways 2 results: Case 1: virt-manager text connection is hung. DO NOT CLOSE virt-manager. I can connect virsh console, but input/output messages are not good like: ... Escape character is ^] -bash: asdf: com ~]# ot found 7 ~]# ]# -bash: asdf: command[root@dhcp-93-237 ~]# -bash: asdf: command not[root@dhcp-93-23ound7 ~]# -bash: sdf: command not f[root@dhcp-93-237 ~]# -b[ro-bash: f: command not found[root@dhcp-93-237 ~]# d not found # ... Case 2: virt-manager text connection is hung. CLOSE virt-manager. I can connect virsh console, input/output messages are good. Any error messages in the virt-manager --debug output? PLS check the attachment.
Thanks, fixed upstream now: http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=e830f91d27963fae9b929c86f1f4e72c36335b29
Fixed in virt-manager-0.9.0-8.el6
This bug can be reproduced with: virt-manager-0.9.0-7.el6.x86_64 kernel-2.6.32-220.el6.x86_64 libvirt-0.9.4-23.el6.x86_64 python-virtinst-0.600.0-5.el6.noarch Verified with: kernel-2.6.32-220.el6.x86_64 libvirt-0.9.10-0rc2.el6.x86_64 python-virtinst-0.600.0-7.el6.noarch virt-manager-0.9.0-9.el6.x86_64 Steps: 1. Prepared a rhel6.2 guest: # virsh dumpxml rhel6.2 <domain type='kvm' id='3'> <name>rhel6.2</name> <uuid>68cadd65-7868-df7c-e685-2745334c7bf4</uuid> <memory>1048576</memory> <currentMemory>1048576</currentMemory> <vcpu>1</vcpu> <os> <type arch='x86_64' machine='rhel6.2.0'>hvm</type> <boot dev='hd'/> </os> <features> <acpi/> <apic/> <pae/> </features> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>restart</on_crash> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/rhel6.2.img'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <controller type='virtio-serial' index='0'> <alias name='virtio-serial0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </controller> <controller type='ide' index='0'> <alias name='ide0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> </controller> <interface type='network'> <mac address='52:54:00:21:47:9f'/> <source network='default'/> <target dev='vnet0'/> <model type='virtio'/> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='pty'> <source path='/dev/pts/1'/> <target port='0'/> <alias name='serial0'/> </serial> <console type='pty' tty='/dev/pts/1'> <source path='/dev/pts/1'/> <target type='serial' port='0'/> <alias name='serial0'/> </console> <channel type='spicevmc'> <target type='virtio' name='com.redhat.spice.0'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> <input type='tablet' bus='usb'> <alias name='input0'/> </input> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'> <listen type='address' address='127.0.0.1'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <alias name='video0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <alias name='balloon0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> <seclabel type='dynamic' model='selinux' relabel='yes'> <label>system_u:system_r:svirt_t:s0:c301,c803</label> <imagelabel>system_u:object_r:svirt_image_t:s0:c301,c803</imagelabel> </seclabel> </domain> 2. Add console=tty0 console=ttyS0,115200 to the guest kernel line. 3. Open virt-manager and open the guest window. start the guest. click "View" --> "Text Consoles" shift the vnc and serial console make sure they are both work fine. 4. Login in the guest run # cat /var/log/messages 5. Ctrl+C before "cat /var/log/messages" finished. 6. Do 10+ times of step4 and step5 7. Guest works well and console not hang. Changed the status to VERIFIED.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to this update, the glib integration did not work correctly. As a consequence, serial consoles of virtual machines could stall when transferring large amounts of data. This update modifies the underlying code to allow the transfer of larger amounts of data without stalling.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0785.html