Closed Bug 1355672 Opened 3 years ago Closed 3 years ago

stylo: startup crash

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox55 --- affected

People

(Reporter: njn, Unassigned)

References

Details

On Linux, a Stylo-enabled build is crashing 100% reliably for me on startup, shortly after the browser window pops up, but before anything is rendered. It happens in both opt and debug builds. Things were working fine late last week.

> #0  0x0000000000408321 in mozalloc_abort (
>     msg=0x44532b "Redirecting call to abort() to mozalloc_abort\n")
>     at /home/njn/moz/mi2/memory/mozalloc/mozalloc_abort.cpp:33
> #1  0x00000000004083ac in abort ()
>     at /home/njn/moz/mi2/memory/mozalloc/mozalloc_abort.cpp:80
> #2  0x00007fffe9cb4849 in panic_abort::__rust_start_panic::abort ()
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_abort/lib.rs:61
> #3  panic_abort::__rust_start_panic ()
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_abort/lib.rs:56
> #4  0x00007fffe9cb098d in std::panicking::rust_panic ()
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:584
> #5  0x00007fffe9cb094d in std::panicking::rust_panic_with_hook ()
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:569
> #6  0x00007fffe98ddedb in std::panicking::begin_panic<&str> (msg=..., 
>     file_line=0x0)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:515
> #7  0x00007fffe992a53b in style::gecko_bindings::structs::root::nsTArray<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer>::slice_begin<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer> (self=0x7fffcf23c528)
>     at /home/njn/moz/mi2/servo/components/style/gecko_bindings/sugar/ns_t_array.rs:48
> #8  0x00007fffe992a14f in style::gecko_bindings::sugar::ns_t_array::{{impl}}::deref_mut<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer> (
>     self=0x7fffcf23c528)
>     at /home/njn/moz/mi2/servo/components/style/gecko_bindings/sugar/ns_t_array.rs:27
> #9  0x00007fffe9928f27 in style::gecko_bindings::structs::root::nsStyleAutoArray<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer>::iter_mut<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer> (
>     self=0x7fffcf23c4c0)
>    ings/sugar/ns_style_auto_array.rs:43
> #10 0x00007fffe99290be in style::gecko_bindings::sugar::ns_style_auto_array::{{impl}}::into_iter<style::gecko_bindings::structs::root::nsStyleImageLayers_Layer> (
>     self=0x7ffff710a750 <_IO_stdfile_2_lock>) at /home/njn/moz/mi2/servo/components/style/gecko_bindings/sugar/ns_style_auto_array.rs:82
> #11 0x00007fffe9968e2e in style::gecko_properties::GeckoBackground::set_background_image (self=0x7fffcf23c490, images=..., cacheable=0x7fffcf9fd9c7)
>     at /home/njn/moz/mi2/servo/components/style/lib.rs:155
> #12 0x00007fffe9930fa5 in style::properties::longhands::background_image::cascade_property::{{closure}} (value=0x7fffcf9fd488) at /home/njn/moz/mi2/servo/components/style/lib.rs:149
> #13 0x00007fffe994af88 in style::properties::substitute_variables_background_image<closure> (value=0x0, custom_properties=0x7fffcf9fd498, f=..., error_reporter=...)
>     at /home/njn/moz/mi2/servo/components/style/lib.rs:149
> #14 0x00007fffe9930eba in style::properties::longhands::background_image::cascade_property (declaration=<optimised out>, inherited_style=<optimised out>, 
>     default_style=<optimised out>, context=<optimised out>, cacheable=<optimised out>, cascade_info=<optimised out>, error_reporter=...)
>     at /home/njn/moz/mi2/servo/components/style/lib.rs:149
> #15 0x00007fffe9acefd5 in style::properties::apply_declarations<closure,core::iter::FlatMap<style::rule_tree::SelfAndAncestors, core::iter::FilterMap<core::iter::Rev<core::slice::Iter<(style::properties::PropertyDeclaration, style::properties::declaration_block::Importance)>>, closure>, closure>> (device=0x0, 
>     is_root_element=<error reading variable: access outside bounds of object referenced via synthetic pointer>, iter_declarations=..., inherited_style=0x7fffcf23f8f0, 
>     layout_parent_style=0x7fff00000000, cascade_info=..., error_reporter=..., font_metrics_provider=..., flags=...) at /home/njn/moz/mi2/servo/components/style/lib.rs:149
> #16 0x00007fffe9ace46b in style::properties::cascade (device=0x7fffc20a68e0, rule_node=<optimised out>, guards=<optimised out>, parent_style=..., layout_parent_style=..., 
>     cascade_info=..., error_reporter=<error reading variable: access outside bounds of object referenced via synthetic pointer>, font_metrics_provider=..., flags=...)
>     at /home/njn/moz/mi2/servo/components/style/lib.rs:149
> #17 0x00007fffe9b8f6e7 in style::matching::PrivateMatchMethods::cascade_with_rules<style::gecko::wrapper::GeckoElement> (self=<optimised out>, shared_context=<optimised out>, 
>     font_metrics_provider=..., rule_node=<optimised out>, primary_style=<optimised out>, cascade_flags=..., is_pseudo=<optimised out>)
>     at /home/njn/moz/mi2/servo/components/style/matching.rs:386
> #18 0x00007fffe9b8f86d in style::matching::PrivateMatchMethods::cascade_internal<style::gecko::wrapper::GeckoElement> (self=0x7fffcf9fde28, context=0x7fffcf9fdfd0, 
>     primary_style=<optimised out>, pseudo_style=0x7fffcf9fdd60) at /home/njn/moz/mi2/servo/components/style/matching.rs:412
> #19 0x00007fffe9b8f90e in style::matching::PrivateMatchMethods::cascade_primary_or_pseudo<style::gecko::wrapper::GeckoElement> (self=0x7fffcf9fde28, context=0x7fffcf9fdfd0, 
>     data=<optimised out>, pseudo=..., animate=true) at /home/njn/moz/mi2/servo/components/style/matching.rs:432
> #20 0x00007fffe9b8fe87 in style::matching::MatchMethods::match_and_cascade<style::gecko::wrapper::GeckoElement> (self=<optimised out>, context=<optimised out>, data=<optimised out>, 
>     sharing=style::matching::StyleSharingBehavior::Allow) at /home/njn/moz/mi2/servo/components/style/matching.rs:705
> #21 0x00007fffe9b9882c in style::traversal::compute_style<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (_traversal=<optimised out>, 
>     traversal_data=<optimised out>, context=<optimised out>, element=..., data=<optimised out>) at /home/njn/moz/mi2/servo/components/style/traversal.rs:710
> #22 0x00007fffe9b98311 in style::traversal::recalc_style_at<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (traversal=<optimised out>, 
>     traversal_data=<optimised out>, context=0x7fffcf9fdfd0, element=..., data=<optimised out>) at /home/njn/moz/mi2/servo/components/style/traversal.rs:580
> #23 0x00007fffe9b8b024 in style::gecko::traversal::{{impl}}::process_preorder (self=0x7fffffffa788, traversal_data=0x7fffcf9fe0c0, thread_local=0x7fffb8895368, node=...)
>     at /home/njn/moz/mi2/servo/components/style/gecko/traversal.rs:46
> #24 0x00007fffe988a95a in style::parallel::top_down_dom<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., traversal_data=..., root=..., 
>     scope=<optimised out>, traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:115
> #25 style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., root=..., traversal_data=..., scope=<optimised out>, 
>     traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:148
> #26 0x00007fffe988aa2c in style::parallel::top_down_dom<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., traversal_data=..., root=..., 
>     scope=<optimised out>, traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:129
> #27 style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., root=..., traversal_data=..., scope=<optimised out>, 
>     traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:148
> #28 0x00007fffe988aa2c in style::parallel::top_down_dom<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., traversal_data=..., root=..., 
>     scope=<optimised out>, traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:129
> #29 style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., root=..., traversal_data=..., scope=<optimised out>, 
>     traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:148
> #30 0x00007fffe988aa2c in style::parallel::top_down_dom<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., traversal_data=..., root=..., 
>     scope=<optimised out>, traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:129
> #31 style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (nodes=..., root=..., traversal_data=..., scope=<optimised out>, 
>     traversal=<optimised out>, tls=<optimised out>) at /home/njn/moz/mi2/servo/components/style/parallel.rs:148
> #32 0x00007fffe988a7dc in style::parallel::traverse_dom::{{closure}}::{{closure}}<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (scope=0x0)
>     at /home/njn/moz/mi2/servo/components/style/parallel.rs:75
> #33 0x00007fffe9870aa4 in rayon::scope::{{impl}}::execute_job_closure::{{closure}}<closure> () at /home/njn/moz/mi2/third_party/rust/rayon/src/scope/mod.rs:314
> #34 0x00007fffe98b26c0 in std::panic::{{impl}}::call_once<(),closure> (self=..., _args=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:295
> #35 0x00007fffe984fa60 in std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()> (data=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:458
> #36 0x00007fffe9cb483c in panic_abort::__rust_maybe_catch_panic () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_abort/lib.rs:40
> #37 0x00007fffe984f973 in std::panicking::try<(),std::panic::AssertUnwindSafe<closure>> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:434
> #38 0x00007fffe984f694 in std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:351
> #39 0x00007fffe9870da4 in rayon::unwind::halt_unwinding<closure,()> (func=...) at /home/njn/moz/mi2/third_party/rust/rayon/src/unwind.rs:19
> #40 0x00007fffe987095c in rayon::scope::Scope::execute_job_closure<closure> (self=0x7fffcf9fe830, func=...) at /home/njn/moz/mi2/third_party/rust/rayon/src/scope/mod.rs:314
> #41 0x00007fffe9870cd5 in rayon::scope::scope<closure> (op=...) at /home/njn/moz/mi2/third_party/rust/rayon/src/scope/mod.rs:241
> #42 0x00007fffe988a790 in style::parallel::traverse_dom::{{closure}}<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> ()
>     at /home/njn/moz/mi2/servo/components/style/parallel.rs:74
> #43 0x00007fffe98a9670 in rayon::job::{{impl}}::execute::{{closure}}<rayon::latch::LockLatch,closure,()> () at /home/njn/moz/mi2/third_party/rust/rayon/src/job.rs:110
> #44 0x00007fffe98b2640 in std::panic::{{impl}}::call_once<(),closure> (self=..., _args=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:295
> #45 0x00007fffe984fa20 in std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()> (data=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:458
> #46 0x00007fffe9cb483c in panic_abort::__rust_maybe_catch_panic () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_abort/lib.rs:40
> #47 0x00007fffe984f853 in std::panicking::try<(),std::panic::AssertUnwindSafe<closure>> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:434
> #48 0x00007fffe984f6d4 in std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:351
> #49 0x00007fffe9870d64 in rayon::unwind::halt_unwinding<closure,()> (func=...) at /home/njn/moz/mi2/third_party/rust/rayon/src/unwind.rs:19
> #50 0x00007fffe98a95c5 in rayon::job::{{impl}}::execute<rayon::latch::LockLatch,closure,()> (this=0x7fffffffa530, mode=<optimised out>)
>     at /home/njn/moz/mi2/third_party/rust/rayon/src/job.rs:110
> #51 0x00007fffe9c460f2 in rayon::thread_pool::main_loop (worker=..., registry=..., index=<optimised out>) at /home/njn/moz/mi2/third_party/rust/rayon/src/thread_pool.rs:447
> #52 0x00007fffe9c449d0 in std::panic::{{impl}}::call_once<(),closure> (self=..., _args=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:295
> #53 0x00007fffe9c3fcd0 in std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()> (data=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:458
> #54 0x00007fffe9cb483c in panic_abort::__rust_maybe_catch_panic () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libpanic_abort/lib.rs:40
> #55 0x00007fffe9c3fc73 in std::panicking::try<(),std::panic::AssertUnwindSafe<closure>> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panicking.rs:434
> #56 0x00007fffe9c3f794 in std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()> (f=...)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/panic.rs:351
> #57 0x00007fffe9c3fb30 in std::thread::{{impl}}::spawn::{{closure}}<closure,()> () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/thread/mod.rs:301
> #58 0x00007fffe9c4224e in alloc::boxed::{{impl}}::call_box<(),closure> (self=0x7fffd1a31a00, args=<optimised out>)
>     at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/liballoc/boxed.rs:605
> #59 0x00007fffe9caf2a5 in alloc::boxed::{{impl}}::call_once<(),()> () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/liballoc/boxed.rs:615
> #60 std::sys_common::thread::start_thread () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys_common/thread.rs:21
> #61 std::sys::imp::thread::{{impl}}::new::thread_start () at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libstd/sys/unix/thread.rs:84
> #62 0x00007ffff7bc16ca in start_thread (arg=0x7fffcf9ff700) at pthread_create.c:333
> #63 0x00007ffff6e4f0af in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
I'm currently on revision 1dc3aef24017, though it was happening on some earlier revisions too.
Flags: needinfo?(bobbyholley)
Hm, that looks bad. Though it's a bit curious it doesn't happen on CI. Are you perhaps disabling build-time bindgen? If so, that would make your build totally busted.
Flags: needinfo?(bobbyholley)
Flags: needinfo?(n.nethercote)
Apparently njn had ac_add_options --disable-stylo-build-bindgen in his mozconfig, which will result in busted builds. I sent mail to stylo-team reminding people not to do this.
Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(n.nethercote)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.