Repository navigation
Closed
Labels
A-constellationInvolves the constellationA-content/domInteracting with the DOM from web contentI-panicServo encounters a panic.
Description
<iframe mozbrowser="true" src="data:text/html,<script>location.assign('data:,x')</script>"></iframe>
<script>
var iframe = document.querySelector("iframe");
iframe.addEventListener("mozbrowserloadend", () => iframe.goBack());
</script>thread 'ScriptTask PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(0) }' panicked at 'assertion failed: self.suspended_since.get().is_some()', /Users/paul/git/servo/components/script/timers.rs:349
stack backtrace:
1: 0x1041ec728 - sys::backtrace::tracing::imp::write::h662793599f713c74T5s
2: 0x1041ee90f - panicking::log_panic::_<closure>::closure.38923
3: 0x1041ee3b9 - panicking::log_panic::h87af6096e0b6fa7c4Uw
4: 0x1041da0d6 - sys_common::unwind::begin_unwind_inner::h1e338bc64cf56d9dr8r
5: 0x10237e147 - sys_common::unwind::begin_unwind::begin_unwind::h442923392230891188
6: 0x102b9bcd7 - timers::_<impl>::resume::hd7c50b6547582733YW1
7: 0x102b9bbdb - dom::window::_<impl>::thaw::h6dcbc1ebb597eb086cV
8: 0x102c89100 - script_task::_<impl>::handle_thaw_msg::hda0bd12aaf56888eX2Z
9: 0x102c8612c - script_task::_<impl>::handle_msg_from_constellation::h4b19eddbc2adee90GCZ
10: 0x102c84961 - script_task::_<impl>::handle_msgs::_<closure>::closure.157149
11: 0x102c84552 - script_task::_<impl>::profile_event::h9736138210224090807
12: 0x102c57239 - script_task::_<impl>::handle_msgs::h3a5fe9faeff19152nqZ
13: 0x102c03e00 - script_task::_<impl>::start::h03d6119e050f589ddqZ
14: 0x102c03db4 - script_task::_<impl>::create::_<closure>::_<closure>::closure.155887
15: 0x102c03b20 - mem::_<impl>::run_with_memory_reporting::run_with_memory_reporting::h673928561397631059
16: 0x102bef68f - script_task::_<impl>::create::_<closure>::closure.155291
17: 0x102beec77 - util::task::spawn_named_with_send_on_failure::_<closure>::closure.155284
18: 0x102beebc7 - boxed::_<impl>::call_box::call_box::h15694691246183954468
19: 0x1023ad49b - boxed::_<impl>::call_once::call_once::h4242493320255577343
20: 0x1023ad06d - std::thread::_<impl>::spawn_inner::_<closure>::_<closure>::closure.116136
21: 0x1023ad019 - sys_common::unwind::try::try_fn::try_fn::h4943420568539498126
22: 0x1041ebbf8 - __rust_try
23: 0x1041e909e - sys_common::unwind::try::inner_try::hc13d8e198528cd0fZ4r
24: 0x1023acf83 - sys_common::unwind::try::try::h16910258665589907076
25: 0x1023acdfb - std::thread::_<impl>::spawn_inner::_<closure>::closure.116112
26: 0x1023ad71c - boxed::_<impl>::call_box::call_box::h11799493626222205043
27: 0x1041edcdd - sys::thread::_<impl>::new::thread_start::h906ddce3a93d4852ksw
28: 0x7fff98438c12 - _pthread_body
29: 0x7fff98438b8f - _pthread_start
thread 'Constellation' panicked at 'unable to find pipeline - this is a bug', src/libcore/option.rs:333
Metadata
Metadata
Assignees
Labels
A-constellationInvolves the constellationA-content/domInteracting with the DOM from web contentI-panicServo encounters a panic.
Activity
paulrouget commentedon Nov 25, 2015
Panics here: https://github.com/servo/servo/blob/e3eee5a/components/compositing/constellation.rs#L899
paulrouget commentedon Nov 25, 2015
subpage_map:
pipeline_to_frame_map:
Here we have a pipeline (
namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1)) with no associated frame, and it happens to be the one use inhandle_navigate_msg.We would expect
add_or_replace_pipeline_in_frame_treeto be called before it's possible to callgoBack.I guess it's just enough to bail if there's no associated frame then.
[-]iframe.goBack() panics[/-][+]iframe.goBack() panics if page not fully loaded yet[/+][-]iframe.goBack() panics if page not fully loaded yet[/-][+]iframe.goBack() panics if called too early[/+]paulrouget commentedon Nov 25, 2015
Not enough. More panics follow.
jdm commentedon Nov 25, 2015
Note that there was actually an earlier panic reported than the constellation one in the original log.
paulrouget commentedon Nov 25, 2015
Hm, I don't get always the same panic first.
Either:
self.timers.resume()Or:
Option::unwrap()on aNonevalue', src/libcore/option.rs:365paulrouget commentedon Nov 27, 2015
If
add_or_replace_pipeline_in_frame_treeis call beforehandle_navigate_msg, the iframe is found, but then it panics inpipeline.thaw()in the same function (pipeline is not frozen at this point).If it's not, then it panics because unwrapping
iframe_idwhich isNone.paulrouget commentedon Nov 27, 2015
If I understand correctly:
goBack()panics becauseself.subpage_mapandself.pipeline_to_frame_mapcontains conflicting information.handle_navigate_msgask forsubpage(0), which is associated toPipelineId {namespace_id:1, index:0}, which is associated to no iframe.The iframe is associated to
PipelineId { namespace_id:0, index:0}, which is not inside the iframe, but its parent document.So my guess is that
pipeline_to_frame_mapis wrong.handle_painter_ready_msgis in charge of updatingpipeline_to_frame_map.jdm commentedon Nov 27, 2015
I wonder if we could fix this by removing all traces of subpages from code. I believe they're unnecessary since we introduced pipeline namespaces.
jdm commentedon Nov 27, 2015
Also if this is to do with handle_painter_ready_msg, #8612 may affect this.
frewsxcv commentedon Nov 28, 2015
Could be related to #8461
paulrouget commentedon Dec 8, 2015
With #8612 - we hit the
pipeline.thaw()panic first every time.paulrouget commentedon Dec 8, 2015
It panics because when an iframe navigates to a new URL, the document is not frozen (not same code path as non subpage pipelines).
paulrouget commentedon Dec 8, 2015
#8886 addresses the
thaw()panic. With #8886 and #8612, we end up with the missing pipeline panic described in #8674 (comment)Auto merge of #8886 - paulrouget:freeze-pipeline-iframe, r=mbrubeck
Auto merge of #8886 - paulrouget:freeze-pipeline-iframe, r=mbrubeck,jdm
paulrouget commentedon Dec 18, 2015
Panic is gone.
servo: Merge #8886 - Freeze old pipeline in iframes (from paulrouget:…
servo: Merge #8886 - Freeze old pipeline in iframes (from paulrouget:…
servo: Merge #8886 - Freeze old pipeline in iframes (from paulrouget:…
servo: Merge #8886 - Freeze old pipeline in iframes (from paulrouget:…