Closed Bug 1024039 Opened 10 years ago Closed 10 years ago

GMP plugin-container rapidly creating/destroying shm segments

Categories

(Core :: WebRTC: Audio/Video, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1020090

People

(Reporter: jld, Unassigned)

References

Details

It looks like this in strace:

11:16:29.404043 open("/dev/shm/org.chromium.FA10ha", O_RDWR|O_CREAT|O_EXCL, 0600) = 18
11:16:29.404147 stat("/dev/shm/org.chromium.FA10ha", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
11:16:29.404168 unlink("/dev/shm/org.chromium.FA10ha") = 0
11:16:29.404515 open("/dev/shm/org.chromium.gKT7vm", O_RDWR|O_CREAT|O_EXCL, 0600) = 18
11:16:29.404611 stat("/dev/shm/org.chromium.gKT7vm", {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
11:16:29.404632 unlink("/dev/shm/org.chromium.gKT7vm") = 0

The open/stat/unlink triples occur, on average, about every 4.7 ms on my laptop, or 212/sec.  Part of the backtrace from one of those open()s:

#6  0x00007fcc84acd551 in base::SharedMemory::Create
    at /home/jld/src/mozilla-central/ipc/chromium/src/base/shared_memory_posix.cc:78
#7  0x00007fcc84b03ed2 in mozilla::ipc::SharedMemoryBasic::Create 
    at ../../dist/include/mozilla/ipc/SharedMemoryBasic_chromium.h:40
#8  0x00007fcc84afc96a in mozilla::ipc::CreateSegment
    at /home/jld/src/mozilla-central/ipc/glue/Shmem.cpp:147
#9  0x00007fcc84afcb64 in mozilla::ipc::Shmem::Alloc 
    at /home/jld/src/mozilla-central/ipc/glue/Shmem.cpp:368
#10 0x00007fcc84be0452 in mozilla::gmp::PGMPChild::CreateSharedMemory
    at /home/jld/src/mozilla-central/obj-x86_64-unknown-linux-gnu/ipc/ipdl/PGMPChild.cpp:188
#11 0x00007fcc84bdd3bd in mozilla::gmp::PGMPVideoDecoderChild::AllocShmem 
    at /home/jld/src/mozilla-central/obj-x86_64-unknown-linux-gnu/ipc/ipdl/PGMPVideoDecoderChild.cpp:436
#12 0x00007fcc855106fb in mozilla::gmp::GMPPlaneImpl::MaybeResize 
    at /home/jld/src/mozilla-central/content/media/gmp/GMPVideoPlaneImpl.cpp:87
#13 0x00007fcc855108c6 in mozilla::gmp::GMPPlaneImpl::Copy
    at /home/jld/src/mozilla-central/content/media/gmp/GMPVideoPlaneImpl.cpp:153
#14 0x00007fcc85510c77 in mozilla::gmp::GMPVideoi420FrameImpl::CreateFrame
    at /home/jld/src/mozilla-central/content/media/gmp/GMPVideoi420FrameImpl.cpp:162

This is going to be a problem for bug 1012951.  Ideally these files would be being opened in the parent and passed over IPC as mozilla::ipc::FileDescriptor instances.  Also, given the high frequency of these filesystem operations, this is probably not ideal for performance.
This should be resolved by bug 1020090.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.