Closed Bug 1905232 Opened 2 years ago Closed 9 months ago

Assertion failure: (detail::IsInBounds<From, To>(aFrom)), at /builds/worker/workspace/obj-build/dist/include/mozilla/Casting.h:183

Categories

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

defect

Tracking

()

RESOLVED FIXED
149 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox129 --- wontfix
firefox147 --- wontfix
firefox148 --- wontfix
firefox149 --- fixed

People

(Reporter: tsmith, Assigned: padenot)

References

Details

(Keywords: assertion, testcase, Whiteboard: [bugmon:bisected,confirmed])

Attachments

(1 file)

Attached video testcase.webm —

Found while fuzzing m-c 20240625-a7d69e48affb (--enable-debug --enable-fuzzing)

To reproduce via Grizzly Replay:

$ pip install fuzzfetch grizzly-framework --upgrade
$ python -m fuzzfetch -d --fuzzing -n firefox
$ python -m grizzly.replay.bugzilla ./firefox/firefox <bugid>

Assertion failure: (detail::IsInBounds<From, To>(aFrom)), at /builds/worker/workspace/obj-build/dist/include/mozilla/Casting.h:183

#0 0x7ac34440fb6d in AssertedCast<long, double> /builds/worker/workspace/obj-build/dist/include/mozilla/Casting.h:183:3
#1 0x7ac34440fb6d in mozilla::media::TimeUnit mozilla::media::TimeUnit::ToBase<mozilla::media::TimeUnit::TruncatePolicy>(long, double&) const /builds/worker/checkouts/gecko/dom/media/TimeUnits.h:220:21
#2 0x7ac344801ae8 in mozilla::media::TimeUnit::operator+(mozilla::media::TimeUnit const&) const /builds/worker/checkouts/gecko/dom/media/TimeUnits.cpp:288:28
#3 0x7ac344606691 in Shift /builds/worker/checkouts/gecko/dom/media/Intervals.h:650:41
#4 0x7ac344606691 in mozilla::MediaFormatReader::UpdateBuffered() /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:3278:27
#5 0x7ac344605890 in mozilla::MediaFormatReader::MaybeResolveMetadataPromise() /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1357:3
#6 0x7ac344620da9 in mozilla::MediaFormatReader::OnFirstDemuxCompleted(mozilla::TrackInfo::TrackType, RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder> const&) /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:3474:3
#7 0x7ac344732700 in operator() /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1569:17
#8 0x7ac344732700 in InvokeMethod<(lambda at /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1564:9), RefPtr<mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true> > ((lambda at /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1564:9)::*)(RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>) const, RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder> > /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:652:12
#9 0x7ac344732700 in InvokeCallbackMethod<true, (lambda at /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1564:9), RefPtr<mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true> > ((lambda at /builds/worker/checkouts/gecko/dom/media/MediaFormatReader.cpp:1564:9)::*)(RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>) const, RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, RefPtr<mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true>::Private> > /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:668:14
#10 0x7ac344732700 in mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true>::ThenValue<mozilla::MediaFormatReader::DoDemuxVideo()::$_0, mozilla::MediaFormatReader::DoDemuxVideo()::$_1>::DoResolveOrRejectInternal(mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true>::ResolveOrRejectValue&) /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:857:9
#11 0x7ac3444dcb95 in mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true>::ThenValueBase::ResolveOrRejectRunnable::Run() /builds/worker/workspace/obj-build/dist/include/mozilla/MozPromise.h:488:21
#12 0x7ac34060a0f8 in mozilla::TaskQueue::Runner::Run() /builds/worker/checkouts/gecko/xpcom/threads/TaskQueue.cpp:257:20
#13 0x7ac340633bf8 in nsThreadPool::Run() /builds/worker/checkouts/gecko/xpcom/threads/nsThreadPool.cpp:456:14
#14 0x7ac340629c7c in nsThread::ProcessNextEvent(bool, bool*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:1198:16
#15 0x7ac340630aef in NS_ProcessNextEvent(nsIThread*, bool) /builds/worker/checkouts/gecko/xpcom/threads/nsThreadUtils.cpp:480:10
#16 0x7ac3412dee8c in mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) /builds/worker/checkouts/gecko/ipc/glue/MessagePump.cpp:300:20
#17 0x7ac3411f4ba1 in RunHandler /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:363:3
#18 0x7ac3411f4ba1 in MessageLoop::Run() /builds/worker/checkouts/gecko/ipc/chromium/src/base/message_loop.cc:345:3
#19 0x7ac340624e33 in nsThread::ThreadFunc(void*) /builds/worker/checkouts/gecko/xpcom/threads/nsThread.cpp:370:10
#20 0x7ac355279c2f in _pt_root /builds/worker/checkouts/gecko/nsprpub/pr/src/pthreads/ptthread.c:201:5
#21 0x7ac354c94ac2 in start_thread nptl/pthread_create.c:442:8
#22 0x7ac354d2684f  misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Flags: in-testsuite?

Verified bug as reproducible on mozilla-central 20240708220117-162448b8b7cd.
Unable to bisect testcase (Testcase reproduces on start build!):

Start: b6a3e16c65e1298418f1aaf966dd3071d644075b (20230711040652)
End: a7d69e48affbb339e57fa5845eadc38192774df4 (20240625161754)
BuildFlags: BuildFlags(asan=False, tsan=False, debug=True, fuzzing=True, coverage=False, valgrind=False, no_opt=False, fuzzilli=False, nyx=False)

Whiteboard: [bugmon:bisected,confirmed]

The severity field is not set for this bug.
:jimm, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jmathies)

Hi, Matthews, would you mind check this bug as well? This test file is similar with the one in bug 1905231, they both have very large and weird start time. For this bug, the start time is too large, so when we do this, the result will be out of the range of int64_t.

AssertedCast error: Cannot cast -17583714220355354624.000000 from double to int64_t: out of range

That let me wonder if the WebMDemuxer should not really parse those insane start time? Thanks!

Severity: -- → S3
Flags: needinfo?(jmathies) → needinfo?(kinetik)
Priority: -- → P3

Testcase crashes using the initial build (mozilla-central 20250214215152-8e442c6e7765) but not with tip (mozilla-central 20260213212122-0d74a4189e30.)

The bug appears to have been fixed in the following build range:

Start: ea5a986855ad67105b545f53c1946e003f8b47a7 (20260213122529)
End: bbc1d11e5998487794afbe30e092f7e269fa2121 (20260213133352)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=ea5a986855ad67105b545f53c1946e003f8b47a7&tochange=bbc1d11e5998487794afbe30e092f7e269fa2121

tsmith, can you confirm that the above bisection range is responsible for fixing this issue?
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Flags: needinfo?(kinetik) → needinfo?(twsmith)
Keywords: bugmon

I can confirm this is no longer reproducible likely fixed by Bug 2014895.

Also restoring original ni?

Flags: needinfo?(twsmith) → needinfo?(kinetik)

Actually let's just mark this as fixed.

Status: NEW → RESOLVED
Closed: 9 months ago
Flags: needinfo?(kinetik)
Resolution: --- → FIXED

Is this test worth landing still?

Assignee: nobody → padenot
Depends on: 2014895
Flags: needinfo?(padenot)
Target Milestone: --- → 149 Branch

No I don't think so

Flags: needinfo?(padenot)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: