Repository navigation
Closed
Labels
A-constellationInvolves the constellationA-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueI-panicServo encounters a panic.
Description
Running:
./target/debug/servo --pref session-history.max-length=1
Then clicking on the Rust link, following the redirect, then going back produces panic:
0: 0x562222fe4561 - backtrace::backtrace::libunwind::trace
at /home/ajeffrey/github/asajeffrey/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.0/src/backtrace/libunwind.rs:53
- backtrace::backtrace::trace<closure>
at /home/ajeffrey/github/asajeffrey/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.0/src/backtrace/mod.rs:42
1: 0x562222fdf804 - backtrace::capture::{{impl}}::new
at /home/ajeffrey/github/asajeffrey/servo/target/debug/build/backtrace-17fa5380aeaf9437/out/capture.rs:79
2: 0x562222575268 - constellation::constellation::log_entry
at /home/ajeffrey/github/asajeffrey/servo/components/constellation/constellation.rs:457
3: 0x562222574a0f - constellation::constellation::{{impl}}::log
at /home/ajeffrey/github/asajeffrey/servo/components/constellation/constellation.rs:438
4: 0x56221e93d800 - servo::{{impl}}::log<env_logger::Logger,constellation::constellation::FromCompositorLogger>
at /home/ajeffrey/github/asajeffrey/servo/components/servo/lib.rs:347
5: 0x562224000312 - log::__log
at /home/ajeffrey/github/asajeffrey/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/log-0.3.6/src/lib.rs:876
6: 0x56221e943ea2 - servo::main::{{closure}}
at /home/ajeffrey/github/asajeffrey/servo/ports/servo/main.rs:126
7: 0x56222406d82d - std::panicking::rust_panic_with_hook
at /checkout/src/libstd/panicking.rs:546
8: 0x56222406d674 - std::panicking::begin_panic<collections::string::String>
at /checkout/src/libstd/panicking.rs:507
9: 0x56222406d5e9 - std::panicking::begin_panic_fmt
at /checkout/src/libstd/panicking.rs:491
10: 0x56222406d577 - std::panicking::rust_begin_panic
at /checkout/src/libstd/panicking.rs:467
11: 0x56222409a24d - core::panicking::panic_fmt
at /checkout/src/libcore/panicking.rs:69
12: 0x56222409a184 - core::panicking::panic
at /checkout/src/libcore/panicking.rs:49
13: 0x5622204d5ab5 - core::option::{{impl}}::unwrap<script::dom::bindings::js::Root<script::dom::browsingcontext::BrowsingContext>>
at /checkout/src/libcore/macros.rs:21
14: 0x562220a6c6b1 - script::dom::window::{{impl}}::browsing_context
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/window.rs:323
15: 0x56221fa7709d - script::dom::document::{{impl}}::browsing_context
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/document.rs:393
16: 0x56221fa7d2c3 - script::dom::event::{{impl}}::dispatch
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/event.rs:145
17: 0x56221fa811c8 - script::dom::eventtarget::{{impl}}::dispatch_event
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/eventtarget.rs:306
18: 0x56221fa7db8a - script::dom::event::{{impl}}::fire
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/event.rs:220
19: 0x56221ff7186b - script::dom::document::{{impl}}::fire_mouse_event
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/document.rs:1067
20: 0x56221ff722b5 - script::dom::document::{{impl}}::handle_mouse_move_event
at /home/ajeffrey/github/asajeffrey/servo/components/script/dom/document.rs:1137
21: 0x562220aa175d - script::script_thread::{{impl}}::handle_event
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:1866
22: 0x562220a8feaa - script::script_thread::{{impl}}::handle_msg_from_constellation
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:1003
23: 0x562220a8e3ec - script::script_thread::{{impl}}::handle_msgs::{{closure}}
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:885
24: 0x562220a8ead1 - script::script_thread::{{impl}}::profile_event<closure,core::option::Option<bool>>
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:994
25: 0x562220a8cad3 - script::script_thread::{{impl}}::handle_msgs
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:879
26: 0x562220a8b305 - script::script_thread::{{impl}}::start
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:734
27: 0x56221fb035b4 - script::script_thread::{{impl}}::create::{{closure}}::{{closure}}
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:561
28: 0x56221f58c746 - profile_traits::mem::{{impl}}::run_with_memory_reporting<closure,fn(profile_traits::mem::ReportsChan) -> script::script_runtime::CommonScriptMsg,script::script_runtime::CommonScriptMsg,std::sync::mpsc::Sender<script::script_thread::MainThreadScriptMsg>>
at /home/ajeffrey/github/asajeffrey/servo/components/profile_traits/mem.rs:63
29: 0x562221041879 - script::script_thread::{{impl}}::create::{{closure}}
at /home/ajeffrey/github/asajeffrey/servo/components/script/script_thread.rs:560
30: 0x562220fd6e5a - std::panic::{{impl}}::call_once<(),closure>
at /checkout/src/libstd/panic.rs:296
31: 0x562220f1cbe2 - std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()>
at /checkout/src/libstd/panicking.rs:450
32: 0x5622240747fa - panic_unwind::__rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
33: 0x562220c88c13 - std::panicking::try<(),std::panic::AssertUnwindSafe<closure>>
at /checkout/src/libstd/panicking.rs:429
34: 0x562220c1d084 - std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()>
at /checkout/src/libstd/panic.rs:361
35: 0x562220526c70 - std::thread::{{impl}}::spawn::{{closure}}<closure,()>
at /checkout/src/libstd/thread/mod.rs:357
36: 0x5622207be402 - alloc::boxed::{{impl}}::call_box<(),closure>
at /checkout/src/liballoc/boxed.rs:638
37: 0x56222406c474 - alloc::boxed::{{impl}}::call_once<(),()>
at /checkout/src/liballoc/boxed.rs:648
- std::sys_common::thread::start_thread
at /checkout/src/libstd/sys_common/thread.rs:21
- std::sys::imp::thread::{{impl}}::new::thread_start
at /checkout/src/libstd/sys/unix/thread.rs:84
38: 0x7fcbc5f246b9 - start_thread
39: 0x7fcbc5a4482c - clone
40: 0x0 - <unknown>
Somehow we're firing a mouse event on a document which has no browsing context.
cc @cbrewster
Metadata
Metadata
Assignees
Labels
A-constellationInvolves the constellationA-content/scriptRelated to the script threadC-assignedThere is someone working on resolving the issueI-panicServo encounters a panic.
Activity
asajeffrey commentedon Mar 9, 2017
Yay, got this to happen on a wpt testcase:
asajeffrey commentedon Mar 9, 2017
The interesting bit is:
mchv commentedon Mar 9, 2017
I am now seeing the following log when trying to reproduce the issue:
I will try to investigate
@highfive: assign me
highfive commentedon Mar 9, 2017
Hey @mchv! Thanks for your interest in working on this issue. It's now assigned to you!
asajeffrey commentedon Mar 9, 2017
Hi @mchv, thanks for looking at this. It might be quite tricky to track down, this is one of the hairiest bits of servo, so feel free to reach out!
mchv commentedon Mar 10, 2017
Thanks @asajeffrey! I have opened a PR with a fix that solves the issue. It is probably not complete but with it I can't reproduce the problem anymore (I can navigate backward and forward without panic), so I would appreciate your feedback on the approach and the code.
asajeffrey commentedon Mar 10, 2017
Thanks!
Auto merge of #15906 - mchv:mchv-safe-browsing-context, r=asajeffrey
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…
servo: Merge #15906 - Access browsing context safely (from mchv:mchv-…