Bug 2096008

Summary: qemu-system-x86_64: warning: usb-redir connection broken during migration
Product: [Fedora] Fedora Reporter: Giuseppe Maugeri <giumaug>
Component: usbredirAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: berrange, cfergeau, crobinso, eddie, fabiano, hdegoede, hongzliu, jan.public, juzhou, ondrejj, pbonzini, philmd, rjones, tzheng, victortoso, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: usbredir-0.12.0-3.fc36 usbredir-0.13.0-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2111351 2111368 (view as bug list) Environment:
Last Closed: 2022-07-31 01:30:45 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:    
Bug Blocks: 2111351, 2111368    

Description Giuseppe Maugeri 2022-06-11 20:33:39 UTC
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`

Comment 1 Giuseppe Maugeri 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.

Comment 2 Victor Toso 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...

Comment 3 Giuseppe Maugeri 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

Comment 4 Giuseppe Maugeri 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.

Comment 5 Victor Toso 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.

Comment 6 Giuseppe Maugeri 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 7 Fedora Update System 2022-07-27 08:11:11 UTC
FEDORA-2022-d36a5e3f77 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-d36a5e3f77

Comment 8 Fedora Update System 2022-07-28 02:32:51 UTC
FEDORA-2022-d36a5e3f77 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-d36a5e3f77`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-d36a5e3f77

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-07-31 01:30:45 UTC
FEDORA-2022-d36a5e3f77 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2022-11-15 14:30:46 UTC
FEDORA-2022-32edf6bc3d has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-32edf6bc3d

Comment 11 Fedora Update System 2022-11-15 15:40:59 UTC
FEDORA-2022-32edf6bc3d has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.