Skip to content

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

Closed

Description

@mbrubeck

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.

Activity

  1. added
    A-content/script
    I-intermittent
    B-high-value
    I-panic
    on May 6, 2016
  2. 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[/+] on May 7, 2016
  3. cbrewster commented on May 7, 2016

    @cbrewster
    Contributor

    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.

  4. jdm commented on May 20, 2016

    @jdm
    Member

    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.
    
  5. added a commit that references this issue on Jun 9, 2016
    7455dc4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/scriptB-high-valueI-intermittentI-panic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions