RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 902219 - load/unload virtio-console module many times, guest cannot connect host via " /dev/hvc"
Summary: load/unload virtio-console module many times, guest cannot connect host via "...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Amit Shah
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-21 07:39 UTC by yunpingzheng
Modified: 2014-03-04 00:13 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-14 12:57:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description yunpingzheng 2013-01-21 07:39:06 UTC
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 12:57:09 UTC
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.