After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 772611 - Large memory leak in tracker-extract-libav
Large memory leak in tracker-extract-libav
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
unspecified
Other Linux
: Normal major
: ---
Assigned To: tracker-extractor
tracker-extractor
Depends on:
Blocks:
 
 
Reported: 2016-10-08 15:47 UTC by Andrew Branson
Modified: 2016-10-09 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to fix (536 bytes, patch)
2016-10-08 15:47 UTC, Andrew Branson
none Details | Review
Git patch fix (1.02 KB, patch)
2016-10-08 22:04 UTC, Andrew Branson
committed Details | Review

Description Andrew Branson 2016-10-08 15:47:12 UTC
Created attachment 337236 [details] [review]
Patch to fix

tracker-extract-libav.c uses avformat_open_input to initialize the libav AVFormatContext. This should be closed with avformat_close_input, but avformat_free_context is used instead which is intended for closing output contexts, not inputs. 

A large amount of memory is leaked by tracker-extract here when it processes video files. We were seeing 300MB VmRSS after a tracker reset. This patch reduces that dramatically, though there's still room for improvement.
Comment 1 Andrew Branson 2016-10-08 22:04:31 UTC
Created attachment 337257 [details] [review]
Git patch fix
Comment 2 Carlos Garnacho 2016-10-09 09:48:12 UTC
Thanks so much for the patch! It is now in master.