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 1256619 - qemu quit with "qemu_chr_fe_claim_no_fail: error chardev "charnet0" already used"
Summary: qemu quit with "qemu_chr_fe_claim_no_fail: error chardev "charnet0" already u...
Keywords:
Status: CLOSED DUPLICATE of bug 1256618
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.2
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: xiywang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-25 06:51 UTC by Qian Guo
Modified: 2017-10-19 02:34 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-09 01:14:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Qian Guo 2015-08-25 06:51:40 UTC
Description of problem:
Hot remove virtio-net-pci and  vhost-user netdev, but with the chardev left in the qemu.

Then try to hot plug the vhost-user, qemu will quit with 
"qemu_chr_fe_claim_no_fail: error chardev "charnet0" already used
"

I think it should not quit directly due to if the guest is running some important work, it should warning and refuse to hot plug the vhost-user.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-18.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with chardev and vhost-user that user the chardev.
...
-chardev socket,id=charnet0,path=/var/run/openvswitch/vhost-user1 \
-netdev type=vhost-user,id=hostnet0,chardev=charnet0 \
-device virtio-net-pci,netdev=hostnet0,mrg_rxbuf=off,id=net0,mac=52:54:00:01:0b:11,bus=pci.0,addr=0x9
...

2.Hot remove net0 and netdev_del hostnet0

3.Try to hot plug a new netdev that connect to the chardev.
(qemu) netdev_add vhost-user,id=hostnet0,chardev=charnet0



Actual results:
QEMU quit with following infos:
(qemu) netdev_add vhost-user,id=hostnet0,chardev=charnet0
qemu_chr_fe_claim_no_fail: error chardev "charnet0" already used


Expected results:
1. if the chardev is in use, should refuse to use it, but not quit the qemu.

Additional info:

Comment 2 Marc-Andre Lureau 2015-09-03 13:26:48 UTC
I am not sure this is a bug, you must also remove/recreate a chardev to establish a new connection anyway... It could perhaps destroy the chardev for you though when removing the netdev.

Comment 3 Marc-Andre Lureau 2015-09-03 14:22:11 UTC
sent a RFC to qemu-devel "vhost-user: release chardev on cleanup"

Comment 6 Marc-Andre Lureau 2016-08-11 09:17:39 UTC
patches are not even reviewed upstream, low-prio, moving to 7.4

Comment 7 Marc-Andre Lureau 2016-12-27 17:52:06 UTC
patches are not even reviewed upstream, low-prio, moving to 7.5

will resend for 2.9

Comment 8 Marc-Andre Lureau 2017-01-24 18:57:51 UTC
likely fixed in v2.7.0 with:

commit 25f0d2aa5e3d21caa1bc622b21368cc2e383f02c
Author: Paolo Bonzini <pbonzini>
Date:   Wed Jun 29 15:15:33 2016 +0200

    vhost-user: disable chardev handlers on close

I will check

Comment 9 Marc-Andre Lureau 2017-10-06 11:15:03 UTC
I suggest we close as duplicate of bug 1256618, now that the behaviour is fixed to remove the chardev.

Comment 10 xiywang 2017-10-09 01:14:26 UTC
I checked bug 1256618, we can close as duplicate.
Thanks Marc-Andre.

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


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