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 2001316 - Unclear error message while hotplugging the same chardev
Summary: Unclear error message while hotplugging the same chardev
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Marc-Andre Lureau
QA Contact: liunana
URL:
Whiteboard:
Depends On: 1984721 1997408
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-05 13:53 UTC by John Ferlan
Modified: 2022-05-17 12:28 UTC (History)
9 users (show)

Fixed In Version: qem-kvm-6.1.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1984721
Environment:
Last Closed: 2022-05-17 12:24:17 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-96250 0 None None None 2021-09-05 13:55:33 UTC
Red Hat Product Errata RHBA-2022:2307 0 None None None 2022-05-17 12:24:50 UTC

Description John Ferlan 2021-09-05 13:53:23 UTC
+++ This bug was initially created as a clone of Bug #1984721 +++

Description of problem:
unclear error message while hotplugging the same chardev


Version-Release number of selected component (if applicable):
Host:    
    kernel-4.18.0-323.el8.x86_64 
    qemu-kvm-6.0.0-24.module+el8.5.0+11844+1e3017bd.x86_64
    



How reproducible: 100%


Steps to Reproduce:
1. Boot qemu with cmdline:
   /usr/libexec/qemu-kvm -monitor stdio -qmp tcp:0:4445,server=on,wait=off

2. Hotplug chardev:
  {"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
  {"return": {}}

3. Hotplug the same chardev again:
  {"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
  {"error": {"class": "GenericError", "desc": "duplicate yank instance"}}

Actual results:
Can't tell what's the reason that cause the failure of hotplugging.


Expected results:
We should have reported
that the "id" value for the two chardevs is clashing.


Additional info:

--- Additional comment from liunana on 2021-07-22 02:43:42 UTC ---

Slow train has no such issue:
    qemu-kvm-4.2.0-53.module+el8.5.0+11673+72138537.x86_64


{"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
{"return": {}}
{"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
{"error": {"class": "GenericError", "desc": "attempt to add duplicate property 'char2' to object (type 'container')"}}

--- Additional comment from Marc-Andre Lureau on 2021-07-28 11:34:05 UTC ---


Would this be good enough?

{"error": {"class": "GenericError", "desc": "Failed to open chardev 'char2': duplicate yank instance"}}


> {"error": {"class": "GenericError", "desc": "attempt to add duplicate property 'char2' to object (type 'container')"}}

wasn't very friendly either..

--- Additional comment from liunana on 2021-07-30 09:39:31 UTC ---

(In reply to Marc-Andre Lureau from comment #2)
> Would this be good enough?
> 
> {"error": {"class": "GenericError", "desc": "Failed to open chardev 'char2':
> duplicate yank instance"}}
> 

Hi,

It's good to contain the duplicate chardev id, thanks.
But seems 'open chardev' is not a match error log for duplicate hotplugging the same chardev.

How about:

{"error": {"class": "GenericError", "desc": "Failed to add chardev 'char2': duplicate yank instance"}}



Besides, would you please help to explain more about what's the 'yank' function in the error log? Thanks.


> 
> > {"error": {"class": "GenericError", "desc": "attempt to add duplicate property 'char2' to object (type 'container')"}}
> 
> wasn't very friendly either.


Seems clearer than "duplicate yank instance".




Best regards
Liu Nana

--- Additional comment from John Ferlan on 2021-08-09 13:25:32 UTC ---

Moving this to 8.6, in POST, and setting DTM=5 since this can be tested/validated using the weekly rebase as the fix has gone into qemu-6.1.

Decision was to not backport for AV 8.5 since it's really an error path for newer code (yank functionality) that isn't necessarily reachable via libvirt or other means at this point. Neither RHV nor OSP will use 8.5.

Comment 1 Yanan Fu 2021-10-12 06:48:41 UTC
Set 'Verified:Tested,SanityOnly' as gating test with qemu-kvm-6.1.0-1.el9 pass

Comment 2 liunana 2021-10-14 07:24:16 UTC
Test Env:
    5.14.0-4.el9.x86_64
    qemu-kvm-6.1.0-1.el9.x86_64

Test PASS with steps:

1. Boot qemu with: 
# /usr/libexec/qemu-kvm -monitor stdio -qmp tcp:0:4445,server=on,wait=off

2. hotplug same chardev twice, can get the clear error log.
{"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
{"return": {}}

{"execute":"chardev-add","arguments":{"id":"char2","backend":{"type":"socket","data":{"addr":{"type":"unix", "data": {"path": "/home/mm"}}}}}}
{"error": {"class": "GenericError", "desc": "Chardev with id 'char2' already exists"}}


I will move this bug to verified directly once it is ON_QA. Thanks.



Best regards
Liu Nana

Comment 6 liunana 2021-12-20 03:26:06 UTC
Move this bug to VERIRFIED according to Comment 2.

Comment 8 errata-xmlrpc 2022-05-17 12:24:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (new packages: qemu-kvm), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:2307


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