Bug 1008844 - chardev file could not got the message which is input via the related tty
chardev file could not got the message which is input via the related tty
Status: CLOSED DUPLICATE of bug 1001945
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Gerd Hoffmann
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2013-09-17 03:31 EDT by xhan
Modified: 2013-09-18 04:01 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-18 04:01:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description xhan 2013-09-17 03:31:34 EDT
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

How reproducible:

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 \
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
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:
Comment 2 Gerd Hoffmann 2013-09-18 04:01:35 EDT

*** This bug has been marked as a duplicate of bug 1001945 ***

Note You need to log in before you can comment on or make changes to this bug.