Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
@ 2024-05-01 16:52 Ville Syrjälä
  2024-05-01 18:38 ` James Almer
  2024-05-02 10:45 ` Tobias Rapp
  0 siblings, 2 replies; 6+ messages in thread
From: Ville Syrjälä @ 2024-05-01 16:52 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Paul B Mahol

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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
  2024-05-01 16:52 [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master) Ville Syrjälä
@ 2024-05-01 18:38 ` James Almer
  2024-05-01 19:40   ` Dennis Mungai
  2024-05-02 10:45 ` Tobias Rapp
  1 sibling, 1 reply; 6+ messages in thread
From: James Almer @ 2024-05-01 18:38 UTC (permalink / raw)
  To: ffmpeg-devel

On 5/1/2024 1:52 PM, Ville Syrjälä wrote:
> 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.

Just backported both commits. Thanks.
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
  2024-05-01 18:38 ` James Almer
@ 2024-05-01 19:40   ` Dennis Mungai
  2024-05-01 19:44     ` James Almer
  0 siblings, 1 reply; 6+ messages in thread
From: Dennis Mungai @ 2024-05-01 19:40 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 1 May 2024, 21:40 James Almer, <jamrial@gmail.com> wrote:

> On 5/1/2024 1:52 PM, Ville Syrjälä wrote:
> > 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.
>
> Just backported both commits. Thanks.
>

Is this patchset available on FFmpeg 7.x?

>
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
  2024-05-01 19:40   ` Dennis Mungai
@ 2024-05-01 19:44     ` James Almer
  2024-05-01 19:48       ` Dennis Mungai
  0 siblings, 1 reply; 6+ messages in thread
From: James Almer @ 2024-05-01 19:44 UTC (permalink / raw)
  To: ffmpeg-devel

On 5/1/2024 4:40 PM, Dennis Mungai wrote:
> On Wed, 1 May 2024, 21:40 James Almer, <jamrial@gmail.com> wrote:
> 
>> On 5/1/2024 1:52 PM, Ville Syrjälä wrote:
>>> 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.
>>
>> Just backported both commits. Thanks.
>>
> 
> Is this patchset available on FFmpeg 7.x?

Yes.
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
  2024-05-01 19:44     ` James Almer
@ 2024-05-01 19:48       ` Dennis Mungai
  0 siblings, 0 replies; 6+ messages in thread
From: Dennis Mungai @ 2024-05-01 19:48 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Wed, 1 May 2024, 22:44 James Almer, <jamrial@gmail.com> wrote:

> On 5/1/2024 4:40 PM, Dennis Mungai wrote:
> > On Wed, 1 May 2024, 21:40 James Almer, <jamrial@gmail.com> wrote:
> >
> >> On 5/1/2024 1:52 PM, Ville Syrjälä wrote:
> >>> 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.
> >>
> >> Just backported both commits. Thanks.
> >>
> >
> > Is this patchset available on FFmpeg 7.x?
>
> Yes.
>

Perfect, thanks.

>
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master)
  2024-05-01 16:52 [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master) Ville Syrjälä
  2024-05-01 18:38 ` James Almer
@ 2024-05-02 10:45 ` Tobias Rapp
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Rapp @ 2024-05-02 10:45 UTC (permalink / raw)
  To: ffmpeg-devel

On 01/05/2024 18:52, Ville Syrjälä wrote:

> [...]
>
> 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.

 From the release/6.1 branch it seems that a 6.1.2 release has been 
prepared by Michael in commit 9593b727e2751e5a79be86a7327a98f3422fa505 
but not tagged yet.

Regards, Tobias

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-02 10:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 16:52 [FFmpeg-devel] Massive memory leak in 6.1.1 (fixed on master) Ville Syrjälä
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

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