Closed Bug 1044213 Opened 10 years ago Closed 10 years ago

LSan-detected leaks with GeckoMediaPluginService::GetGMPVideoEncoder() in Mochitest-3

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mccr8, Assigned: jesup)

References

(Blocks 1 open bug)

Details

(Whiteboard: [MemShrink])

I was looking at the raw ASan logs on inbound, and I noticed we're leaking some GMP stuff.  For some reason this didn't turn the tree orange (bug 1044206), but this should be fixed in any event.  It looks like this isn't on m-c, and manually looking at a bunch of logs, this seems to first show up after bug 1041347 landed.

The stack looks like this:

Direct leak of 352 byte(s) in 1 object(s) allocated from:
  #0 0x471d71 in malloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74
  #1 0x7f601d63fbed in moz_xmalloc /builds/slave/m-in-l64-asan-0000000000000000/build/memory/mozalloc/mozalloc.cpp:52
  #2 0x7f600a988793 in operator new /builds/slave/m-in-l64-asan-0000000000000000/build/obj-firefox/content/media/gmp/../../../dist/include/mozilla/mozalloc.h:201
  #3 0x7f600a988793 in mozilla::gmp::GMPParent::LoadProcess() /builds/slave/m-in-l64-asan-0000000000000000/build/content/media/gmp/GMPParent.cpp:101
  #4 0x7f600a98af10 in EnsureProcessLoaded /builds/slave/m-in-l64-asan-0000000000000000/build/content/media/gmp/GMPParent.cpp:285
  #5 0x7f600a98af10 in mozilla::gmp::GMPParent::GetGMPVideoEncoder(mozilla::gmp::GMPVideoEncoderParent**) /builds/slave/m-in-l64-asan-0000000000000000/build/content/media/gmp/GMPParent.cpp:319
  #6 0x7f600a991e5f in mozilla::gmp::GeckoMediaPluginService::GetGMPVideoEncoder(nsTArray<nsCString>*, nsAString_internal const&, GMPVideoHost**, GMPVideoEncoderProxy**) /builds/slave/m-in-l64-asan-0000000000000000/build/content/media/gmp/GMPService.cpp:277

(Plus a bunch of indirect leaks.)

I'd guess the fake GMP thing isn't being shut down properly, but the existence of this leak will make it hard to find further leaks.
From the allocation stack, I'm guessing this is some problem with mProcess, which is a GMPProcessParent(), not being shut down some how.  I'm not sure this is really a problem with the fake process, and it could be a problem with the actual media plugin stuff.
Component: WebRTC: Audio/Video → Video/Audio
Please recheck once bug 1043531 has landed (and probably bug 1044550)
Depends on: 1043531, 1044550
The two blocking bugs have landed on inbound, and indeed I am seeing the leak gone on inbound, while still being present on m-c.  I'll just double check it and close this once the merge happens.  Thanks!
Assignee: nobody → rjesup
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.