Red Hat Bugzilla – Bug 1264156
usbredir/100MB/s memory leak redirecting a camera
Last modified: 2016-07-19 13:55:34 EDT
Created attachment 1074502 [details]
Memory leak data extracted using valgrind's massif
Description of problem:
I'm seeing ~100MB/s memory leak in either virt-viewer or virt-manager when redirecting a usb-webcam.
Version-Release number of selected component (if applicable):
Client: virt-viewer or virt-manager on f22
Steps to Reproduce:
1. Start virt-viewer or virt-manager on your local machine
2. Connect to a remote host running the guest
3. Perform a usbredir via spice of a cheap webcam (0c45:62f0 is the USB model in my case) to a usb 2 card on the guest
4. Start 'cheese' in the guest
~ 100MB/s leak
Snippet from a massif dump; full dump attached.
99.12% (3,872,899,472B) (heap allocation functions) malloc/new/new, --alloc-fns, etc.
->74.13% (2,896,327,659B) 0x33B50647B7: spice_malloc (mem.c:93)
| ->71.82% (2,806,089,336B) 0x33B5063D6C: spice_marshaller_new (marshaller.c:121)
| | ->71.82% (2,806,089,336B) 0x33B501F0A7: spice_msg_out_new (spice-channel.c:632)
| | ->71.82% (2,806,089,336B) 0x33B50345CD: usbredir_write_callback (channel-usbredir.c:539)
| | | ->71.82% (2,806,089,336B) 0x3D32C033B1: usbredirparser_do_write (usbredirparser.c:1066)
| | | ->71.82% (2,806,089,336B) 0x33B5405324: usbredirhost_iso_packet_complete (usbredirhost.c:1490)
| | | | ->71.82% (2,806,089,336B) 0x33B80092B3: usbi_handle_transfer_completion (io.c:1597)
| | | | ->71.82% (2,806,089,336B) 0x33B800EDE4: op_handle_events (linux_usbfs.c:2459)
| | | | ->71.82% (2,806,089,336B) 0x33B8008F69: handle_events (io.c:2089)
| | | | ->71.82% (2,806,089,336B) 0x33B8009BD1: libusb_handle_events_timeout_completed (io.c:2174)
| | | | ->71.82% (2,806,089,336B) 0x33B8009CBD: libusb_handle_events (io.c:2250)
| | | | ->71.82% (2,806,089,336B) 0x33B5037E5E: spice_usb_device_manager_usb_ev_thread (usb-device-manager.c:1165)
| | | | ->71.82% (2,806,089,336B) 0x3D07A710A3: g_thread_proxy (gthread.c:764)
| | | | ->71.82% (2,806,089,336B) 0x3D06207553: start_thread (pthread_create.c:333)
| | | | ->71.82% (2,806,089,336B) 0x3D05702B9B: clone (clone.S:109)
| | | |
Note: The connection between the host/client may be relevant:
host - somewhere in Boston
client - UK; on the end of a 50 down/3 MBps up cable link
with a VPN and the atlantic in between.
Thanks for the report + massif!
I can reproduce this on slow connection. Working on it!
Patch sent to the mailing list:
Patches were acked upstream  and 
Moving this to POST and devel_ack+
I'll update here with the hashes after they are pushed upstream.
Patches pushed upstream
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see firstname.lastname@example.org with any questions
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.