Closed Bug 1319992 Opened 8 years ago Closed 7 years ago

Move demuxing to its own TaskQueue

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: u480271, Assigned: jya)

References

(Depends on 2 open bugs, Blocks 1 open bug)

Details

Attachments

(5 files, 1 obsolete file)

Currently the MediaFormatReader and Demuxing share the same TaskQueue. In trying to implement main-thread-blocking in drawImage() (bug 1295921) by storing the last keyframe, we're hitting an issue where tasks dispatched before recovery seek at blocking recovery because MediaCache waits on main thread.
Assignee: nobody → jyavenard
Blocks: 1295921
Split MFR and decoders to use independent TaskQueues.
Summary: Move demuxing to it's own TaskQueue → Move demuxing to its own TaskQueue
Comment on attachment 8815147 [details]
Bug 1319992: P1. Run demuxing operations on its own task queue.

https://reviewboard.mozilla.org/r/96162/#review96350

::: dom/media/MediaFormatReader.h:56
(Diff revision 2)
>    RefPtr<SeekPromise>
>    Seek(const SeekTarget& aTarget, int64_t aUnused) override;
>  
>  protected:
>    void NotifyDataArrivedInternal() override;
> +  void UpdateBuffered() override {};

It is confusing to have an empty implementation.

We should make MediaDecoderReader::NotifyDataArrived virtual:

class MediaDecoderReader
{
  virtual void NotifyDataArrived()
  {
    MOZ_ASSERT(OnTaskQueue());
    NS_ENSURE_TRUE_VOID(!mShutdown);
    UpdateBuffered();
  }
}

class MediaFormatReader
{
  void NotifyDataArrived() override
  {
    NotifyDataArrivedInternal();
  }
}

::: dom/media/MediaFormatReader.h:488
(Diff revision 2)
>    bool NeedInput(DecoderData& aDecoder);
>  
>    DecoderData& GetDecoderData(TrackType aTrack);
>  
>    // Demuxer objects.
> -  RefPtr<MediaDataDemuxer> mDemuxer;
> +  class DemuxerFactory;

Call it "DemuxerProxy" since it is not a factory but a proxy to delegate jobs to another thread.

::: dom/media/MediaFormatReader.cpp:445
(Diff revision 2)
> +    , mData(new Data(aDemuxer))
> +  { }
> +
> +  ~DemuxerFactory()
> +  {
> +    RefPtr<Data> data = mData;

mData.forget().

::: dom/media/MediaFormatReader.cpp:458
(Diff revision 2)
> +
> +  RefPtr<MediaDataDemuxer::InitPromise> Init();
> +
> +  MediaTrackDemuxer* GetTrackDemuxer(TrackType aTrack, uint32_t aTrackNumber)
> +  {
> +    MOZ_RELEASE_ASSERT(mData && mData->mInitDone);

We just need to check mData once in the constructor to ensure it is not null.

::: dom/media/MediaFormatReader.cpp:526
(Diff revision 2)
> +  class Wrapper;
> +  struct Data
> +  {
> +    NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Data)
> +
> +    Data(MediaDataDemuxer* aDemuxer) : mInitDone(false), mDemuxer(aDemuxer) {}

explicit Data(...);

::: dom/media/MediaFormatReader.cpp:528
(Diff revision 2)
> +  {
> +    NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Data)
> +
> +    Data(MediaDataDemuxer* aDemuxer) : mInitDone(false), mDemuxer(aDemuxer) {}
> +
> +    Atomic<bool> mInitDone;

Can't use in-class initialization?

::: dom/media/MediaFormatReader.cpp:569
(Diff revision 2)
> +  }
> +
> +  RefPtr<SeekPromise> Seek(const media::TimeUnit& aTime) override
> +  {
> +    RefPtr<Wrapper> self = this;
> +    return InvokeAsync(

I prefer:

return InvokeAsync(mTaskQueue, __func__, [self, aTime]() {
  return self->mTrackDemuxer->Seek(aTime);
})->Then(mTaskQueue, __func__,
         [self]() { self->UpdateRandomAccessPoint(); },
         [self]() { self->UpdateRandomAccessPoint(); })
  ->CompletionPromise();

to avoid nested lambda.

::: dom/media/MediaFormatReader.cpp:649
(Diff revision 2)
> +    });
> +    SyncRunnable::DispatchToThread(mTaskQueue, runnable);
> +  }
> +
> +private:
> +  Monitor mMonitor;

a Mutex will do the job.

::: dom/media/MediaFormatReader.cpp:2583
(Diff revision 2)
> +    mBuffered = TimeIntervals();
> +    return;
> +  }
> +
> +  int64_t startTime = 0;
> +  if (!ForceZeroStartTime()) {

Need to rebase on bug 1313635.
Attachment #8815147 - Flags: review?(jwwang) → review+
Comment on attachment 8815147 [details]
Bug 1319992: P1. Run demuxing operations on its own task queue.

https://reviewboard.mozilla.org/r/96162/#review96350

> It is confusing to have an empty implementation.
> 
> We should make MediaDecoderReader::NotifyDataArrived virtual:
> 
> class MediaDecoderReader
> {
>   virtual void NotifyDataArrived()
>   {
>     MOZ_ASSERT(OnTaskQueue());
>     NS_ENSURE_TRUE_VOID(!mShutdown);
>     UpdateBuffered();
>   }
> }
> 
> class MediaFormatReader
> {
>   void NotifyDataArrived() override
>   {
>     NotifyDataArrivedInternal();
>   }
> }

i'm not sure it's less confusing to have default implementation that aren't actually called.
but sure...

> Call it "DemuxerProxy" since it is not a factory but a proxy to delegate jobs to another thread.

it does create MediaTrackDemuxer , but sure..

> We just need to check mData once in the constructor to ensure it is not null.

hmmm.. the aim is to ensure that this code is never called before the init promise has completed.
checking in the constructor serves no purpose, seeing that data there will always be non-null

> Can't use in-class initialization?

not in an elegant fashion no.

> a Mutex will do the job.

when do you use a mutex over a monitor?

mutexes seem seldom use in the media code.
Comment on attachment 8815147 [details]
Bug 1319992: P1. Run demuxing operations on its own task queue.

https://reviewboard.mozilla.org/r/96162/#review96350

> I prefer:
> 
> return InvokeAsync(mTaskQueue, __func__, [self, aTime]() {
>   return self->mTrackDemuxer->Seek(aTime);
> })->Then(mTaskQueue, __func__,
>          [self]() { self->UpdateRandomAccessPoint(); },
>          [self]() { self->UpdateRandomAccessPoint(); })
>   ->CompletionPromise();
> 
> to avoid nested lambda.

it does look nicer.
But doesn't makes it go through like this:
T1 = reader's taskqueue
T2 = demuxer taskqueue
with nested lambda:
T1 -> T2 -> T2 -> T1

with nice rewrite
T1 -> T2 -> T1 -> T2 -> T1

InvokeAsync will resolve back to the reader's taskqueue, which will then queue a new task on demuxer's taskqueue to complete the task.
changing to non-nested lambda gives me assertion failure about running in the wrong thread.

Assertion failure: mResponseTarget->IsCurrentThreadIn(), at /Users/jyavenard/Work/Mozilla/obj-ff-dbg/dist/include/mozilla/MozPromise.h:340
7 INFO SourceBuffer buffered ranges grew from TimeRanges:  to TimeRanges: 
8 INFO got durationchange event
9 INFO got loadedmetadata event
LLVM ERROR: IO failure on output stream.
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool: internal objdump command failed
#01: mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true>::ThenValueBase::CompletionPromise() (MozPromise.h:340, in XUL)
#02: mozilla::MediaFormatReader::DemuxerProxy::Wrapper::GetSamples(int) (MediaFormatReader.cpp:584, in XUL)
10 INFO TEST-PASS | dom/media/mediasource/test/test_AudioChange_mp4.html | got loadedmetadata event 
#03: mozilla::MediaFormatReader::DoDemuxAudio() (MediaFormatReader.cpp:1327, in XUL)
#04: mozilla::MediaFormatReader::RequestDemuxSamples(mozilla::TrackInfo::TrackType) (MediaFormatReader.cpp:1582, in XUL)
#05: mozilla::MediaFormatReader::Update(mozilla::TrackInfo::TrackType) (MediaFormatReader.cpp:1960, in XUL)
#06: decltype(*(fp).*fp0(Get<0ul>(fp1).PassAsParameter())) mozilla::detail::RunnableMethodArguments<mozilla::TrackInfo::TrackType>::applyImpl<mozilla::MediaFormatReader, void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType), StoreCopyPassByConstLRef<mozilla::TrackInfo::TrackType>, 0ul>(mozilla::MediaFormatReader*, void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType), mozilla::Tuple<StoreCopyPassByConstLRef<mozilla::TrackInfo::TrackType> >&, mozilla::IndexSequence<0ul>) (nsThreadUtils.h:779, in XUL)
#07: _ZN7mozilla6detail23RunnableMethodArgumentsIJNS_9TrackInfo9TrackTypeEEE5applyINS_17MediaFormatReaderEMS6_FvS3_EEEDTcl9applyImplfp_fp0_dtdefpT10mArgumentscvNS_13IndexSequenceIJLm0EEEE_EEEPT_T0_ (nsThreadUtils.h:785, in XUL)
#08: mozilla::detail::RunnableMethodImpl<void (mozilla::MediaFormatReader::*)(mozilla::TrackInfo::TrackType), true, false, mozilla::TrackInfo::TrackType>::Run() (nsThreadUtils.h:814, in XUL)
#09: mozilla::AutoTaskDispatcher::TaskGroupRunnable::Run() (TaskDispatcher.h:196, in XUL)
#10: mozilla::TaskQueue::Runner::Run() (TaskQueue.cpp:232, in XUL)
#11: nsThreadPool::Run() (nsThreadPool.cpp:226, in XUL)
#12: non-virtual thunk to nsThreadPool::Run() (nsThreadPool.cpp:153, in XUL)
#13: nsThread::ProcessNextEvent(bool, bool*) (nsThread.cpp:1214, in XUL)
#14: NS_ProcessNextEvent(nsIThread*, bool) (nsThreadUtils.cpp:361, in XUL)
#15: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (MessagePump.cpp:338, in XUL)
#16: MessageLoop::RunInternal() (message_loop.cc:233, in XUL)
#17: MessageLoop::RunHandler() (message_loop.cc:226, in XUL)
#18: MessageLoop::Run() (message_loop.cc:205, in XUL)
#19: nsThread::ThreadFunc(void*) (nsThread.cpp:469, in XUL)
#20: _pt_root (ptthread.c:219, in libnss3.dylib)
#21: _pthread_body (in libsystem_pthread.dylib) + 180
#22: _pthread_body (in libsystem_pthread.dylib) + 0

the code:
  RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples) override
  {
    RefPtr<Wrapper> self = this;
    return InvokeAsync(mTaskQueue, __func__,
                       [self, aNumSamples]() {
                         return self->mTrackDemuxer->GetSamples(aNumSamples);
                       })
      ->Then(mTaskQueue, __func__,
             [self]() { self->UpdateRandomAccessPoint(); },
             [self]() { self->UpdateRandomAccessPoint(); })
      ->CompletionPromise();
  }

:gerald, :jwwang any ideas?
Flags: needinfo?(jwwang)
Flags: needinfo?(gsquelart)
Not from me I'm afraid, I don't really understand the workings of MozPromise.
JW should know better hopefully, or you can corner Bobby next week!

Just looking at ThenValueBase::CompletionPromise(), it enforces its use on the target thread of the 'Then', so you'll just have to work around that, unless it can safely be changed to work on any thread, but that's where you need a real MozPromise expert.
Flags: needinfo?(gsquelart)
Ok..

This is a limitation of CompletionPromise, it must be set on the previous request, and in the target thread of the previous Request.

Discussing with :bholley, he also mentioned what I mentioned in comment #6, that you now have to dispatch two extra tasks and is an unnecessary overhead.

A workaround could be:
  RefPtr<SamplesPromise> GetSamples(int32_t aNumSamples) override
  {
    RefPtr<Wrapper> self = this;
    return InvokeAsync(mTaskQueue, __func__,
                       [self, aNumSamples]() {
                         return self->mTrackDemuxer->GetSamples(aNumSamples);
                       })
      ->Then(mTaskQueue, __func__,
             [self]() { self->UpdateRandomAccessPoint(); },
             [self]() { self->UpdateRandomAccessPoint(); })
      ->Then(AbstractThread::GetCurrent()->AsTaskQueue(), __func__, [] {})
      ->CompletionPromise();
  }

The problem is setting that the last request is a CompletionPromise in a thread safe manner, and there's no guarantee that the previous tasks didn't already run, making it too late to make it a completion promise.

As such, I'll go back to using nested lambda.
(In reply to Jean-Yves Avenard [:jya] from comment #15)
> Ok..
> 
> This is a limitation of CompletionPromise, it must be set on the previous
> request, and in the target thread of the previous Request.

http://searchfox.org/mozilla-central/rev/d98418da69edeb1f2f8e6f3840157fae1512f89b/xpcom/threads/MozPromise.h#417
This is because mCompletionPromise is read on the target thread

http://searchfox.org/mozilla-central/rev/d98418da69edeb1f2f8e6f3840157fae1512f89b/xpcom/threads/MozPromise.h#342
and created in CompletionPromise() which must also run on the target thread to avoid race.

I am think about creating a ThenWithCompletion() function so we can do:
p->ThenWithCompletion(thread1, __func__, onResolve1, onReject1)
 ->ThenWithCompletion(thread2, __func__, onResolve2, onReject2);

The syntax is more similar to that of JS.
Flags: needinfo?(jwwang)
Comment on attachment 8815549 [details]
Bug 1319992: P0. Have CompletionPromise returns a RefPtr<MozPromise>.

https://reviewboard.mozilla.org/r/96434/#review96636

Can you elaborate how that makes a difference?
Comment on attachment 8815264 [details]
Bug 1319992: P2. Update MediaDecoderReader documentation.

https://reviewboard.mozilla.org/r/96274/#review96638
Attachment #8815264 - Flags: review?(jwwang) → review+
Comment on attachment 8815549 [details]
Bug 1319992: P0. Have CompletionPromise returns a RefPtr<MozPromise>.

https://reviewboard.mozilla.org/r/96434/#review96636

Yes..

You can do something like:
    return InvokeAsync(mTaskQueue, __func__, [self, aTime]() {
      return self->mTrackDemuxer->Seek(aTime)
        ->Then(self->mTaskQueue, __func__,
               [self]() { self->UpdateRandomAccessPoint(); },
               [self]() { self->UpdateRandomAccessPoint(); })
        ->CompletionPromise();
    });

otherwise you can't as InvokeAsync static_assert that the type returned is a RefPtr<MozPromise>

You can currently do:

    return InvokeAsync(mTaskQueue, __func__, [self, aTime]() {
      return self->mTrackDemuxer->Seek(aTime)
        ->Then(self->mTaskQueue, __func__,
               [self]() { self->UpdateRandomAccessPoint(); },
               [self]() { self->UpdateRandomAccessPoint(); });
    });

Then can be chained, as all Then returns RefPtr<MozPromise> but not CompletionPromise which returns MozPromise*
Comment on attachment 8815265 [details]
Bug 1319992: P3. Remove no longer used seeking argument.

https://reviewboard.mozilla.org/r/96276/#review96642
Attachment #8815265 - Flags: review?(jwwang) → review+
Comment on attachment 8815266 [details]
Bug 1319992: P4. Use Mutex in place of Monitor.

https://reviewboard.mozilla.org/r/96278/#review96644
Attachment #8815266 - Flags: review?(jwwang) → review+
Comment on attachment 8815549 [details]
Bug 1319992: P0. Have CompletionPromise returns a RefPtr<MozPromise>.

https://reviewboard.mozilla.org/r/96434/#review96650
Attachment #8815549 - Flags: review+
See Also: → 1321246
Comment on attachment 8815549 [details]
Bug 1319992: P0. Have CompletionPromise returns a RefPtr<MozPromise>.

https://reviewboard.mozilla.org/r/96434/#review96818
Attachment #8815549 - Flags: review?(bobbyholley) → review+
Attachment #8815549 - Attachment is obsolete: true
JW, something very dodgy since rebasing to use ThenPromise

https://treeherder.mozilla.org/logviewer.html#?job_id=32535724&repo=try

the promise returned is null. 

I don't see how that could ever happen. Haven't dwelved into it yet.
Flags: needinfo?(jwwang)
See bug 1323155.
Depends on: 1323155
Flags: needinfo?(jwwang)
Comment on attachment 8818471 [details]
Bug 1319992: P5. Don't attempt to estimate readyState when ended.

https://reviewboard.mozilla.org/r/98530/#review98804

LGTM.
Attachment #8818471 - Flags: review?(jwwang) → review+
Depends on: 1323832
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/781555873370
P1. Run demuxing operations on its own task queue. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/d3366444625b
P2. Update MediaDecoderReader documentation. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/ab31c60d46d7
P3. Remove no longer used seeking argument. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/49877fd60322
P4. Use Mutex in place of Monitor. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/f982627067f7
P5. Don't attempt to estimate readyState when ended. r=jwwang
Depends on: 1323913
Depends on: 1323928
backed out for frequent test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=7998841&repo=autoland starting with this push
Flags: needinfo?(jyavenard)
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6d6e627bb384
Backed out changeset f982627067f7 
https://hg.mozilla.org/integration/autoland/rev/9782a71736b2
Backed out changeset 49877fd60322 
https://hg.mozilla.org/integration/autoland/rev/b81f3cb4782b
Backed out changeset ab31c60d46d7 
https://hg.mozilla.org/integration/autoland/rev/df6043463ade
Backed out changeset d3366444625b 
https://hg.mozilla.org/integration/autoland/rev/be7270495e69
Backed out changeset 781555873370 for frequent test failurs in mediasource-endofstream.html
The "fix" to the intermittent timeout that cause those changes to be backed out is extremely suspicious.

Rather than having DemuxerProxy::GetTrackDemuxer return a already_AddRefed<Wrapper> it returns a Wrapper*

This causes the DemuxerProxy to always own the last reference to the MediaTrackDemuxer rather than passing the ownership to the MediaFormatReader.

The only difference is that in MediaFormatReader::Shutdown, the MediaTrackDemuxer are deleted shortly later.

It makes no sense on why it would work in one way but not another. But at this stage, I'm beyond caring :(
Flags: needinfo?(jyavenard)
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f3ac066c3741
P1. Run demuxing operations on its own task queue. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/45afcd8cf9ef
P2. Update MediaDecoderReader documentation. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/3cfdc09bf851
P3. Remove no longer used seeking argument. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/2ae0864c76bc
P4. Use Mutex in place of Monitor. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/48b968826893
P5. Don't attempt to estimate readyState when ended. r=jwwang
Backed out for failing test_eme_stream_capture_blocked_case1.html:

https://hg.mozilla.org/integration/autoland/rev/98dade0102954e835c4acf99d50e41717dd8cb3f
https://hg.mozilla.org/integration/autoland/rev/9b90a8fec5ac840f05d4d67b9799ed0a7a3d7e58
https://hg.mozilla.org/integration/autoland/rev/6726d2d57b405ad4280203aab665fdaab98dc506
https://hg.mozilla.org/integration/autoland/rev/4248712f23ce750c15ebf89bdc43d7578f75e47e
https://hg.mozilla.org/integration/autoland/rev/6ba59bfd211d616c3c6dc1be7fff5b15cd6839ec

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=48b9688268938ffe6ad33ea84891a76170a9a597
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=8105008&repo=autoland

03:07:31     INFO - [03:07:31.157] 640x480@959kbps audio&video tracks, each with its key-6_case1 created MediaKeys object ok
03:07:31     INFO - TEST-PASS | dom/media/test/test_eme_stream_capture_blocked_case1.html | [03:07:31.157] 640x480@959kbps audio&video tracks, each with its key-6_case1 setMediaKeys failed as expected. 
03:07:31     INFO - [03:07:31.209] 640x480 then 400x300, same key (1st) per track-7_case1 video: fetch of bipbop_480_624kbps-cenc-video-key1-init.mp4 complete, appending
03:07:31     INFO - [03:07:31.220] 640x480 then 400x300, same key (1st) per track-7_case1 audio: fetch of bipbop_480_624kbps-cenc-audio-key1-init.mp4 complete, appending
03:07:31     INFO - Buffered messages finished
03:07:31    ERROR - TEST-UNEXPECTED-FAIL | dom/media/test/test_eme_stream_capture_blocked_case1.html | application terminated with exit code 1
03:07:31     INFO - runtests.py | Application ran for: 0:02:47.516931
03:07:31     INFO - zombiecheck | Reading PID log: /var/folders/q8/1vnm3qf56qs7z6b9j3w0gwl800000w/T/tmpyDN_vGpidlog
03:07:31     INFO - ==> process 2018 launched child process 2020
03:07:31     INFO - ==> process 2018 launched child process 2021
03:07:31     INFO - ==> process 2018 launched child process 2022
03:07:31     INFO - ==> process 2018 launched child process 2023
03:07:31     INFO - zombiecheck | Checking for orphan process with PID: 2020
03:07:31     INFO - zombiecheck | Checking for orphan process with PID: 2021
03:07:31     INFO - zombiecheck | Checking for orphan process with PID: 2022
03:07:31     INFO - zombiecheck | Checking for orphan process with PID: 2023
03:07:31     INFO - mozcrash Downloading symbols from: https://queue.taskcluster.net/v1/task/RG8ZjSV2QaChovm6HQj3Kw/artifacts/public/build/firefox-53.0a1.en-US.mac.crashreporter-symbols.zip
03:07:38     INFO - mozcrash Copy/paste: /builds/slave/test/build/macosx64-minidump_stackwalk /var/folders/q8/1vnm3qf56qs7z6b9j3w0gwl800000w/T/tmp1rcLWL.mozrunner/minidumps/D5C5099C-5407-4648-AD49-B850D72C758D.dmp /var/folders/q8/1vnm3qf56qs7z6b9j3w0gwl800000w/T/tmpiEbdUg
03:07:52     INFO - mozcrash Saved minidump as /builds/slave/test/build/blobber_upload_dir/D5C5099C-5407-4648-AD49-B850D72C758D.dmp
03:07:52     INFO - mozcrash Saved app info as /builds/slave/test/build/blobber_upload_dir/D5C5099C-5407-4648-AD49-B850D72C758D.extra
03:07:52     INFO - PROCESS-CRASH | dom/media/test/test_eme_stream_capture_blocked_case1.html | application crashed [@ mozilla::MozPromise<bool, mozilla::MediaResult, true>::ThenValueBase::AssertIsDead()]
03:07:52     INFO - Crash dump filename: /var/folders/q8/1vnm3qf56qs7z6b9j3w0gwl800000w/T/tmp1rcLWL.mozrunner/minidumps/D5C5099C-5407-4648-AD49-B850D72C758D.dmp
03:07:52     INFO - Operating system: Mac OS X
03:07:52     INFO -                   10.10.5 14F27
03:07:52     INFO - CPU: amd64
03:07:52     INFO -      family 6 model 69 stepping 1
03:07:52     INFO -      4 CPUs
03:07:52     INFO - 
03:07:52     INFO - GPU: UNKNOWN
03:07:52     INFO - 
03:07:52     INFO - Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
03:07:52     INFO - Crash address: 0x0
03:07:52     INFO - Process uptime: 167 seconds
03:07:52     INFO - 
03:07:52     INFO - Thread 66 (crashed)
03:07:52     INFO -  0  XUL!mozilla::MozPromise<bool, mozilla::MediaResult, true>::ThenValueBase::AssertIsDead() [MozPromise.h:48b968826893 : 357 + 0x0]
03:07:52     INFO -     rax = 0x0000000108f87913   rdx = 0x00007fff797911f8
03:07:52     INFO -     rcx = 0x000000010486a598   rbx = 0x00007fff79791c50
03:07:52     INFO -     rsi = 0x0000a9000000a900   rdi = 0x0000a8000000a903
03:07:52     INFO -     rbp = 0x00000001312c9a10   rsp = 0x00000001312c9a00
03:07:52     INFO -      r8 = 0x00000001312c99b0    r9 = 0x00000001312ca000
03:07:52     INFO -     r10 = 0x00007fff9027d3ef   r11 = 0x00007fff9027d3c0
03:07:52     INFO -     r12 = 0x000000010a33a998   r13 = 0x000000010a33ab98
03:07:52     INFO -     r14 = 0x0000000000000000   r15 = 0x0000000000000001
03:07:52     INFO -     rip = 0x0000000106d2ea7e
03:07:52     INFO -     Found by: given as instruction pointer in context
03:07:52     INFO -  1  XUL!mozilla::MozPromise<bool, mozilla::MediaResult, true>::ThenValueBase::ResolveOrRejectRunnable::~ResolveOrRejectRunnable() [MozPromise.h:48b968826893 : 321 + 0x6]
03:07:52     INFO -     rbx = 0x000000012cc40c10   rbp = 0x00000001312c9a30
03:07:52     INFO -     rsp = 0x00000001312c9a20   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x0000000000000000
03:07:52     INFO -     r15 = 0x0000000000000001   rip = 0x0000000106d2b498
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  2  XUL!<name omitted> [nsThreadUtils.cpp:48b968826893 : 45 + 0xb]
03:07:52     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001312c9a50
03:07:52     INFO -     rsp = 0x00000001312c9a40   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x0000000000000000
03:07:52     INFO -     r15 = 0x0000000000000001   rip = 0x000000010502698e
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  3  XUL!mozilla::TaskQueue::Dispatch(already_AddRefed<nsIRunnable>, mozilla::AbstractThread::DispatchFailureHandling, mozilla::AbstractThread::DispatchReason) [nsCOMPtr.h:48b968826893 : 294 + 0x6]
03:07:52     INFO -     rbx = 0x000000012cf2e7d0   rbp = 0x00000001312c9a80
03:07:52     INFO -     rsp = 0x00000001312c9a60   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x0000000000000000
03:07:52     INFO -     r15 = 0x0000000000000001   rip = 0x0000000104ff842e
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  4  XUL!mozilla::MozPromise<bool, mozilla::MediaResult, true>::ThenValueBase::Dispatch(mozilla::MozPromise<bool, mozilla::MediaResult, true>*) [MozPromise.h:48b968826893 : 376 + 0x9]
03:07:52     INFO -     rbx = 0x000000012cc40c10   rbp = 0x00000001312c9ad0
03:07:52     INFO -     rsp = 0x00000001312c9a90   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x000000012c1fc5b0
03:07:52     INFO -     r15 = 0x000000012655fe40   rip = 0x0000000106d2b1e3
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  5  XUL!mozilla::MozPromise<bool, mozilla::MediaResult, true>::DispatchAll() [MozPromise.h:48b968826893 : 735 + 0x8]
03:07:52     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001312c9b10
03:07:52     INFO -     rsp = 0x00000001312c9ae0   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x0000000127952308
03:07:52     INFO -     r15 = 0x000000012655fe40   rip = 0x0000000106d2b038
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  6  XUL!void mozilla::MozPromise<bool, mozilla::MediaResult, true>::Private::Resolve<bool const&>(bool const&&&, char const*) [MozPromise.h:48b968826893 : 792 + 0x8]
03:07:52     INFO -     rbx = 0x000000012655fe40   rbp = 0x00000001312c9b40
03:07:52     INFO -     rsp = 0x00000001312c9b20   r12 = 0x000000010a33a998
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x0000000127952308
03:07:52     INFO -     r15 = 0x0000000108ec2daf   rip = 0x0000000106d2b834
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  7  XUL!mozilla::MozPromise<bool, mozilla::MediaResult, true>::ChainTo(already_AddRefed<mozilla::MozPromise<bool, mozilla::MediaResult, true>::Private>, char const*) [MozPromise.h:48b968826893 : 749 + 0xf]
03:07:52     INFO -     rbx = 0x000000010a33a998   rbp = 0x00000001312c9b80
03:07:52     INFO -     rsp = 0x00000001312c9b50   r12 = 0x00000001279522e0
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x000000012655fe40
03:07:52     INFO -     r15 = 0x0000000108ffd899   rip = 0x0000000106d2adef
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  8  XUL!mozilla::detail::ProxyFunctionRunnable<mozilla::MediaFormatReader::DemuxerProxy::NotifyDataArrived()::$_8, mozilla::MozPromise<bool, mozilla::MediaResult, true> >::Run() [MozPromise.h:48b968826893 : 1146 + 0x13]
03:07:52     INFO -     rbx = 0x0000000125e41bc8   rbp = 0x00000001312c9bc0
03:07:52     INFO -     rsp = 0x00000001312c9b90   r12 = 0x6200ee9782d059e3
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x000000012cc40a00
03:07:52     INFO -     r15 = 0x00000001279522e0   rip = 0x0000000106d2abff
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO -  9  XUL!mozilla::TaskQueue::Runner::Run() [TaskQueue.cpp:48b968826893 : 232 + 0x9]
03:07:52     INFO -     rbx = 0x000000012cfd5550   rbp = 0x00000001312c9c60
03:07:52     INFO -     rsp = 0x00000001312c9bd0   r12 = 0x6200ee9782d059e3
03:07:52     INFO -     r13 = 0x000000010a33ab98   r14 = 0x000000012cc40a00
03:07:52     INFO -     r15 = 0x000000012cc40a30   rip = 0x0000000104ff05ba
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 10  XUL!nsThreadPool::Run() [nsThreadPool.cpp:48b968826893 : 226 + 0x6]
03:07:52     INFO -     rbx = 0x000000012fad7d78   rbp = 0x00000001312c9d00
03:07:52     INFO -     rsp = 0x00000001312c9c70   r12 = 0x0000000000000000
03:07:52     INFO -     r13 = 0x00000001312c9cb8   r14 = 0x000000012fad7d60
03:07:52     INFO -     r15 = 0x00000001312c9cc0   rip = 0x0000000104fffc1b
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 11  XUL!non-virtual thunk to nsThreadPool::Run() [nsThreadPool.cpp:48b968826893 : 153 + 0x9]
03:07:52     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001312c9d10
03:07:52     INFO -     rsp = 0x00000001312c9d10   r12 = 0x0000000130856ac0
03:07:52     INFO -     r13 = 0x0000000000000000   r14 = 0x00000001312c9dd7
03:07:52     INFO -     r15 = 0x0000000130856af0   rip = 0x0000000104fffd3d
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 12  XUL!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:48b968826893 : 1213 + 0x6]
03:07:52     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001312c9dc0
03:07:52     INFO -     rsp = 0x00000001312c9d20   r12 = 0x0000000130856ac0
03:07:52     INFO -     r13 = 0x0000000000000000   r14 = 0x00000001312c9dd7
03:07:52     INFO -     r15 = 0x0000000130856af0   rip = 0x0000000104ff705b
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 13  XUL!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:48b968826893 : 381 + 0xd]
03:07:52     INFO -     rbx = 0x0000000000000000   rbp = 0x00000001312c9de0
03:07:52     INFO -     rsp = 0x00000001312c9dd0   r12 = 0x00000001312c9df8
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000011bedd800
03:07:52     INFO -     r15 = 0x0000000130856ac0   rip = 0x0000000105027523
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 14  XUL!mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) [MessagePump.cpp:48b968826893 : 338 + 0xa]
03:07:52     INFO -     rbx = 0x000000012cfe5e00   rbp = 0x00000001312c9e40
03:07:52     INFO -     rsp = 0x00000001312c9df0   r12 = 0x00000001312c9df8
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000011bedd800
03:07:52     INFO -     r15 = 0x0000000130856ac0   rip = 0x000000010557dffb
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 15  XUL!MessageLoop::Run() [message_loop.cc:48b968826893 : 232 + 0x8]
03:07:52     INFO -     rbx = 0x0000000130856ac0   rbp = 0x00000001312c9e70
03:07:52     INFO -     rsp = 0x00000001312c9e50   r12 = 0x0000000130856b20
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000012cfe5e00
03:07:52     INFO -     r15 = 0x0000000000000001   rip = 0x0000000105514859
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 16  XUL!nsThread::ThreadFunc(void*) [nsThread.cpp:48b968826893 : 467 + 0x8]
03:07:52     INFO -     rbx = 0x0000000130856ac0   rbp = 0x00000001312c9ec0
03:07:52     INFO -     rsp = 0x00000001312c9e80   r12 = 0x0000000130856b20
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000012cfe5e00
03:07:52     INFO -     r15 = 0x0000000000000001   rip = 0x0000000104ff523f
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 17  libnss3.dylib!_pt_root [ptthread.c:48b968826893 : 216 + 0x3]
03:07:52     INFO -     rbx = 0x000000012f1eb7b0   rbp = 0x00000001312c9ef0
03:07:52     INFO -     rsp = 0x00000001312c9ed0   r12 = 0x0000000000015983
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x00000001312ca000
03:07:52     INFO -     r15 = 0x0000000000000000   rip = 0x0000000104c35e6a
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 18  libsystem_pthread.dylib!_pthread_body + 0x83
03:07:52     INFO -     rbx = 0x00000001312ca000   rbp = 0x00000001312c9f10
03:07:52     INFO -     rsp = 0x00000001312c9f00   r12 = 0x0000000000015983
03:07:52     INFO -     r13 = 0x00000000000008ff   r14 = 0x000000012f1eb7b0
03:07:52     INFO -     r15 = 0x0000000104c35d90   rip = 0x00007fff9028005a
03:07:52     INFO -     Found by: call frame info
03:07:52     INFO - 19  libsystem_pthread.dylib!_pthread_start + 0xb0
03:07:52     INFO -     rbp = 0x00000001312c9f50   rsp = 0x00000001312c9f20
03:07:52     INFO -     rip = 0x00007fff9027ffd7
03:07:52     INFO -     Found by: previous frame's frame pointer
03:07:52     INFO - 20  libsystem_pthread.dylib!thread_start + 0xd
03:07:52     INFO -     rbp = 0x00000001312c9f78   rsp = 0x00000001312c9f60
03:07:52     INFO -     rip = 0x00007fff9027d3ed
03:07:52     INFO -     Found by: previous frame's frame pointer
03:07:52     INFO - 21  libnss3.dylib + 0x135d90
03:07:52     INFO -     rsp = 0x00000001312ca030   rip = 0x0000000104c35d90
03:07:52     INFO -     Found by: stack scanning
Flags: needinfo?(jyavenard)
Pushed by jyavenard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/19c468c32d03
P1. Run demuxing operations on its own task queue. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/7df4d36392e7
P2. Update MediaDecoderReader documentation. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/909eee913f30
P3. Remove no longer used seeking argument. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/4ea0f7d805d9
P4. Use Mutex in place of Monitor. r=jwwang
https://hg.mozilla.org/integration/autoland/rev/816eca779bfa
P5. Don't attempt to estimate readyState when ended. r=jwwang
Blocks: 1324357
Blocks: 1325003
Flags: needinfo?(jyavenard)
Depends on: 1326326
Depends on: 1326372
Depends on: 1351053
Depends on: 1437853
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: