Closed Bug 1504060 Opened 6 years ago Closed 6 years ago

Assertion failure: trackEndTime >= tstamp, at src/dom/media/webm/WebMDemuxer.cpp:621

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox-esr60 --- unaffected
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: tsmith, Assigned: bryce)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached video testcase.webm
Reduced with m-c: BuildID=20181101133336 SourceStamp=182a1b088330a2d72310ae2561004d955571e236 Assertion failure: trackEndTime >= tstamp, at src/dom/media/webm/WebMDemuxer.cpp:621 #0 auto mozilla::WebMDemuxer::GetNextPacket(mozilla::TrackInfo::TrackType, mozilla::MediaRawDataQueue*)::$_2::operator()<void (mozilla::WebMDemuxer::*)(mozilla::NesteggPacketHolder*), mozilla::Maybe<long>&, long>(void (mozilla::WebMDemuxer::*&&)(mozilla::NesteggPacketHolder*), mozilla::Maybe<long>&, long&&) const src/dom/media/webm/WebMDemuxer.cpp:617:9 #1 mozilla::WebMDemuxer::GetNextPacket(mozilla::TrackInfo::TrackType, mozilla::MediaRawDataQueue*) src/dom/media/webm/WebMDemuxer.cpp:632:5 #2 mozilla::WebMTrackDemuxer::NextSample(RefPtr<mozilla::MediaRawData>&) src/dom/media/webm/WebMDemuxer.cpp:1160:10 #3 mozilla::WebMTrackDemuxer::GetSamples(int) src/dom/media/webm/WebMDemuxer.cpp:1179:10 #4 mozilla::MediaFormatReader::DemuxerProxy::Wrapper::GetSamples(int)::'lambda'()::operator()() const src/dom/media/MediaFormatReader.cpp:881:54 #5 mozilla::detail::ProxyFunctionRunnable<mozilla::MediaFormatReader::DemuxerProxy::Wrapper::GetSamples(int)::'lambda'(), mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true> >::Run() src/obj-firefox/dist/include/mozilla/MozPromise.h:1517:29 #6 mozilla::TaskQueue::Runner::Run() src/xpcom/threads/TaskQueue.cpp:235:12 #7 nsThreadPool::Run() src/xpcom/threads/nsThreadPool.cpp:242:14 #8 non-virtual thunk to nsThreadPool::Run() src/xpcom/threads/nsThreadPool.cpp #9 nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1245:14 #10 NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:530:10 #11 mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:334:20 #12 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:325:10 #13 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:298:3 #14 nsThread::ThreadFunc(void*) src/xpcom/threads/nsThread.cpp:505:11 #15 _pt_root src/nsprpub/pr/src/pthreads/ptthread.c:201:5 #16 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76b9) #17 clone /build/glibc-Cl5G7W/glibc-2.23/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:109
Flags: in-testsuite?
Rank: 25
Priority: -- → P3

Just run into this while looking at bug 1530835. Even created my own test case before realizing we already have a bug and one here.

These WebM's have samples with timestamps greater than the duration specified in the segment header. This shouldn't happen in the sense that muxers shouldn't make such files. However, if muxers are going to misbehave and make such files, there's nothing in our code that prevents this condition firing (as we see in this bug).

I think we should relax the assertion here to instead be a log. We could also take the larger of the segment duration or sample timestamp.

We're able to hit this assertion in the wild due to bad muxers. As such, replace
the assert with a log. If a sample has a time stamp > the segment duration, use
that instead of the duration for calculating our next time stamp. Use an
explicit int64_t type in the signature for our next time stamp calculation
as the logging explicitly expects an int64_t (makes it harder to change the
types involved and footgunning by having a wrong formatter in the logs).

Pushed by bvandyk@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2d1930ba617f Log instead of asserting that webm samples do not have timestamps > segment druation. r=alwu
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Assignee: nobody → bvandyk
Flags: in-testsuite? → in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: