Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in /html/browsers/the-window-object/self-et-al.window.html #28298

Open
pecastro opened this issue Mar 18, 2021 · 5 comments
Open

Crash in /html/browsers/the-window-object/self-et-al.window.html #28298

pecastro opened this issue Mar 18, 2021 · 5 comments
Labels
A-content/script Related to the script thread E-candidate-for-mentoring I-panic Servo encounters a panic.

Comments

@pecastro
Copy link
Contributor

 0:05.99 TEST_START: /html/browsers/the-window-object/self-et-al.window.html
 0:05.99 WARNING Got command init_succeeded in state running
 0:09.75 pid:87516 Full command: /servo/target/debug/servo --hard-fail -u Servo/wptrunner http://web-platform.test:8000/html/browsers/the-window-object/self-et-al.window.html -Z replace-surrogates --user-stylesheet /servo/resources/ahem.css --pref dom.imagebitmap.enabled=true --certificate-path /servo/tests/wpt/web-platform-tests/tools/certs/cacert.pem
pid:87516 [2021-03-18T00:11:14Z ERROR servo::browser] Multiple top level browsing contexts not supported yet.
 0:09.83 pid:87516 [2021-03-18T00:11:14Z ERROR servo::browser] Multiple top level browsing contexts not supported yet.
 0:09.89 pid:87516 [2021-03-18T00:11:14Z ERROR servo::browser] Multiple top level browsing contexts not supported yet.
 0:09.99 pid:87516 [2021-03-18T00:11:14Z ERROR servo::browser] Multiple top level browsing contexts not supported yet.
 0:10.32 pid:87516 called `Option::unwrap()` on a `None` value (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/window.rs:444)
 0:17.21 pid:87516    0: servo::backtrace::print
 0:17.21 pid:87516              at /servo/ports/winit/backtrace.rs:17:5
 0:17.21 pid:87516    1: servo::main::{{closure}}
 0:17.21 pid:87516              at /servo/ports/winit/main2.rs:134:21
 0:17.34 pid:87516    2: std::panicking::rust_panic_with_hook
 0:17.34 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:595:17
 0:17.34 pid:87516    3: std::panicking::begin_panic_handler::{{closure}}
 0:17.34 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:495:13
 0:17.34 pid:87516    4: std::sys_common::backtrace::__rust_end_short_backtrace
 0:17.34 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/sys_common/backtrace.rs:141:18
 0:17.34 pid:87516    5: rust_begin_unwind
 0:17.34 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:493:5
 0:17.39 pid:87516    6: core::panicking::panic_fmt
 0:17.39 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/panicking.rs:92:14
 0:17.39 pid:87516    7: core::panicking::panic
 0:17.39 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/panicking.rs:50:5
 0:17.67 pid:87516    8: core::option::Option<T>::unwrap
 0:17.68 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/option.rs:386:21
 0:17.76 pid:87516    9: script::dom::window::Window::window_proxy
 0:17.76 pid:87516              at /servo/components/script/dom/window.rs:444:9
 0:17.76 pid:87516   10: <script::dom::window::Window as script::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods>::Frames
 0:17.76 pid:87516              at /servo/components/script/dom/window.rs:938:9
 0:17.86 pid:87516   11: script::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::get_frames::{{closure}}::{{closure}}
 0:17.86 pid:87516              at /servo/target/debug/build/script-6c040b1db48aa0ea/out/Bindings/WindowBinding.rs:1596:44
 0:17.87 pid:87516   12: script::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::get_frames::{{closure}}
 0:17.87 pid:87516              at /servo/target/debug/build/script-6c040b1db48aa0ea/out/Bindings/WindowBinding.rs:1593:33
 0:17.87 pid:87516   13: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
 0:17.87 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/ops/function.rs:280:13
 0:17.87 pid:87516   14: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
 0:17.87 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panic.rs:344:9
 0:17.87 pid:87516   15: std::panicking::try::do_call
 0:17.87 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:379:40
 0:17.87 pid:87516   16: __rust_try
 0:17.87 pid:87516   17: std::panicking::try
 0:17.87 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:343:19
 0:17.87 pid:87516   18: std::panic::catch_unwind
 0:17.87 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panic.rs:431:14
 0:17.88 pid:87516   19: mozjs::panic::wrap_panic
 0:17.88 pid:87516              at /home/pecastro/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/b8122da/src/panic.rs:22:11
 0:17.96 pid:87516   20: script::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::get_frames
 0:17.96 pid:87516              at /servo/target/debug/build/script-6c040b1db48aa0ea/out/Bindings/WindowBinding.rs:1593:5
 0:17.99 pid:87516   21: CallJitGetterOp
 0:17.99 pid:87516              at /home/pecastro/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/b8122da/src/jsglue.cpp:571:12
 0:18.07 pid:87516   22: script::dom::bindings::utils::generic_call
 0:18.07 pid:87516              at /servo/components/script/dom/bindings/utils.rs:563:5
 0:18.07 pid:87516   23: script::dom::bindings::utils::generic_getter
 0:18.07 pid:87516              at /servo/components/script/dom/bindings/utils.rs:588:5
 0:18.32 pid:87516   24: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
 0:18.32 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:507:13
 0:18.32 pid:87516       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:18.32 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:599:12
 0:18.32 pid:87516   25: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:18.32 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:18.32 pid:87516       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
 0:18.32 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:681:8
 0:18.32 pid:87516       _ZN2js10CallGetterEP9JSContextN2JS6HandleINS2_5ValueEEES5_NS2_13MutableHandleIS4_EE
 0:18.32 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:805:10
 0:18.68 pid:87516   26: _ZL10CallGetterP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEENS2_IPN2js5ShapeEEENS1_13MutableHandleIS6_EE
 0:18.68 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/NativeObject.cpp:2382:12
 0:18.68 pid:87516       _ZL19GetExistingPropertyILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIN2JS5ValueEXT_EE10HandleTypeENS4_IPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IPNS0_5ShapeEXT_EE10HandleTypeENS7_17MutableHandleTypeE
 0:18.68 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/NativeObject.cpp:2434:12
 0:18.69 pid:87516       _ZL23NativeGetPropertyInlineILN2js7AllowGCE1EEbP9JSContextNS0_11MaybeRootedIPNS0_12NativeObjectEXT_EE10HandleTypeENS4_IN2JS5ValueEXT_EE10HandleTypeENS4_INS9_11PropertyKeyEXT_EE10HandleTypeE12IsNameLookupNSB_17MutableHandleTypeE
 0:18.69 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/NativeObject.cpp:2579:14
 0:18.69 pid:87516       _ZN2js17NativeGetPropertyEP9JSContextN2JS6HandleIPNS_12NativeObjectEEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
 0:18.69 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/NativeObject.cpp:2616:10
 0:18.77 pid:87516   27: script::dom::windowproxy::get
 0:18.77 pid:87516              at /servo/components/script/dom/windowproxy.rs:997:5
 0:18.77 pid:87516   28: _ZNK19WrapperProxyHandler3getEP9JSContextN2JS6HandleIP8JSObjectEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
 0:18.77 pid:87516              at /home/pecastro/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/b8122da/src/jsglue.cpp:366:5
 0:18.94 pid:87516   29: _ZN2js5Proxy11getInternalEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:18.94 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/Proxy.cpp:471:19
 0:18.94 pid:87516       _ZN2js5Proxy3getEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:18.95 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/Proxy.cpp:479:10
 0:19.08 pid:87516   30: _ZN2js11GetPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
 0:19.08 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/ObjectOperations-inl.h:114:12
 0:19.08 pid:87516       _ZNK2js22ForwardingProxyHandler3getEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:19.08 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/Wrapper.cpp:144:10
 0:19.33 pid:87516   31: _ZNK2js23CrossCompartmentWrapper3getEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:19.33 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/CrossCompartmentWrapper.cpp:190:19
 0:19.33 pid:87516   32: _ZN2js5Proxy11getInternalEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:19.33 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/Proxy.cpp:471:19
 0:19.33 pid:87516       _ZN2js5Proxy3getEP9JSContextN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEENS4_INS3_11PropertyKeyEEENS3_13MutableHandleIS8_EE
 0:19.33 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/proxy/Proxy.cpp:479:10
 0:19.39 pid:87516   33: _ZN2js11GetPropertyEP9JSContextN2JS6HandleIP8JSObjectEENS3_INS2_5ValueEEENS3_INS2_11PropertyKeyEEENS2_13MutableHandleIS7_EE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/ObjectOperations-inl.h:114:12
 0:19.39 pid:87516       _ZN2jsL25GetObjectElementOperationEP9JSContext4JSOpN2JS6HandleIP8JSObjectEENS4_INS3_5ValueEEES9_NS3_13MutableHandleIS8_EE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter-inl.h:455:10
 0:19.39 pid:87516       _ZN2jsL33GetElementOperationWithStackIndexEP9JSContext4JSOpN2JS6HandleINS3_5ValueEEEiS6_NS3_13MutableHandleIS5_EE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter-inl.h:569:10
 0:19.39 pid:87516       _ZL9InterpretP9JSContextRN2js8RunStateE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:3141:14
 0:19.39 pid:87516   34: _ZN2js9RunScriptEP9JSContextRNS_8RunStateE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:477:13
 0:19.39 pid:87516   35: _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:636:13
 0:19.39 pid:87516   36: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.39 pid:87516       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
 0:19.39 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:681:8
 0:19.83 pid:87516   37: _ZN2js9fun_applyEP9JSContextjPN2JS5ValueE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/JSFunction.cpp:1210:10
 0:19.83 pid:87516   38: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:507:13
 0:19.83 pid:87516       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:599:12
 0:19.83 pid:87516   39: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.83 pid:87516       _ZN2js13CallFromStackEP9JSContextRKN2JS8CallArgsE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:668:10
 0:19.83 pid:87516       _ZL9InterpretP9JSContextRN2js8RunStateE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:3337:16
 0:19.83 pid:87516   40: _ZN2js9RunScriptEP9JSContextRNS_8RunStateE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:477:13
 0:19.83 pid:87516   41: _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:636:13
 0:19.83 pid:87516   42: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.83 pid:87516       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:681:8
 0:19.83 pid:87516   43: _ZN2js9fun_applyEP9JSContextjPN2JS5ValueE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/JSFunction.cpp:1210:10
 0:19.83 pid:87516   44: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:507:13
 0:19.83 pid:87516       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.83 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:599:12
 0:19.84 pid:87516   45: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.84 pid:87516       _ZN2js13CallFromStackEP9JSContextRKN2JS8CallArgsE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:668:10
 0:19.84 pid:87516       _ZL9InterpretP9JSContextRN2js8RunStateE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:3337:16
 0:19.84 pid:87516   46: _ZN2js9RunScriptEP9JSContextRNS_8RunStateE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:477:13
 0:19.84 pid:87516   47: _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:636:13
 0:19.84 pid:87516   48: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.84 pid:87516       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:681:8
 0:19.84 pid:87516   49: _ZN2js9fun_applyEP9JSContextjPN2JS5ValueE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/JSFunction.cpp:1210:10
 0:19.84 pid:87516   50: _Z12CallJSNativeP9JSContextPFbS0_jPN2JS5ValueEEN2js10CallReasonERKNS1_8CallArgsE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:507:13
 0:19.84 pid:87516       _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:599:12
 0:19.84 pid:87516   51: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.84 pid:87516       _ZN2js13CallFromStackEP9JSContextRKN2JS8CallArgsE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:668:10
 0:19.84 pid:87516       _ZL9InterpretP9JSContextRN2js8RunStateE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:3337:16
 0:19.84 pid:87516   52: _ZN2js9RunScriptEP9JSContextRNS_8RunStateE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:477:13
 0:19.84 pid:87516   53: _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructENS_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:636:13
 0:19.84 pid:87516   54: _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsENS1_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:664:10
 0:19.84 pid:87516       _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EENS_10CallReasonE
 0:19.84 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/vm/Interpreter.cpp:681:8
 0:20.13 pid:87516   55: _Z20JS_CallFunctionValueP9JSContextN2JS6HandleIP8JSObjectEENS2_INS1_5ValueEEERKNS1_16HandleValueArrayENS1_13MutableHandleIS6_EE
 0:20.13 pid:87516              at /home/pecastro/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/c6c7b53/mozjs/js/src/jsapi.cpp:2767:10
 0:20.23 pid:87516   56: mozjs::rust::wrappers::JS_CallFunctionValue
 0:20.23 pid:87516              at /home/pecastro/.cargo/git/checkouts/rust-mozjs-8611526964119dd6/b8122da/src/rust.rs:1448:51
 0:20.32 pid:87516   57: script::dom::bindings::codegen::Bindings::FunctionBinding::Function::Call
 0:20.32 pid:87516              at /servo/target/debug/build/script-6c040b1db48aa0ea/out/Bindings/FunctionBinding.rs:325:18
 0:20.41 pid:87516   58: script::dom::bindings::codegen::Bindings::FunctionBinding::Function::Call_
 0:20.41 pid:87516              at /servo/target/debug/build/script-6c040b1db48aa0ea/out/Bindings/FunctionBinding.rs:297:18
 0:20.50 pid:87516   59: script::timers::JsTimerTask::invoke
 0:20.50 pid:87516              at /servo/components/script/timers.rs:555:25
 0:20.50 pid:87516   60: script::timers::OneshotTimerCallback::invoke
 0:20.50 pid:87516              at /servo/components/script/timers.rs:88:52
 0:20.59 pid:87516   61: script::timers::OneshotTimers::fire_timer
 0:20.59 pid:87516              at /servo/components/script/timers.rs:230:13
 0:20.67 pid:87516   62: script::dom::globalscope::GlobalScope::fire_timer
 0:20.67 pid:87516              at /servo/components/script/dom/globalscope.rs:2782:9
 0:20.77 pid:87516   63: script::dom::globalscope::TimerListener::handle::{{closure}}
 0:20.77 pid:87516              at /servo/components/script/dom/globalscope.rs:497:17
 0:21.48 pid:87516   64: core::ops::function::FnOnce::call_once
 0:21.48 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/ops/function.rs:227:5
 0:21.48 pid:87516   65: <script::dom::globalscope::TimerListener::handle::timer_event<F> as script::task::TaskOnce>::run_once
 0:21.48 pid:87516              at /servo/components/script/task.rs:24:17
 0:21.58 pid:87516   66: <script::task::CancellableTask<T> as script::task::TaskOnce>::run_once
 0:21.58 pid:87516              at /servo/components/script/task.rs:114:13
 0:21.58 pid:87516   67: <T as script::task::TaskBox>::run_box
 0:21.58 pid:87516              at /servo/components/script/task.rs:57:9
 0:21.67 pid:87516   68: script::script_thread::ScriptThread::handle_msg_from_script
 0:21.67 pid:87516              at /servo/components/script/script_thread.rs:2101:82
 0:21.77 pid:87516   69: script::script_thread::ScriptThread::handle_msgs::{{closure}}
 0:21.77 pid:87516              at /servo/components/script/script_thread.rs:1650:46
 0:21.77 pid:87516   70: script::script_thread::ScriptThread::profile_event
 0:21.77 pid:87516              at /servo/components/script/script_thread.rs:1893:13
 0:21.77 pid:87516   71: script::script_thread::ScriptThread::handle_msgs
 0:21.77 pid:87516              at /servo/components/script/script_thread.rs:1643:26
 0:21.77 pid:87516   72: script::script_thread::ScriptThread::start
 0:21.77 pid:87516              at /servo/components/script/script_thread.rs:1447:15
 0:21.77 pid:87516   73: <script::script_thread::ScriptThread as script_traits::ScriptThreadFactory>::create::{{closure}}::{{closure}}
 0:21.77 pid:87516              at /servo/components/script/script_thread.rs:834:25
 0:21.86 pid:87516   74: profile_traits::mem::ProfilerChan::run_with_memory_reporting
 0:21.86 pid:87516              at /servo/components/profile_traits/mem.rs:88:9
 0:21.86 pid:87516   75: <script::script_thread::ScriptThread as script_traits::ScriptThreadFactory>::create::{{closure}}
 0:21.86 pid:87516              at /servo/components/script/script_thread.rs:832:17
 0:21.96 pid:87516   76: std::sys_common::backtrace::__rust_begin_short_backtrace
 0:21.96 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/sys_common/backtrace.rs:125:18
 0:22.05 pid:87516   77: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
 0:22.05 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/thread/mod.rs:474:17
 0:22.15 pid:87516   78: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
 0:22.15 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panic.rs:344:9
 0:22.24 pid:87516   79: std::panicking::try::do_call
 0:22.24 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:379:40
 0:22.24 pid:87516   80: __rust_try
 0:22.24 pid:87516   81: std::panicking::try
 0:22.24 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panicking.rs:343:19
 0:22.24 pid:87516   82: std::panic::catch_unwind
 0:22.24 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/panic.rs:431:14
 0:22.24 pid:87516   83: std::thread::Builder::spawn_unchecked::{{closure}}
 0:22.24 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/thread/mod.rs:473:30
 0:22.25 pid:87516   84: core::ops::function::FnOnce::call_once{{vtable.shim}}
 0:22.25 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/core/src/ops/function.rs:227:5
 0:22.25 pid:87516   85: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
 0:22.25 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/alloc/src/boxed.rs:1546:9
 0:22.25 pid:87516       <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
 0:22.25 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/alloc/src/boxed.rs:1546:9
 0:22.25 pid:87516       std::sys::unix::thread::Thread::new::thread_start
 0:22.25 pid:87516              at /rustc/4a8b6f708c38342a6c74aa00cf4323774c7381a6/library/std/src/sys/unix/thread.rs:71:17
 0:22.25 pid:87516   86: start_thread
 0:22.26 pid:87516   87: __clone
 0:22.26 pid:87516 [2021-03-18T00:11:26Z ERROR servo] called `Option::unwrap()` on a `None` value
 0:22.37 pid:87516 Pipeline failed in hard-fail mode.  Crashing!
 0:22.37 pid:87516 mozilla::detail::MutexImpl::~MutexImpl: pthread_mutex_destroy failed: Device or resource busy
 0:22.37 pid:87516 Stack tracethread panicked while processing panic. aborting.
 0:22.41 TEST_END: CRASH
@jdm jdm added I-panic Servo encounters a panic. A-content/script Related to the script thread labels Mar 18, 2021
@dominiccooney
Copy link
Contributor

dominiccooney commented May 23, 2021

That tests that the window proxy's self references—window.frames, globalThis, self and window— refer to the window proxy after the frame is detached, and again after the event loop has spun.

There's two variants. The first with an iframe that's removed from the DOM; the second with a closed window.

The window.open variant is producing the warning about multiple top level browsing contexts.

For the iframe, globalThis works but frames, self and window are broken. Comment on window_proxy: "This can panic if it is called after the browsing context has been discarded." I'm guessing these should be using undiscarded_window_proxy.

Edit to add: ...but that's a bad guess! I need to learn a bit about constellations, how Servo manages the window proxy.

@jdm
Copy link
Member

jdm commented May 23, 2021

It would be useful to narrow down the testcase to the smallest set of elements and JS that can trigger the crash.

@dominiccooney
Copy link
Contributor

Here's a reduced test case for frames:

<!DOCTYPE html>
<body>
<script>
'use strict';
const f = document.body.appendChild(document.createElement('iframe'));
const w = f.contentWindow;
f.remove();
requestAnimationFrame(() => {
  console.log(w.frames === w ? 'PASS' : 'FAIL');
});
</script>

This should log "PASS", instead it panics in the frames getter.

@dominiccooney
Copy link
Contributor

dominiccooney commented Jun 17, 2021

I've been reading bindings a bit. High level, these getters thunk through the window proxy so presumably the window proxy could return self for these getters. (This what Chrome does although the details are a bit convoluted.)

Simply not clearing the window proxy in Window.clear_js_runtime fixes the problem but I'm not sure if that compromises security or correctness around navigation.

Superficially the following things are surprising:

  • clear_js_runtime does "Gc" to stop panics from nodes sending a message to layout. However nodes can certainly be retrieved across same-origin iframes and kept alive after the frame is detached.
  • While the window disowns the window proxy, the window proxy evidently still refers to the window. How does same origin access control work? Window reuse during navigation?

@gterzian
Copy link
Member

gterzian commented Dec 18, 2023

I think the key to this is found in the spec:

When there are no Document objects whose browsing context equals a given browsing context (i.e., all such Documents have been destroyed), and that browsing context's WindowProxy is eligible for garbage collection, then the browsing context will never be accessed again. If it is a top-level browsing context, then at this point the user agent must remove it.

In particular, note the "and that browsing context's WindowProxy is eligible for garbage collection".

Instead, in HTMLIFrameElement::unbind_from_tree, we assume the BC can be removed, even though in this case the window is still reachable by script(but he document is gone?)

The solution I think is not simple, one would have to keep track of windows after iframes are unbound from the tree, and only send the ScriptMsg::RemoveIFrame, when we can be sure the WindowProxy is eligible for garbage collection.

Perhaps a simple first solution is to only remove the BC of an iframe when the associated TOP level BC is closed. So basically leak the window of iframes somwhere on ScriptThread until the given script thread shuts down. (Note the spec only says the UA must remove the BC when it is top-level).

cc @dominiccooney @jdm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/script Related to the script thread E-candidate-for-mentoring I-panic Servo encounters a panic.
Projects
None yet
Development

No branches or pull requests

4 participants