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

Browser.html causes a panic cascade in constellation #10017

Closed
Manishearth opened this issue Mar 15, 2016 · 20 comments
Closed

Browser.html causes a panic cascade in constellation #10017

Manishearth opened this issue Mar 15, 2016 · 20 comments
Assignees

Comments

@Manishearth
Copy link
Member

@Manishearth Manishearth commented Mar 15, 2016

On 075ce98 on Linux, running ./mach run -r -w -b gives me this long panic

The initial panic seems to be:

thread 'Constellation' panicked at 'unable to find pipeline - this is a bug', ../src/libcore/option.rs:704
stack backtrace:

   1:     0x7f7467838f90 - sys::backtrace::tracing::imp::write::h578d6e47592a4041cHv
   2:     0x7f746783d33b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44995
   3:     0x7f746783cfa8 - panicking::default_handler::hffa00c845e94c6581nA
   4:     0x7f7467826a5c - sys_common::unwind::begin_unwind_inner::hd824946792143cc8vvu
   5:     0x7f7467826ee8 - sys_common::unwind::begin_unwind_fmt::h3777a045191296c5Buu
   6:     0x7f7467838401 - rust_begin_unwind
   7:     0x7f74678743df - panicking::panic_fmt::h548fe28297c9d83b7mM
   8:     0x7f746787b884 - option::expect_failed::hce0693d5039c3a72iWO
   9:     0x7f7465e8ecbc - constellation::Constellation<LTF, STF>::handle_request::h11537074669471263875
  10:     0x7f7465e73fe7 - sys_common::unwind::try::try_fn::h7432356694187898493
  11:     0x7f746783838b - __rust_try
  12:     0x7f7467834f7d - sys_common::unwind::inner_try::h8ac2089dadb4381bxsu
  13:     0x7f7465e74fda - boxed::F.FnBox<A>::call_box::h16069342354870177152
  14:     0x7f746783bde9 - sys::thread::Thread::new::thread_start::hd111df90784ef3b2llz
  15:     0x7f746380d6a9 - start_thread
  16:     0x7f746332ceec - clone
  17:                0x0 - <unknown>

cc @mbrubeck

@Manishearth Manishearth added the I-panic label Mar 15, 2016
@jdm
Copy link
Member

@jdm jdm commented Mar 15, 2016

A debug build would be most useful here.

@jdm jdm added the A-constellation label Mar 15, 2016
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 15, 2016

I can confirm seeing similar panics. I'm rebuilding in debug mode at the moment.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 15, 2016

And of course now I can't recreate it :( @Manishearth can you reliably create the panic? Does it still occur with 4607ed2?

@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Mar 15, 2016

Debug trace: https://manishearth.pastebin.mozilla.org/8863777

thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'assertion failed: begin <= end', ../src/libcore/str/mod.rs:1651
stack backtrace:
   1:     0x7fa9574d6560 - sys::backtrace::tracing::imp::write::h578d6e47592a4041cHv
   2:     0x7fa9574da90b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44995
   3:     0x7fa9574da578 - panicking::default_handler::hffa00c845e94c6581nA
   4:     0x7fa9574c402c - sys_common::unwind::begin_unwind_inner::hd824946792143cc8vvu
   5:     0x7fa9574c44b8 - sys_common::unwind::begin_unwind_fmt::h3777a045191296c5Buu
   6:     0x7fa9574d59d1 - rust_begin_unwind
   7:     0x7fa9575119af - panicking::panic_fmt::h548fe28297c9d83b7mM
   8:     0x7fa957511c88 - panicking::panic::h37bc7af2ced80b6bElM
   9:     0x7fa95751928e - str::slice_error_fail::hba87438346aaf24cbIT
  10:     0x7fa955c55741 - str::traits::str.ops..Index<ops..RangeFrom<usize>>::index::h2dcf785324185b51jvT
                        at ../src/libcore/str/mod.rs:1426
  11:     0x7fa955e3b4a2 - textinput::TextInput<T>::replace_selection::h10497234409133275808
                        at /home/manishearth/Mozilla/servo/components/script/textinput.rs:213
  12:     0x7fa955e3da90 - textinput::TextInput<T>::insert_string::h1544770178593124682
                        at /home/manishearth/Mozilla/servo/components/script/textinput.rs:142
  13:     0x7fa955e39a9a - textinput::TextInput<T>::handle_keydown_aux::h14962970438502503446
                        at /home/manishearth/Mozilla/servo/components/script/textinput.rs:419
  14:     0x7fa955e3971c - textinput::TextInput<T>::handle_keydown::h9311391624954730790
                        at /home/manishearth/Mozilla/servo/components/script/textinput.rs:395
  15:     0x7fa955e393ab - dom::htmlinputelement::HTMLInputElement.VirtualMethods::handle_event::h1ae529ac07b29e883lY
                        at /home/manishearth/Mozilla/servo/components/script/dom/htmlinputelement.rs:880
  16:     0x7fa955db2445 - dom::eventdispatcher::dispatch_event::hfdf1941bb96744eaabP
                        at /home/manishearth/Mozilla/servo/components/script/dom/eventdispatcher.rs:156
  17:     0x7fa955785623 - dom::eventtarget::EventTarget::dispatch_event::he347a2b62f54d934Z7P
                        at /home/manishearth/Mozilla/servo/components/script/dom/eventtarget.rs:320
  18:     0x7fa955ceb2ec - dom::event::Event::fire::h4e23ded5ca505011x4O
                        at /home/manishearth/Mozilla/servo/components/script/dom/event.rs:261
  19:     0x7fa955cf1c7f - dom::document::Document::dispatch_key_event::hba045d5b78330949bWI
                        at /home/manishearth/Mozilla/servo/components/script/dom/document.rs:1044
  20:     0x7fa9560adf27 - script_thread::ScriptThread::handle_event::h30c33a501e1971ad5vo
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:1966
  21:     0x7fa9560d87fb - script_thread::ScriptThread::handle_msg_from_constellation::h5ae92e71bfce3256sDn
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:1020
  22:     0x7fa9560d7354 - script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::closure.178481
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:917
  23:     0x7fa9560d6fe5 - script_thread::ScriptThread::profile_event::h6587973939335111010
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:1009
  24:     0x7fa9560ab2e7 - script_thread::ScriptThread::handle_msgs::h4fd511968ce877f9lsn
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:910
  25:     0x7fa956059fac - script_thread::ScriptThread::start::hdf18875d829f1280bsn
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:768
  26:     0x7fa956059f64 - script_thread::ScriptThread.ScriptThreadFactory::create::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::closure.177303
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:554
  27:     0x7fa956059c7c - mem::ProfilerChan::run_with_memory_reporting::h1929376804223049240
                        at /home/manishearth/Mozilla/servo/components/profile_traits/mem.rs:60
  28:     0x7fa956045598 - script_thread::ScriptThread.ScriptThreadFactory::create::_$u7b$$u7b$closure$u7d$$u7d$::closure.176728
                        at /home/manishearth/Mozilla/servo/components/script/script_thread.rs:553
  29:     0x7fa956044b77 - util::thread::spawn_named_with_send_on_failure::_$u7b$$u7b$closure$u7d$$u7d$::closure.176715
                        at /home/manishearth/Mozilla/servo/components/util/thread.rs:52
  30:     0x7fa956044563 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::closure.176704
                        at ../src/libstd/thread/mod.rs:278
  31:     0x7fa9560444d8 - sys_common::unwind::try::try_fn::h2865077276965078177
                        at ../src/libstd/sys/common/unwind/mod.rs:127
  32:     0x7fa9574d595b - __rust_try
  33:     0x7fa9574d254d - sys_common::unwind::inner_try::h8ac2089dadb4381bxsu
  34:     0x7fa956044415 - sys_common::unwind::try::h2115493268496158851
                        at ../src/libstd/sys/common/unwind/mod.rs:123
  35:     0x7fa95604425b - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::closure.176701
                        at ../src/libstd/thread/mod.rs:278
  36:     0x7fa956044d87 - boxed::F.FnBox<A>::call_box::h13875605116033184922
                        at ../src/liballoc/boxed.rs:541
  37:     0x7fa9574d93b9 - sys::thread::Thread::new::thread_start::hd111df90784ef3b2llz
  38:     0x7fa951cb16a9 - start_thread
  39:     0x7fa9517d0eec - clone
  40:                0x0 - <unknown>
@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Mar 15, 2016

...that's not the same crash, though.

@jdm
Copy link
Member

@jdm jdm commented Mar 15, 2016

Yeah, that's #10005.

@jdm
Copy link
Member

@jdm jdm commented Mar 15, 2016

If you apply #10015 locally you should be able to see your original panic.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

@Manishearth on IRC gives the recipe for replicating the panic: "type some webpage, hit enter, click plus, start typing."

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

#10015 is now #10035, and is in the merge queue.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

Applying #10035 causes the panic not to happen at my end. Perhaps this was the underlying cause, and the constellation panic was just masking it?

@asajeffrey asajeffrey self-assigned this Mar 16, 2016
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

Now that #10035 has landed, we can reproduce this in debug mode in master.

To reproduce, ./mach run -d -w http://google.com/ then resize the window a few times. Note: no browser.html needed.

thread 'Constellation' panicked at 'unable to find pipeline - this is a bug', ../src/libcore/option.rs:704
stack backtrace:
   1:     0x55af00b46710 - sys::backtrace::tracing::imp::write::h578d6e47592a4041cHv
   2:     0x55af00b4aabb - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44995
   3:     0x55af00b4a728 - panicking::default_handler::hffa00c845e94c6581nA
   4:     0x55af00b341dc - sys_common::unwind::begin_unwind_inner::hd824946792143cc8vvu
   5:     0x55af00b34668 - sys_common::unwind::begin_unwind_fmt::h3777a045191296c5Buu
   6:     0x55af00b45b81 - rust_begin_unwind
   7:     0x55af00b81b5f - panicking::panic_fmt::h548fe28297c9d83b7mM
   8:     0x55af00b89004 - option::expect_failed::hce0693d5039c3a72iWO
   9:     0x55aefdc4089f - option::Option<T>::expect::h14837273259010467140
                        at ../src/libcore/option.rs:298
  10:     0x55aefdd1167d - constellation::Constellation<LTF, STF>::handle_subframe_loaded::h9986826040569969858
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:1693
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:832
  11:     0x55aefdd10976 - constellation::Constellation<LTF, STF>::handle_dom_load::h7586018852363528034
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:1025
  12:     0x55aefdbc9f35 - constellation::Constellation<LTF, STF>::handle_request::h12789266864482090730
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:630
  13:     0x55aefdbc5eac - constellation::Constellation<LTF, STF>::run::h8277893370243134494
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:368
  14:     0x55aefdba18e0 - compositing::constellation::Constellation<LTF, STF>::start::_$u7b$$u7b$closure$u7d$$u7d$::closure.24792
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:361
  15:     0x55aefdba03d3 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::closure.24781
                        at ../src/libstd/thread/mod.rs:278
  16:     0x55aefdba0348 - sys_common::unwind::try::try_fn::h3231490241023454589
                        at ../src/libstd/sys/common/unwind/mod.rs:127
  17:     0x55af00b45b0b - __rust_try
  18:     0x55af00b426fd - sys_common::unwind::inner_try::h8ac2089dadb4381bxsu
  19:     0x55aefdba0285 - sys_common::unwind::try::h5942711074882726687
                        at ../src/libstd/sys/common/unwind/mod.rs:123
  20:     0x55aefdba00cb - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::closure.24757
                        at ../src/libstd/thread/mod.rs:278
  21:     0x55aefdba1ba7 - boxed::F.FnBox<A>::call_box::h15745952880978658870
                        at ../src/liballoc/boxed.rs:541
  22:     0x55af00b49569 - sys::thread::Thread::new::thread_start::hd111df90784ef3b2llz
  23:     0x7fdb810d26a9 - start_thread
  24:     0x7fdb80bf0eec - clone
  25:                0x0 - <unknown>
@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

@mbrubeck pointed out on IRC that this may be the same root cause as #8769, so fixing this might fix one of our intermittents.

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 16, 2016

The IRC conversation with @jdm is at http://logs.glob.uno/?c=mozilla%23servo#c386447. Summarizing...

To reproduce the problem, go to google.com and resize the window a few times. No browser.html needed, but it doesn't appear to happen on vanilla web pages (more on this later).

A stack trace in debug mode:

thread 'Constellation' panicked at 'unable to find pipeline - this is a bug', ../src/libcore/option.rs:704
stack backtrace:
   1:     0x55af00b46710 - sys::backtrace::tracing::imp::write::h578d6e47592a4041cHv
   2:     0x55af00b4aabb - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44995
   3:     0x55af00b4a728 - panicking::default_handler::hffa00c845e94c6581nA
   4:     0x55af00b341dc - sys_common::unwind::begin_unwind_inner::hd824946792143cc8vvu
   5:     0x55af00b34668 - sys_common::unwind::begin_unwind_fmt::h3777a045191296c5Buu
   6:     0x55af00b45b81 - rust_begin_unwind
   7:     0x55af00b81b5f - panicking::panic_fmt::h548fe28297c9d83b7mM
   8:     0x55af00b89004 - option::expect_failed::hce0693d5039c3a72iWO
   9:     0x55aefdc4089f - option::Option<T>::expect::h14837273259010467140
                        at ../src/libcore/option.rs:298
  10:     0x55aefdd1167d - constellation::Constellation<LTF, STF>::handle_subframe_loaded::h9986826040569969858
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:1693
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:832
  11:     0x55aefdd10976 - constellation::Constellation<LTF, STF>::handle_dom_load::h7586018852363528034
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:1025
  12:     0x55aefdbc9f35 - constellation::Constellation<LTF, STF>::handle_request::h12789266864482090730
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:630
  13:     0x55aefdbc5eac - constellation::Constellation<LTF, STF>::run::h8277893370243134494
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:368
  14:     0x55aefdba18e0 - compositing::constellation::Constellation<LTF, STF>::start::_$u7b$$u7b$closure$u7d$$u7d$::closure.24792
                        at /home/ajeffrey/github/servo/servo/components/compositing/constellation.rs:361
  15:     0x55aefdba03d3 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::closure.24781
                        at ../src/libstd/thread/mod.rs:278
  16:     0x55aefdba0348 - sys_common::unwind::try::try_fn::h3231490241023454589
                        at ../src/libstd/sys/common/unwind/mod.rs:127
  17:     0x55af00b45b0b - __rust_try
  18:     0x55af00b426fd - sys_common::unwind::inner_try::h8ac2089dadb4381bxsu
  19:     0x55aefdba0285 - sys_common::unwind::try::h5942711074882726687
                        at ../src/libstd/sys/common/unwind/mod.rs:123
  20:     0x55aefdba00cb - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::closure.24757
                        at ../src/libstd/thread/mod.rs:278
  21:     0x55aefdba1ba7 - boxed::F.FnBox<A>::call_box::h15745952880978658870
                        at ../src/liballoc/boxed.rs:541
  22:     0x55af00b49569 - sys::thread::Thread::new::thread_start::hd111df90784ef3b2llz
  23:     0x7fdb810d26a9 - start_thread
  24:     0x7fdb80bf0eec - clone
  25:                0x0 - <unknown>

Our theory by us: a DOMLoad event is being generated by script, but is arriving after the pipeline has been closed. A possible cause for this is a page which creates then destroys an iframe, with the destruction happening around the same time as the DOMLoad event, leading to a race condition. (This would explain why we're seeing this on google.com which is presumably doing all kinds of tracking/analytics in iframes.)

Our proposed solution: debug-log, but otherwise ignore, messages which arrive after their pipeline is closed, rather than panicking. We can't return an error because these are async messages.

@samlh
Copy link
Contributor

@samlh samlh commented Mar 17, 2016

Makes sense to me - though I do wonder if something could be done with cancellation tokens or the like. Are there any other events that we know may still be triggered after iframe close?

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 17, 2016

@samlh I think anything we try to do to stop this behaviour is radically going to change the constellation API (not that I'm against that, but I'd like to see this bug fixed pretty soon). The constellation API should be robust against events arriving in any order, i suspect anything else will result in subtle race conditions of the kind that are already causing problems with intermittents,

@samlh
Copy link
Contributor

@samlh samlh commented Mar 17, 2016

Fair enough - my concern was things like timer events holding onto stuff after the tab was closed, but I think the existing code at least prevents the js stuff from being held onto, so I'm not fussed. Thanks for the reply!

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Mar 18, 2016

I created a commit which removes any panicking uses of pipeline(id) or frame(id) (asajeffrey@723107c). The patched version passes wpt-tests, and running it as ./mach run -r -w http://google.com/ it fixes the panic, hooray!

Not so hooray is that under not-web-render, it causes a different panic:

$ ./mach run -r http://google.com/
ERROR:js::rust: Error at https://apis.google.com/_/scs/abc-static/_/js/k=gapi.gapi.en.z_2t079yKPw.O/m=gapi_iframes,googleapis_client,plusone/rt=j/sv=1/d=1/ed=1/am=AAQ/rs=AHpOoo_E1VxFHHLNAhxnRjoRHyLV5gA32A/cb=gapi.loaded_0:202:157: wa.jc is not a function

thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', ../src/libcore/result.rs:746
stack backtrace:
   1:     0x564fd2a23280 - sys::backtrace::tracing::imp::write::h578d6e47592a4041cHv
   2:     0x564fd2a2761b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44995
   3:     0x564fd2a27288 - panicking::default_handler::hffa00c845e94c6581nA
   4:     0x564fd2a10b3c - sys_common::unwind::begin_unwind_inner::hd824946792143cc8vvu
   5:     0x564fd2a11168 - sys_common::unwind::begin_unwind_fmt::h3777a045191296c5Buu
   6:     0x564fd2a226f1 - rust_begin_unwind
   7:     0x564fd2a5efcf - panicking::panic_fmt::h548fe28297c9d83b7mM
   8:     0x564fd0ec3eb4 - result::unwrap_failed::h15702677939446367649
   9:     0x564fd0ec2401 - compositor::IOCompositor<Window>::send_buffer_requests_for_all_layers::h88596812621574629
  10:     0x564fd0ea28f8 - compositor::IOCompositor<Window>::handle_browser_message::h5698846582860692385
  11:     0x564fd0e9c2e4 - compositor::IOCompositor<Window>.CompositorEventListener::handle_events::h10219509717608097442
  12:     0x564fd0ed27ec - Browser::handle_events::h5978ca92d9c51fdbWea
  13:     0x564fd0e88935 - main::h6cacdf732b49adebMaa
  14:     0x564fd2a26ee4 - sys_common::unwind::try::try_fn::h17074903832088339578
  15:     0x564fd2a2267b - __rust_try
  16:     0x564fd2a2697b - rt::lang_start::hc48b7676a10bcd987fA
  17:     0x7f9eff31da3f - __libc_start_main
  18:     0x564fd0e7eb48 - _start

The problem is the unwrap() at https://github.com/asajeffrey/servo/blob/723107ca4503fc8e9f01b1c75f480e99c66c99bf/components/compositing/compositor.rs#L1815:

        for (pipeline_id, requests) in pipeline_requests {
            let msg = ChromeToPaintMsg::Paint(requests, self.frame_tree_id);
            if let Some(pipeline) = self.pipeline(pipeline_id) {
                pipeline.chrome_to_paint_chan.send(msg).unwrap();
            }
        }

An IRC conversation with @pcwalton followed: http://logs.glob.uno/?c=mozilla%23servo#c387328. It looks like the culprit here is a message being sent to a paint thread after the associated iframe has been removed, and so the paint thread has exited. I think we should declare this to be a different issue.

I'll tidy up my commit and turn it into a PR tomorrow.

@jdm
Copy link
Member

@jdm jdm commented Mar 18, 2016

Seeing that I can reproduce the same failure on master, we can definitely declare that a different issue.

bors-servo added a commit that referenced this issue Mar 18, 2016
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see #10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 30, 2016
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see #10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 31, 2016
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see #10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 31, 2016
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see #10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 31, 2016
Removed panicking when frame or pipeline lookup fails.

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see #10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10082)
<!-- Reviewable:end -->
@Manishearth Manishearth reopened this Apr 1, 2016
@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Apr 1, 2016

This can't be verified until #10260 is fixed

@Manishearth
Copy link
Member Author

@Manishearth Manishearth commented Apr 1, 2016

Stuff works now, I can browse bhtml fine

@Manishearth Manishearth closed this Apr 1, 2016
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
… fails (from asajeffrey:remove-constellation-panic); r=glennw

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see servo/servo#10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7518c4de9317af3a643fc35131e556104b8693fa

UltraBlame original commit: e158381a4d5b911ea484cde77adb7b16b48e0450
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
… fails (from asajeffrey:remove-constellation-panic); r=glennw

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see servo/servo#10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7518c4de9317af3a643fc35131e556104b8693fa

UltraBlame original commit: e158381a4d5b911ea484cde77adb7b16b48e0450
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
… fails (from asajeffrey:remove-constellation-panic); r=glennw

Removed the methods `pipeline(id)`, `pipeline_mut(id)`, `frame(id)` and `frame_mut(id)` from constellation, which panicked when the table lookup failed.

The panics were causing race conditions, e.g. visiting google.com and resizing the page would cause a panic, most likely due to an iframe being added and removed, with the `DOMLoad` event arriving after the iframe had been removed, causing a panic.

This patch fixes #10017 and #8769 (although in non-webrender builds there's now a different panic, see servo/servo#10017 (comment)).

There are a few `TODO` items in the initial commit, for cases where it's not completely obvious what to do in the case of failure.

Source-Repo: https://github.com/servo/servo
Source-Revision: 7518c4de9317af3a643fc35131e556104b8693fa

UltraBlame original commit: e158381a4d5b911ea484cde77adb7b16b48e0450
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.