Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <syrjala@sci.fi>
To: ffmpeg-devel@ffmpeg.org
Cc: Paul B Mahol <onemda@gmail.com>
Subject: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
Date: Wed, 1 May 2024 19:52:09 +0300
Message-ID: <ZjJzOdft74vu4BHw@sci.fi> (raw)

Hi,

I ran into a massive memory leak while transcoding some audio
books after upgrading to ffmpeg 6.1.1 from 6.0.1.

Instead of the normal ~100 MiB rss it now exceeds 10 GiB in about
ten seconds and keeps on going up.

Command line used was approximately this:
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

Bisect points to:
commit 90fba2774304 ("avfilter/trim: switch to activate")

I then tried master and discovered that the leak is has been
fixed by these two commits:
commit 84e400ae37b1 ("avfilter/buffersrc: switch to activate")
commit d9e41ead8226 ("avfilter/avfilter: fix OOM case for default activate")

So those should be cherry-picked to the next 6.1 release (assuming
there will be one). Both cherry-pick cleanly, and afterwards the
leak is gone from the 6.1 branch as well.

-- 
Ville Syrjälä
syrjala@sci.fi
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

             reply	other threads:[~2024-05-01 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 16:52 Ville Syrjälä [this message]
2024-05-01 18:38 ` James Almer
2024-05-01 19:40   ` Dennis Mungai
2024-05-01 19:44     ` James Almer
2024-05-01 19:48       ` Dennis Mungai
2024-05-02 10:45 ` Tobias Rapp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZjJzOdft74vu4BHw@sci.fi \
    --to=syrjala@sci.fi \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=onemda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git