You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: media-playback: LeakSanitizer reports FFmpeg packet buffers in test_media_remux and test_media_alpha_network #3365
The asan pass reports leaks of FFmpeg buffers in two media tests in every run. Triage puts the first OBS frame at:
test_media_alpha_network: shared/media-playback/media-playback/media.c.h:836 and test/cmocka/test_media_alpha_network.c:233, 480 bytes in 20 objects from av_buffer_ref under avcodec_send_packet
test_media_remux: test/cmocka/test_media_remux.c:272, 24 bytes from av_buffer_alloc under av_grow_packet in libavformat
Small sizes, but they repeat per packet, so a long playback leaks more.
What to do
Check whether media-playback releases every packet and frame it refs, at media.c.h:836 and on stop.
Check whether the tests themselves release what they open, at the two test lines.
The sanitizer harness's known list (rust/tools/sanitize/triage.py, #3290) has this as kind bug: the asan job does not count it, but fails once the test runs clean. So the fix PR also drops the entry.
Done: the test_media_remux leak was the Rust remux port's (and the C remux's) packet on a cancelled job, fixed in #3432.
Left: the test_media_alpha_network leak is in FFmpeg itself. A minimal program that only opens, probes and closes the test's VP9-alpha clip (avformat_open_input, avformat_find_stream_info, avformat_close_input) leaks the same 480 + 8242 + 960 bytes in 60 allocations with FFmpeg 8.0.1 (Ubuntu libavformat62 7:8.0.1-3ubuntu2) and no OBS code; the 20 other clips the media tests write do not leak. OBS closes its inputs correctly in media.c.h and in the test's check_clip().
What is needed: an upstream FFmpeg report with that reproduction (not filed yet), then either a fixed FFmpeg or a suppression for that one stack. Until then the test keeps its known-list entry (rust/tools/sanitize/triage.py), and the entry should move from kind bug to a kind for third-party bugs once one exists.
Decided: option B now, the FFmpeg report only if it still happens on FFmpeg master.
Add a narrow LeakSanitizer suppression for the one FFmpeg 8.0.1 stack (VP9-alpha open, probe and close, no OBS frames), plus a third-party kind in rust/tools/sanitize/triage.py, and remove the known entry.
FFmpeg wants a report reproduced on its latest master with the ffmpeg/ffprobe command line. If an ASan build of FFmpeg master shows the leak with ffprobe on a VP9-alpha file, we report it there. If not, it is already fixed, and the suppression comes out when our FFmpeg is updated.
Claiming: the LeakSanitizer suppression for the FFmpeg VP9-alpha probe leak in test_media_alpha_network (option B).
Plan (one PR):
RED: reproduce the leak locally with an ASan build of test_media_alpha_network and a harness test that fails while the known entry has no third-party kind / no suppression.
GREEN: rust/tools/sanitize/lsan.supp matching only that FFmpeg stack, wired into the asan options; a third-party kind in triage.py; the bug entry removed.
Evidence: the test runs clean under asan with the suppression, and a planted OBS leak in the same test is still reported.
Activity
vpacher commentedon Nov 1, 2026
/ready
vpacher commentedon Nov 1, 2026
Claiming: the FFmpeg buffer leaks in the two media tests
Plan (one PR, after #3290):
media.c.h:836, stop path) or the tests (test_media_remux.c:272,test_media_alpha_network.c:233).bugentries from the known list.First PR: after #3290 merges.
vpacher commentedon Nov 1, 2026
Blocked: waiting on #3290
vpacher commentedon Nov 1, 2026
Releasing the FFmpeg part of this issue.
Done: the
test_media_remuxleak was the Rust remux port's (and the C remux's) packet on a cancelled job, fixed in #3432.Left: the
test_media_alpha_networkleak is in FFmpeg itself. A minimal program that only opens, probes and closes the test's VP9-alpha clip (avformat_open_input,avformat_find_stream_info,avformat_close_input) leaks the same 480 + 8242 + 960 bytes in 60 allocations with FFmpeg 8.0.1 (Ubuntulibavformat62 7:8.0.1-3ubuntu2) and no OBS code; the 20 other clips the media tests write do not leak. OBS closes its inputs correctly inmedia.c.hand in the test'scheck_clip().What is needed: an upstream FFmpeg report with that reproduction (not filed yet), then either a fixed FFmpeg or a suppression for that one stack. Until then the test keeps its known-list entry (
rust/tools/sanitize/triage.py), and the entry should move from kindbugto a kind for third-party bugs once one exists.9 remaining items
vpacher commentedon Nov 14, 2026
Decided: option B now, the FFmpeg report only if it still happens on FFmpeg master.
rust/tools/sanitize/triage.py, and remove the known entry.ffmpeg/ffprobecommand line. If an ASan build of FFmpeg master shows the leak withffprobeon a VP9-alpha file, we report it there. If not, it is already fixed, and the suppression comes out when our FFmpeg is updated.vpacher commentedon Nov 14, 2026
/ready
Coordinator triage after the decision of 2026-11-14 08:41 UTC (option B). Acceptance:
rust/tools/sanitize/triage.py, and thetest_media_alpha_networkknown entry removed.test_media_alpha_networkand reports any other leak in that test as before.ffprobeon a VP9-alpha file.rdoupe commentedon Nov 15, 2026
Claiming: the LeakSanitizer suppression for the FFmpeg VP9-alpha probe leak in test_media_alpha_network (option B).
Plan (one PR):
test_media_alpha_networkand a harness test that fails while the known entry has no third-party kind / no suppression.rust/tools/sanitize/lsan.suppmatching only that FFmpeg stack, wired into the asan options; athird-partykind intriage.py; thebugentry removed.fix(sanitize): suppress FFmpeg 8.0.1's VP9-alpha probe leak, not the …