[RDD] When video decoder is restarted, audio decoder fails
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox100 | --- | fixed |
People
(Reporter: stransky, Assigned: stransky)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files, 1 obsolete file)
If we recreate video decoder due to va-api sandbox crash, audio decoder uses old IPC bridge which leads to SHM allocation failure.
Assignee | ||
Comment 1•3 years ago
|
||
(gdb) p mLinkStatus
$1 = mozilla::ipc::LinkStatus::Inactive
bt:
#0 mozilla::ipc::IProtocol::CanSend() const (this=0x7feee2fd5740) at /raid/src/ipc/glue/ProtocolUtils.h:227
#1 0x00007fef00aa8981 in mozilla::ipc::IProtocol::AllocUnsafeShmem(unsigned long, mozilla::ipc::SharedMemory::SharedMemoryType, mozilla::ipc::Shmem*)
(this=0x7feee2fd5740, aSize=166, aType=mozilla::ipc::SharedMemory::TYPE_BASIC, aOutMem=0x7feee2f50a70) at /raid/src/ipc/glue/ProtocolUtils.cpp:424
#2 0x00007fef03a771a3 in mozilla::ShmemPool::AllocateShmem<mozilla::RemoteDecoderChild>(mozilla::RemoteDecoderChild*, unsigned long, mozilla::ShmemBuffer&, mozilla::ShmemPool::AllocationPolicy) (this=0x7feee2fd5780, aInstance=0x7feee2fd5740, aSize=166, aRes=..., aPolicy=mozilla::ShmemPool::AllocationPolicy::Unsafe) at /raid/src/objdir/dist/include/mozilla/ShmemPool.h:168
#3 0x00007fef03a76e7c in mozilla::ShmemPool::Get<mozilla::RemoteDecoderChild>(mozilla::RemoteDecoderChild*, unsigned long, mozilla::ShmemPool::AllocationPolicy)
(this=0x7feee2fd5780, aInstance=0x7feee2fd5740, aSize=166, aPolicy=mozilla::ShmemPool::AllocationPolicy::Unsafe) at /raid/src/objdir/dist/include/mozilla/ShmemPool.h:120
#4 0x00007fef03a76a98 in mozilla::ShmemRecycleAllocator<mozilla::RemoteDecoderChild>::AllocateBuffer(unsigned long, mozilla::ShmemPool::AllocationPolicy)
(this=0x7feee2fd5778, aSize=166, aPolicy=mozilla::ShmemPool::AllocationPolicy::Unsafe) at /raid/src/objdir/dist/include/mozilla/ShmemRecycleAllocator.h:21
#5 0x00007fef03a76a07 in mozilla::RemoteDecoderChild::Decode(nsTArray<RefPtr<mozilla::MediaRawData> > const&)::$_9::operator()(unsigned long) const (this=0x7feeee1fb670, aSize=166)
at /raid/src/dom/media/ipc/RemoteDecoderChild.cpp:128
#6 0x00007fef03a76865 in std::_Function_handler<mozilla::ShmemBuffer (unsigned long), mozilla::RemoteDecoderChild::Decode(nsTArray<RefPtr<mozilla::MediaRawData> > const&)::$_9>::_M_invoke(std::_Any_data const&, unsigned long&&) (__functor=..., __args=@0x7feeee1fb1d0: 166)
at /home/komat/.mozbuild/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:301
#7 0x00007fef03a9e788 in std::function<mozilla::ShmemBuffer (unsigned long)>::operator()(unsigned long) const (this=0x7feeee1fb670, __args=166)
at /home/komat/.mozbuild/sysroot-x86_64-linux-gnu/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/bits/std_function.h:706
#8 0x00007fef03a9e67a in mozilla::RemoteArrayOfByteBuffer::AllocateShmem(unsigned long, std::function<mozilla::ShmemBuffer (unsigned long)>&)
(this=0x7feeee1fb4c0, aSize=166, aAllocator=...) at /raid/src/dom/media/ipc/RemoteMediaData.cpp:18
#9 0x00007fef03aa0077 in mozilla::RemoteArrayOfByteBuffer::RemoteArrayOfByteBuffer<unsigned char>(nsTArray<mozilla::AlignedBuffer<unsigned char, 32> > const&, std::function<mozilla::ShmemBuffer (unsigned long)>&) (this=0x7feeee1fb4c0, aArray=const nsTArray<mozilla::AlignedBuffer<unsigned char, 32> > & = {...}, aAllocator=...) at /raid/src/dom/media/ipc/RemoteMediaData.h:126
#10 0x00007fef03a9fa88 in mozilla::ArrayOfRemoteMediaRawData::Fill(nsTArray<RefPtr<mozilla::MediaRawData> > const&, std::function<mozilla::ShmemBuffer (unsigned long)>&&)
(this=0x7feee2fcc660, aData=const nsTArray<RefPtr<mozilla::MediaRawData> > & = {...}, aAllocator=...) at /raid/src/dom/media/ipc/RemoteMediaData.cpp:155
#11 0x00007fef03a70121 in mozilla::RemoteDecoderChild::Decode(nsTArray<RefPtr<mozilla::MediaRawData> > const&)
(this=0x7feee2fd5740, aSamples=const nsTArray<RefPtr<mozilla::MediaRawData> > & = {...}) at /raid/src/dom/media/ipc/RemoteDecoderChild.cpp:122
#12 0x00007fef03aac418 in mozilla::RemoteMediaDataDecoder::Decode(mozilla::MediaRawData*)::$_5::operator()() const (this=0x7feeed862880)
at /raid/src/dom/media/ipc/RemoteMediaDataDecoder.cpp:66
Assignee | ||
Comment 2•3 years ago
|
||
It leads to video decode failure if a new decoder is created.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
If RDD process crashes IPDLActor is destroyed for all RemoteDecoderChild instances used by RDD.
If we want to restart RDD decoder we need to recreate both audio & video decoders.
Depends on D141961
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
This bug is a special case where audio decoder is created ok but video decoder crashes in RemoteDecoderChild::Init() - that matches recent crashes due to sandbox.
In such case RemoteDecoderChild::HandleRejectionError() is called for video decoder only. Audio decoder gets
RemoteDecoderChild::ActorDestroy(), RemoteDecoderChild::IPDLActorDestroyed() calls but it's not rejected, only CanSend() is false and thus it's broken.
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Depends on D141962
Comment 10•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/11e57a388f39
https://hg.mozilla.org/mozilla-central/rev/66d42af14532
Updated•3 years ago
|
Updated•3 years ago
|
Description
•