Bug 1024473 - Memory leak reported by valgrind
Memory leak reported by valgrind
Product: Fedora
Classification: Fedora
Component: libusbx (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Hans de Goede
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-29 13:56 EDT by Christophe Fergeau
Modified: 2013-11-20 09:48 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-20 09:48:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Christophe Fergeau 2013-10-29 13:56:50 EDT
When running remote-viewer through valgrind, I got this trace:
==13623== 48 bytes in 2 blocks are definitely lost in loss record 7,424 of 13,299
==13623==    at 0x4A06409: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13623==    by 0x6B52971: handle_events (io.c:1940)
==13623==    by 0x6B536F2: libusb_handle_events_timeout_completed (io.c:2126)
==13623==    by 0x6B537DE: libusb_handle_events (io.c:2202)
==13623==    by 0x5C18A69: spice_usb_device_manager_usb_ev_thread (usb-device-manager.c:1149)
==13623==    by 0x3D17C6EA04: g_thread_proxy (gthread.c:798)
==13623==    by 0x3134A07F32: start_thread (pthread_create.c:309)
==13623==    by 0x31342F4EAC: clone (clone.S:111)

This is with libusbx-1.0.17-1.fc20.x86_64 (happened with 1.0.16 as well).
I couldn't spot an obvious leak looking at the code. I can reliably reproduce it, so let me know if more tests are needed. I'm logging this here to not forget, let me know if this should go elsewhere.
Comment 1 Hans de Goede 2013-11-20 07:23:18 EST

I believe this may be fixed by the 3 commits I've just pushed to libusbx git:

Can you build libusbx from master and give that a try?

Thanks & Regards,

Comment 2 Christophe Fergeau 2013-11-20 09:48:20 EST
Hmm just tried to reproduce, but I did not manage to reproduce, even with f20 libusbx, and I did not leave enough details about the exact setup I was using :(
Let's just say it's fixed, and I'll reopen if I see that again.

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