Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931059 - media-video/ffmpeg-6.1.1: massive memory leak
Summary: media-video/ffmpeg-6.1.1: massive memory leak
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-05-01 16:59 UTC by Ville Syrjala
Modified: 2024-05-02 05:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ville Syrjala 2024-05-01 16:59:20 UTC
Ran into a massive memory leak on ffmpeg-6.1.1 while transcoding audio books. 6.0.1 was fine.

Reproducible: Always

Steps to Reproduce:
1. ffmpeg -activation_bytes XXX -i book.aax -map 0:a -map 0:v -c:a mp3 -c:v copy  -ss 0.000000 -to 909.038005 -metadata track="1/69" -metadata title="Chapter 1" book_01.mp3

Actual Results:  
Memory consumption goes through the roof.

Expected Results:  
Memory consumption should be reasonable.

I reported this upstream: https://ffmpeg.org//pipermail/ffmpeg-devel/2024-May/326569.html

Can be fixed by cherry-picking these two commits from ffmpeg master:
commit 84e400ae37b1 ("avfilter/buffersrc: switch to activate")
commit d9e41ead8226 ("avfilter/avfilter: fix OOM case for default activate")
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-02 05:20:07 UTC
Thanks for the report, and especially thanks for taking it upstream & getting it backported.
Comment 2 Larry the Git Cow gentoo-dev 2024-05-02 05:21:30 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90cfa72c27592c0d73ec8040f621e70153c9efbc

commit 90cfa72c27592c0d73ec8040f621e70153c9efbc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-05-02 05:20:31 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-05-02 05:20:31 +0000

    media-video/ffmpeg: backport (serious) memory leak fix
    
    Closes: https://bugs.gentoo.org/931059
    Signed-off-by: Sam James <sam@gentoo.org>

 media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild          | 616 +++++++++++++++++++++
 .../ffmpeg/files/ffmpeg-6.1.1-memory-leak.patch    | 129 +++++
 2 files changed, 745 insertions(+)