Hide Forgot
Description of problem: chardev file could not got the message which is input via the related tty. Version-Release number of selected component (if applicable): kernel 2.6.32-418.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.402.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. start vm qemu-kvm \ -name 'virt-tests-vm1' \ -nodefaults \ -monitor stdio \ -qmp tcp:0:5678,server,nowait \ -device ich9-usb-uhci1,id=usb1,bus=pci.0,addr=0x4 \ -device virtio-scsi-pci,id=virtio_scsi_pci0,addr=0x5 \ -drive file='RHEL-Server-6.5-64-virtio.qcow2',if=none,id=virtio-scsi0-id0,media=disk,cache=none,snapshot=off,format=qcow2,aio=native \ -device scsi-hd,drive=virtio-scsi0-id0 \ -device virtio-net-pci,netdev=id9GewZ9,mac='9a:a4:a5:a6:a7:a8',bus=pci.0,addr=0x3,id='idYwXJ2R' \ -netdev tap,id=id9GewZ9,vhost=on,script=qemu-ifup-switch \ -m 4096 \ -smp 2,maxcpus=2,cores=1,threads=1,sockets=2 \ -cpu 'Opteron_G3' \ -M rhel6.5.0 \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -spice port=3000,password=123456,addr=0,image-compression=auto_glz,zlib-glz-wan-compression=auto,streaming-video=all,agent-mouse=on,playback-compression=on,ipv4 \ -vga qxl \ -global qxl-vga.vram_size=33554432 \ -rtc base=utc,clock=host,driftfix=slew \ -boot order=cdn,once=d,menu=off \ -no-kvm-pit-reinjection \ -no-shutdown \ -enable-kvm 2. connect qmp, and add chardev with file type {'execute': 'qmp_capabilities'} {"execute": "chardev-add", "arguments": {"id": "chardev-file", "backend": {"data": {"out": "/tmp/chardev-file"}, "type": "file"}}} {"execute": "device_add", "arguments": {"driver": "pci-serial", "id": "test-serial", "chardev": "chardev-file", "addr": "18.0"}} 3. find the related the tty (guest)ls /sys/bus/pci/devices/*18.0/tty ttyS0 4. write message into the tty echo "hello world" > /dev/ttyS0 5. remove the chardev via qmp {"execute": "device_del", "arguments": {"id": "test-serial"}} 6. check the chardev-file at the host cat /tmp/chardev-file Actual results: There is no the message after step6. Occasionally, there is some message like below. gnome-screensav[2173]: segfault at 8 ip 00000000004101e9 sp 00007fff0f314e30 error 4 in gnome-screensaver[400000+26000] Expected results: should ouput the message "hello world" Additional info:
*** This bug has been marked as a duplicate of bug 1001945 ***