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

Intermittent Mac script thread panic on shutdown: Option::unwrap in ScriptMemoryFailsafe::drop or Page::window #11059

Closed
mbrubeck opened this issue May 6, 2016 · 2 comments

Comments

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented May 6, 2016

mac-rel-css and mac-rel-wpt are failing very very frequently with shutdown panics that happen in different tests each time:

The backtraces come in two flavors, but I suspect they are the same underlying bug (maybe even the same code, inlined two different ways):

  ▶ CRASH [expected PASS] /_mozilla/css/block_image.html
  │ 
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:325
  │ stack backtrace:
  │    1:        0x10c2a3958 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10c2a9c35 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10c2a984e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10b9fcb62 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h0bad41b0b38a855d
  │    5:        0x10c291128 - std::sys_common::unwind::begin_unwind_inner::h30e12d15ce2b2e25
  │    6:        0x10c292a5e - std::sys_common::unwind::begin_unwind_fmt::hb2de8a9968d38523
  │    7:        0x10c2a2c27 - rust_begin_unwind
  │    8:        0x10c2d19f0 - core::panicking::panic_fmt::h257ceb0aa351d801
  │    9:        0x10c2d1cec - core::panicking::panic::h4bb1497076d04ab9
  │   10:        0x10b4dda90 - _<script_thread..ScriptMemoryFailsafe<'a> as core..ops..Drop>::drop::h78647ee7cb9fccc9
  │   11:        0x10b4e0739 - std::sys_common::unwind::try::try_fn::hacee48040437e386
  │   12:        0x10c2a2bbb - __rust_try
  │   13:        0x10c2a2b43 - std::sys_common::unwind::inner_try::h47a4d9cd4a369dcd
  │   14:        0x10b4e0a4a - _<F as std..boxed..FnBox<A>>::call_box::h824e8f60f71d7d45
  │   15:        0x10c2a8cb8 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   16:     0x7fff8ad7b059 - _pthread_body
  │   17:     0x7fff8ad7afd6 - _pthread_start
  └ thread panicked while panicking. aborting.
  ▶ CRASH [expected FAIL] /css21_dev/html4/reference/floats-placement-vertical-004-ref2.htm
  │ 
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:325
  │ stack backtrace:
  │    1:        0x10eac0d18 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x10eac6ff5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x10eac6c0e - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x10e21c242 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::heda6930908f06acc
  │    5:        0x10eaae4e8 - std::sys_common::unwind::begin_unwind_inner::h30e12d15ce2b2e25
  │    6:        0x10eaafe1e - std::sys_common::unwind::begin_unwind_fmt::hb2de8a9968d38523
  │    7:        0x10eabffe7 - rust_begin_unwind
  │    8:        0x10eaeedb0 - core::panicking::panic_fmt::h257ceb0aa351d801
  │    9:        0x10eaef0ac - core::panicking::panic::h4bb1497076d04ab9
  │   10:        0x10dbecb70 - script::page::Page::window::h010a05681584eec2
  │   11:        0x10da8ffcc - std::sys_common::unwind::try::try_fn::hd12b2d76c81a0e30
  │   12:        0x10eabff7b - __rust_try
  │   13:        0x10eabff03 - std::sys_common::unwind::inner_try::h47a4d9cd4a369dcd
  │   14:        0x10da902ca - _<F as std..boxed..FnBox<A>>::call_box::he24f36d07ed1c7fd
  │   15:        0x10eac6078 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   16:     0x7fff86bcf059 - _pthread_body
  │   17:     0x7fff86bcefd6 - _pthread_start
  └ thread panicked while panicking. aborting.
@mbrubeck mbrubeck changed the title Intermittent Mac script thread panic at Option::unwrap in ScriptMemoryFailsafe::drop or Page::window Intermittent Mac script thread panic on shutdown: Option::unwrap in ScriptMemoryFailsafe::drop or Page::window May 7, 2016
@cbrewster
Copy link
Member

@cbrewster cbrewster commented May 7, 2016

Not sure what is causing these, but I do know what causes the unwrap panic. We set the Frame on Page to None inside fn shut_down_layout in the script thread. When ScriptMemoryFailsafe::drop is called and it hasn't been neutered, it tries to get the window from the Page which causes a panic as we set the Frame to None.

@jdm jdm mentioned this issue May 10, 2016
@jdm jdm mentioned this issue May 20, 2016
3 of 5 tasks complete
@jdm
Copy link
Member

@jdm jdm commented May 20, 2016

After #11044 this looks like:

  ▶ CRASH [expected PASS] /_mozilla/css/border_collapse_simple_a.html
  │ 
  │ Shutting dow</span><span class="stdout">n the Constellation after generating an output file or exit flag specified
  │ thread &#39;ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }&#39; panicked at &#39;index out of bounds: the len is 0 but the index is 0&#39;, ../src/libcollections/vec.rs:1167
  │ stack backtrace:
  │    1:        0x10317db28 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:        0x103183fb5 - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:        0x103183bce - std::panicking::default_hook::hc2c969e7453d080c
  │    4:        0x102912c72 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2bd86c312dc8d7a
  │    5:        0x10316b782 - std::panicking::rust_panic_with_hook::hfe203e3083c2b544
  │    6:        0x103184576 - std::panicking::begin_panic::h4889569716505182
  │    7:        0x10316d078 - std::panicking::begin_panic_fmt::h484cd47786497f03
  │    8:        0x1031841cf - rust_begin_unwind
  │    9:        0x1031ab9c0 - core::panicking::panic_fmt::h257ceb0aa351d801
  │   10:        0x1031abb40 - core::panicking::panic_bounds_check::h3956fdcea61ff421
  │   11:        0x101d00e1e - script::dom::browsingcontext::BrowsingContext::active_document::h226f24d08ec44427
  │   12:        0x101d05afa - script::dom::browsingcontext::BrowsingContext::active_window::h2ba128d21d9d19cf
  │   13:        0x10223a17c - _&lt;script_thread..ScriptMemoryFailsafe&lt;&#39;a&gt; as core..ops..Drop&gt;::drop::hc9b03780a30d666b
  │   14:        0x10223cdc7 - std::panicking::try::call::h8d69dc69dac5d183
  │   15:        0x10318773b - __rust_try
  │   16:        0x1031876d5 - __rust_maybe_catch_panic
  │   17:        0x10223d5b4 - _&lt;F as std..boxed..FnBox&lt;A&gt;&gt;::call_box::h2e5eb7eb1a952230
  │   18:        0x103182fd8 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   19:     0x7fff8c3c2059 - _pthread_body
  │   20:     0x7fff8c3c1fd6 - _pthread_start
  └ thread panicked while panicking. aborting.
@bors-servo bors-servo closed this in 7455dc4 Jun 9, 2016
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.

None yet
3 participants
You can’t perform that action at this time.