Bug 902219 - load/unload virtio-console module many times, guest cannot connect host via " /dev/hvc"
load/unload virtio-console module many times, guest cannot connect host via "...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.0
All Unspecified
medium Severity medium
: rc
: ---
Assigned To: Amit Shah
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-21 02:39 EST by yunpingzheng
Modified: 2014-03-03 19:13 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-14 07:57:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description yunpingzheng 2013-01-21 02:39:06 EST
Description of problem:
boot guest with two virtio-console, then in guest load/unload virtio-console driver, the virtio-console will 

Version-Release number of selected component (if applicable):
Host rhel7: 
kernel-3.7.0-0.31.el7.x86_64
qemu-img-1.3.0-3.el7.x86_64
guest:
rhel6.4
kernel:  kernel-2.6.32-355.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. boot guest with  virtio-console
2. in host: nc -U /tmp/virtio-console
3. in guest : echo a > /dev/hvc0. in host can receive char 'a'
4. in guest unload vritio-console, then reload it
    #modprobe -r virtio-console
    # modprobe virtio-console
5. in guest: 
    #echo a > /dev/hvc0. 
        guest will report   "-bash: /dev/hvc0: No such device" 
    #ls /dev | grep hvc 
        can find hvc0 exist.
6. in guest : echo a >/dev/hvc1 , in host will receive char 'a'.
    
7. in guest : load/unload the virtio-console  many times. (at least 8 times.),
now any /dev/hvc device can be used.
    [root@dhcp-8-128 ~]# echo a > /dev/hvc0
    -bash: /dev/hvc0: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc1
     -bash: /dev/hvc1: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc2
     -bash: /dev/hvc2: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc3
    -bash: /dev/hvc3: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc4
    -bash: /dev/hvc4: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc5
    -bash: /dev/hvc5: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc6
    -bash: /dev/hvc6: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc7
    -bash: /dev/hvc7: No such device
    [root@dhcp-8-128 ~]# echo a > /dev/hvc8
    [root@dhcp-8-128 ~]# 
    [root@dhcp-8-128 ~]# echo b > /dev/hvc8
    [root@dhcp-8-128 ~]# echo b > /dev/hvc9
    [root@dhcp-8-128 ~]# echo b > /dev/hvc10
    [root@dhcp-8-128 ~]# echo b > /dev/hvc11
    [root@dhcp-8-128 ~]# echo b > /dev/hvcafd
    [root@dhcp-8-128 ~]# echo b > /dev/hvcafsfsfsd
    [root@dhcp-8-128 ~]# echo b > /dev/hvc10

  
Actual results:
in step3: host can receive char 'a'
in step5: guest report : -bash: /dev/hvc0: No such device
in step6:  you will find now guest /dev/hvc1 will connect with guest /tmp/virtio-console-1
after step7:  no /dev/hvc* can connect with host /tmp/virtio-console-1
  
Expected results:



Additional info:

qemu-cmd:
/usr/bin/qemu-kvm \
-name 'vm1' \
-nodefaults \
-m 4096 \
-smp 4,cores=2,threads=1,sockets=2 \
-vnc :22 \
-vga std \
-rtc base=utc,clock=host,driftfix=none \
-drive file=/root/qemu_kvm/RHEL-Server-6.4-64-virtio.qcow2,if=none,cache=none,id=virtio0 \
-device virtio-blk-pci,drive=virtio0 \
-device virtio-net-pci,netdev=id3Ibo2c,mac=9a:5e:5f:60:61:62 \
-netdev tap,id=id3Ibo2c,script=/root/qemu_kvm/qemu-ifup-switch \
-device ich9-usb-uhci1,id=usb1 \
-boot order=cdn,once=c,menu=off \
-enable-kvm \
-monitor stdio \
-chardev socket,id=isa-serial-1,path=/tmp/isa-serial-1,server,nowait \
-device isa-serial,chardev=isa-serial-1 \
-chardev socket,id=isa-serial-2,path=/tmp/isa-serial-2,server,nowait \
-device isa-serial,chardev=isa-serial-2 \
-device virtio-serial,id=virt-serial-1 \
-chardev socket,id=virtio-serial-1,path=/tmp/virtio-serial-1,server,nowait \
-device virtserialport,chardev=virtio-serial-1,name=virtio.serial.1,bus=virt-serial-1.0 \
-chardev socket,id=virtio-serial-2,path=/tmp/virtio-serial-2,server,nowait \
-device virtserialport,chardev=virtio-serial-2,name=virtio.serial.2,bus=virt-serial-1.0 \
-device virtio-serial,id=virt-console-1 \
-chardev socket,id=virtio-console-1,path=/tmp/virtio-console-1,server,nowait \
-device virtconsole,chardev=virtio-console-1,name=virtio.console.1,bus=virt-console-1.0

Host cpu
[root@localhost ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 42
Stepping:              7
CPU MHz:               1600.000
BogoMIPS:              6784.43
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
Comment 2 Amit Shah 2013-11-14 07:57:09 EST
Please only interact with hvc via consoles, not directly using 'echo'.

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