Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 2111368

Summary: qemu-system-x86_64: warning: usb-redir connection broken during migration
Product: Red Hat Enterprise Linux 9 Reporter: Victor Toso <victortoso>
Component: usbredirAssignee: Victor Toso <victortoso>
Status: CLOSED ERRATA QA Contact: yduan
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: berrange, cfergeau, coli, eddie, extras-qa, fabiano, giumaug, hdegoede, jan.public, ondrejj, pbonzini, philmd, rjones, victortoso, yduan
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: usbredir-0.12.0-3.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2096008 Environment:
Last Closed: 2022-11-15 10:37:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2096008    
Bug Blocks: 2111351    
Deadline: 2022-08-15   

Description Victor Toso 2022-07-27 07:46:15 UTC
+++ This bug was initially created as a clone of Bug #2096008 +++

Description of problem:

Create Snapshot, Restore snapshot, crash

Version-Release number of selected component (if applicable):
qemu.x86_64  2:6.2.0-10.fc36  and 2:6.2.0-10.fc36 

How reproducible:


Steps to Reproduce:
1.Create Snapshot
2.Restore Snapshot
3.Crash

Actual results:


Expected results:


Additional info:
Logs:
22:21:16 Unable to read from monitor: Connessione interrotta dal corrispondente
22:21:16 localhost.localdomain libvirtd[5086]: internal error: qemu unexpectedly closed the monitor:
2022-06-07T20:21:16.752926Z qemu-system-x86_64: warning: usb-red>
2022-06-07T20:21:16.752948Z qemu-system-x86_64: usbredirparser: unserialization must use a pristine parser
2022-06-07T20:21:16.752951Z qemu-system-x86_64: Failed to load usb-redir:parser
2022-06-07T20:21:16.752955Z qemu-system-x86_64: error while loading state for instance 0x0 of device '0000:00:02.1:00.>
2022-06-07T20:21:16.753127Z qemu-system-x86_64: Error -1 while loading VM state`

--- Additional comment from Giuseppe Maugeri on 2022-06-11 20:35:27 UTC ---

I'm experiencing the problem after updating my box from Fedora 35 to 36.
I'm not able to load all my old snapshots (the ones I made under Fedora 35) and also the fresh ones  I made after update.
My VMs did't use any usb devices.

--- Additional comment from Victor Toso on 2022-06-21 10:56:52 UTC ---

Thanks for taking the time to report this bug.

QEMU's vmstate is failing on loading the usbredir's device. As you have pointed out you actually don't have a usb device connected, this probably means a incompatibility between source-host usbredirparser_serialize() to destination-host usbredirparser_unserialize().

Which usbredir version you have installed in your source-host? I've updated usbredir three times in Fedora 35, 0.8.0, 0.10.0 and 0.12.0...

--- Additional comment from Giuseppe Maugeri on 2022-06-21 16:48:37 UTC ---

(In reply to Victor Toso from comment #2)
> Thanks for taking the time to report this bug.
> 
> QEMU's vmstate is failing on loading the usbredir's device. As you have
> pointed out you actually don't have a usb device connected, this probably
> means a incompatibility between source-host usbredirparser_serialize() to
> destination-host usbredirparser_unserialize().
> 
> Which usbredir version you have installed in your source-host? I've updated
> usbredir three times in Fedora 35, 0.8.0, 0.10.0 and 0.12.0...

Hello,
I found this:
[root@localhost peppe]# dnf info usbredir
Ultima verifica della scadenza dei metadati: 2:33:46 fa il mar 21 giu 2022, 16:12:05.
Pacchetti installati
Name         : usbredir
Version      : 0.12.0
Rilascio     : 2.fc36
Architecture : x86_64
Size         : 115 k
Sorgente     : usbredir-0.12.0-2.fc36.src.rpm
Repository   : @System
Dal repo     : fedora
Summary      : USB network redirection protocol libraries
URL          : https://www.spice-space.org/usbredir.html
Licenza      : LGPLv2+
Description  : The usbredir libraries allow USB devices to be used on remote
             : and/or virtual hosts over TCP.  The following libraries are
             : provided:
             : 
             : usbredirparser:
             : A library containing the parser for the usbredir protocol
             : 
             : usbredirhost:
             : A library implementing the USB host side of a usbredir
             : connection. All that an application wishing to implement a USB
             : host needs to do is:
             : * Provide a libusb device handle for the device
             : * Provide write and read callbacks for the actual transport of
             :   usbredir data
             : * Monitor for usbredir and libusb read/write events and call
             :   their handlers

--- Additional comment from Giuseppe Maugeri on 2022-06-21 16:56:57 UTC ---

(In reply to Giuseppe Maugeri from comment #3)
> (In reply to Victor Toso from comment #2)
> > Thanks for taking the time to report this bug.
> > 
> > QEMU's vmstate is failing on loading the usbredir's device. As you have
> > pointed out you actually don't have a usb device connected, this probably
> > means a incompatibility between source-host usbredirparser_serialize() to
> > destination-host usbredirparser_unserialize().
> > 
> > Which usbredir version you have installed in your source-host? I've updated
> > usbredir three times in Fedora 35, 0.8.0, 0.10.0 and 0.12.0...
> 
> Hello,
> I found this:
> [root@localhost peppe]# dnf info usbredir
> Ultima verifica della scadenza dei metadati: 2:33:46 fa il mar 21 giu 2022,
> 16:12:05.
> Pacchetti installati
> Name         : usbredir
> Version      : 0.12.0
> Rilascio     : 2.fc36
> Architecture : x86_64
> Size         : 115 k
> Sorgente     : usbredir-0.12.0-2.fc36.src.rpm
> Repository   : @System
> Dal repo     : fedora
> Summary      : USB network redirection protocol libraries
> URL          : https://www.spice-space.org/usbredir.html
> Licenza      : LGPLv2+
> Description  : The usbredir libraries allow USB devices to be used on remote
>              : and/or virtual hosts over TCP.  The following libraries are
>              : provided:
>              : 
>              : usbredirparser:
>              : A library containing the parser for the usbredir protocol
>              : 
>              : usbredirhost:
>              : A library implementing the USB host side of a usbredir
>              : connection. All that an application wishing to implement a USB
>              : host needs to do is:
>              : * Provide a libusb device handle for the device
>              : * Provide write and read callbacks for the actual transport of
>              :   usbredir data
>              : * Monitor for usbredir and libusb read/write events and call
>              :   their handlers

Just to confirm your finding I also tried to compile Qemu from vanilla sources, both versions 7.0.0 and 6.1.1, but I have still experienced the same problem with both.

--- Additional comment from Victor Toso on 2022-06-24 22:43:16 UTC ---

A fix was submitted upstream

https://gitlab.freedesktop.org/spice/usbredir/-/merge_requests/61

The issue is on 0.12.0 version only. unserialize() changed behavior while fixing a leak.

--- Additional comment from Giuseppe Maugeri on 2022-06-25 15:34:19 UTC ---

(In reply to Victor Toso from comment #5)
> A fix was submitted upstream
> 
> https://gitlab.freedesktop.org/spice/usbredir/-/merge_requests/61
> 
> The issue is on 0.12.0 version only. unserialize() changed behavior while
> fixing a leak.

Thanks!!

Comment 12 yduan 2022-08-04 12:31:05 UTC
Change to VERIFIED based on Comment 11.

Comment 14 errata-xmlrpc 2022-11-15 10:37:52 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 (usbredir bug fix and enhancement update), 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:8217