Closed Bug 1656137 Opened 4 years ago Closed 4 years ago

Media fuzzer interface hangs when running a valid sample

Categories

(Core :: Fuzzing, defect)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: tsmith, Assigned: kinetik)

Details

(Whiteboard: [fuzzblocker])

Attachments

(2 files)

Attached video test.webm

To Reproduce run the MediaWebM fuzzer:
FUZZER=MediaWebM ./firefox -timeout=5 test.webm

A Pernosco session is available here: https://pernos.co/debug/n6GJbvFIZL1oKse3oyZG1g/index.html

Flags: in-testsuite-

(In reply to Tyson Smith [:tsmith] from comment #0)

A Pernosco session is available here: https://pernos.co/debug/n6GJbvFIZL1oKse3oyZG1g/index.html

The main thread is blocked in media::Await. The media pool thread is blocked in PDMFactory::EnsureInit waiting on the main thread.

Since PDMFactory::EnsureInit only needs to run once, I initially tried calling it directly from Benchmark::Init so that later calls could early-exit. That avoids the initial fuzzer hang, but reveals a latent shutdown hang when xpcom-shutdown-threads is waiting for the media thread pool to close. The media thread pool is kept alive via the reference held in sFuzzThreadPool added in bug 1567170.

Also per bug 1567170 comment 3, Jean-Yves suggests media::Await not be used on the main thread due to the blocking behaviour. So it seems like removing sFuzzThreadPool and switching from media::Await to a spin-wait (i.e. reverting to the code suggested by Christian in bug 1567170 comment 0) in avoids both the leaking threads issue in bug 1567170 and the blocking PDMFactory initialization seen here.

Assignee: nobody → kinetik
Status: NEW → ASSIGNED
Pushed by mgregan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/164f54ec7aff
Spin-wait on completion event rather than blocking main thread.  r=jya
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: