Closed Bug 1758527 Opened 3 years ago Closed 3 years ago

Assertion failure: !rv.Failed() (We should only fail to play when using auto-rewind behavior), at /dom/animation/Animation.cpp:489

Categories

(Core :: DOM: Animation, defect)

x86_64
Linux
defect

Tracking

()

VERIFIED FIXED
100 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- verified

People

(Reporter: jkratzer, Assigned: boris)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, testcase, Whiteboard: [bugmon:bisected,confirmed], [wptsync upstream])

Attachments

(2 files)

Testcase found while fuzzing mozilla-central rev 11820f4551ab (built with: --enable-debug --enable-fuzzing).

Testcase can be reproduced using the following commands:

$ pip install fuzzfetch grizzly-framework
$ python -m fuzzfetch --build 11820f4551ab --debug --fuzzing -n firefox
$ python -m grizzly.replay ./firefox/firefox testcase.html
Assertion failure: !rv.Failed() (We should only fail to play when using auto-rewind behavior), at /dom/animation/Animation.cpp:489

    ==127317==ERROR: UndefinedBehaviorSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7ff291cf35d0 bp 0x7ffd1e324840 sp 0x7ffd1e324790 T127317)
    ==127317==The signal is caused by a WRITE memory access.
    ==127317==Hint: address points to the zero page.
        #0 0x7ff291cf35d0 in mozilla::dom::Animation::UpdatePlaybackRate(double) /dom/animation/Animation.cpp:488:5
        #1 0x7ff2922e790c in mozilla::dom::Animation_Binding::updatePlaybackRate(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/AnimationBinding.cpp:1220:24
        #2 0x7ff29355d3a8 in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::NormalThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /dom/bindings/BindingUtils.cpp:3307:13
        #3 0x7ff2974f98bf in CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) /js/src/vm/Interpreter.cpp:425:13
        #4 0x7ff2974f8fbd in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:512:12
        #5 0x7ff2974faa9e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /js/src/vm/Interpreter.cpp:572:10
        #6 0x7ff2974f0356 in CallFromStack /js/src/vm/Interpreter.cpp:576:10
        #7 0x7ff2974f0356 in Interpret(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:3309:16
        #8 0x7ff2974e7253 in js::RunScript(JSContext*, js::RunState&) /js/src/vm/Interpreter.cpp:394:13
        #9 0x7ff2974f8eb8 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /js/src/vm/Interpreter.cpp:544:13
        #10 0x7ff2974faa9e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /js/src/vm/Interpreter.cpp:572:10
        #11 0x7ff2974faca1 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /js/src/vm/Interpreter.cpp:589:8
        #12 0x7ff29762d3a1 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /js/src/vm/CallAndConstruct.cpp:117:10
        #13 0x7ff29327c6b7 in mozilla::dom::EventListener::HandleEvent(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/EventListenerBinding.cpp:62:8
        #14 0x7ff293ac3176 in void mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/EventListenerBinding.h:65:12
        #15 0x7ff293ac2efa in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) /dom/events/EventListenerManager.cpp:1310:43
        #16 0x7ff293ac3bf9 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) /dom/events/EventListenerManager.cpp:1507:17
        #17 0x7ff293ab8c04 in HandleEvent /dom/events/EventListenerManager.h:395:5
        #18 0x7ff293ab8c04 in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:348:17
        #19 0x7ff293ab8127 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /dom/events/EventDispatcher.cpp:550:16
        #20 0x7ff293aba988 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /dom/events/EventDispatcher.cpp:1085:11
        #21 0x7ff29561c4f3 in nsDocumentViewer::LoadComplete(nsresult) /layout/base/nsDocumentViewer.cpp:1084:7
        #22 0x7ff296c63a64 in nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /docshell/base/nsDocShell.cpp:6416:20
        #23 0x7ff296c63553 in nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /docshell/base/nsDocShell.cpp:5805:7
        #24 0x7ff296c643ef in non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /docshell/base/nsDocShell.cpp
        #25 0x7ff2914e0c8c in nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /uriloader/base/nsDocLoader.cpp:1377:3
        #26 0x7ff2914e00ba in nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /uriloader/base/nsDocLoader.cpp:975:14
        #27 0x7ff2914de440 in nsDocLoader::DocLoaderIsEmpty(bool, mozilla::Maybe<nsresult> const&) /uriloader/base/nsDocLoader.cpp:794:9
        #28 0x7ff2914df5fd in nsDocLoader::OnStopRequest(nsIRequest*, nsresult) /uriloader/base/nsDocLoader.cpp:677:5
        #29 0x7ff296c8569d in nsDocShell::OnStopRequest(nsIRequest*, nsresult) /docshell/base/nsDocShell.cpp:13792:23
        #30 0x7ff29082b74a in mozilla::net::nsLoadGroup::NotifyRemovalObservers(nsIRequest*, nsresult) /netwerk/base/nsLoadGroup.cpp:614:22
        #31 0x7ff29082cd33 in mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /netwerk/base/nsLoadGroup.cpp:518:10
        #32 0x7ff291f94bde in mozilla::dom::Document::DoUnblockOnload() /dom/base/Document.cpp:11545:18
        #33 0x7ff291f5f61f in mozilla::dom::Document::UnblockOnload(bool) /dom/base/Document.cpp:11483:9
        #34 0x7ff291f7b62b in mozilla::dom::Document::DispatchContentLoadedEvents() /dom/base/Document.cpp:8018:3
        #35 0x7ff29202e8ab in applyImpl<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1147:12
        #36 0x7ff29202e8ab in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1153:12
        #37 0x7ff29202e8ab in mozilla::detail::RunnableMethodImpl<mozilla::dom::Document*, void (mozilla::dom::Document::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1200:13
        #38 0x7ff29062dac2 in mozilla::SchedulerGroup::Runnable::Run() /xpcom/threads/SchedulerGroup.cpp:140:20
        #39 0x7ff29065ebce in mozilla::RunnableTask::Run() /xpcom/threads/TaskController.cpp:467:16
        #40 0x7ff290637bb6 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:770:26
        #41 0x7ff290636878 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /xpcom/threads/TaskController.cpp:606:15
        #42 0x7ff290636af3 in mozilla::TaskController::ProcessPendingMTTask(bool) /xpcom/threads/TaskController.cpp:390:36
        #43 0x7ff2906621a6 in operator() /xpcom/threads/TaskController.cpp:124:37
        #44 0x7ff2906621a6 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:531:5
        #45 0x7ff29064cb43 in nsThread::ProcessNextEvent(bool, bool*) /xpcom/threads/nsThread.cpp:1173:16
        #46 0x7ff29065405a in NS_ProcessNextEvent(nsIThread*, bool) /xpcom/threads/nsThreadUtils.cpp:467:10
        #47 0x7ff2911f5266 in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:85:21
        #48 0x7ff291114cd7 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #49 0x7ff291114be2 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #50 0x7ff291114be2 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #51 0x7ff295271fd8 in nsBaseAppShell::Run() /widget/nsBaseAppShell.cpp:137:27
        #52 0x7ff29737a9c3 in XRE_RunAppShell() /toolkit/xre/nsEmbedFunctions.cpp:870:20
        #53 0x7ff2911f615a in mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /ipc/glue/MessagePump.cpp:235:9
        #54 0x7ff291114cd7 in MessageLoop::RunInternal() /ipc/chromium/src/base/message_loop.cc:331:10
        #55 0x7ff291114be2 in RunHandler /ipc/chromium/src/base/message_loop.cc:324:3
        #56 0x7ff291114be2 in MessageLoop::Run() /ipc/chromium/src/base/message_loop.cc:306:3
        #57 0x7ff297379ff9 in XRE_InitChildProcess(int, char**, XREChildData const*) /toolkit/xre/nsEmbedFunctions.cpp:729:34
        #58 0x5597f8a092f7 in content_process_main /browser/app/../../ipc/contentproc/plugin-container.cpp:57:28
        #59 0x5597f8a092f7 in main /browser/app/nsBrowserApp.cpp:327:18
        #60 0x7ff2a79130b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
        #61 0x5597f89e4a7c in _start (/home/jkratzer/builds/mc-debug/firefox-bin+0x15a7c)
    
    UndefinedBehaviorSanitizer can not provide additional info.
    SUMMARY: UndefinedBehaviorSanitizer: SEGV /dom/animation/Animation.cpp:488:5 in mozilla::dom::Animation::UpdatePlaybackRate(double)
    ==127317==ABORTING
Attached file Testcase

Bugmon Analysis
Verified bug as reproducible on mozilla-central 20220308220159-c06bbb0ddc24.
The bug appears to have been introduced in the following build range:

Start: 5a84459b540a02cfe7c4baba89659b4cfed9f788 (20211208012624)
End: 794339ec8d80bd3b50e27124fa6ca703e43cec80 (20211208111009)
Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5a84459b540a02cfe7c4baba89659b4cfed9f788&tochange=794339ec8d80bd3b50e27124fa6ca703e43cec80

Keywords: regression
Whiteboard: [bugmon:confirm] → [bugmon:bisected,confirmed]

I'm guessing this is bug 1676791

Flags: needinfo?(boris.chiou)
Regressed by: 1676791

Set release status flags based on info from the regressing bug 1676791

Has Regression Range: --- → yes

Thanks for the ni?. Should take a look at this. :)

Assignee: nobody → boris.chiou
Flags: needinfo?(boris.chiou)

Based on the step 5 in spec [1], the unresolved current time should be
checked only if the auto-rewind flag is ture. Otherwise, the null
timeline without auto-rewind flag may get an InvalidStateError DOMException
if its effect end is positive infinity.

Note: if the animation has no associated timeline, it's current time is
unresolved [2].

[1] https://drafts.csswg.org/web-animations-1/#playing-an-animation-section
[2] https://drafts.csswg.org/web-animations-1/#animation-current-time

Attachment #9267087 - Attachment description: Bug 1758527 - Adjust the logic of setting seek time in Animaiton::PlayNoUpdate(). → Bug 1758527 - Adjust the logic of setting seekTime in Animaiton::PlayNoUpdate().
Attachment #9267087 - Attachment description: Bug 1758527 - Adjust the logic of setting seekTime in Animaiton::PlayNoUpdate(). → Bug 1758527 - Adjust the logic of handing the unresolved current time in PlayNoUpdate and UpdatePlaybackRate().
Attachment #9267087 - Attachment description: Bug 1758527 - Adjust the logic of handing the unresolved current time in PlayNoUpdate and UpdatePlaybackRate(). → Bug 1758527 - Adjust the logic of handing the unresolved current time in PlayNoUpdate() and UpdatePlaybackRate().
Pushed by bchiou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e34abd14507f Adjust the logic of handing the unresolved current time in PlayNoUpdate() and UpdatePlaybackRate(). r=birtles
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/33314 for changes under testing/web-platform/tests
Whiteboard: [bugmon:bisected,confirmed] → [bugmon:bisected,confirmed], [wptsync upstream]
Regressions: 1760927
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch

Bugmon Analysis
Verified bug as fixed on rev mozilla-central 20220323040913-10178bda5cdd.
Removing bugmon keyword as no further action possible. Please review the bug and re-add the keyword for further analysis.

Status: RESOLVED → VERIFIED
Keywords: bugmon
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: