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

assertion failed: FlowRef::get_mut(&mut this).is_some() #18544

Closed
mateon1 opened this issue Sep 17, 2017 · 3 comments
Closed

assertion failed: FlowRef::get_mut(&mut this).is_some() #18544

mateon1 opened this issue Sep 17, 2017 · 3 comments

Comments

@mateon1
Copy link
Contributor

@mateon1 mateon1 commented Sep 17, 2017

Found on http://citilink.ru, reproducible

assertion failed: FlowRef::get_mut(&mut this).is_some() (thread <unnamed>, at /shared/dev/rust/servo/components/layout/flow_ref.rs:44)
stack backtrace:
   0:     0x556652642184 - backtrace::backtrace::libunwind::trace
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.2/src/backtrace/libunwind.rs:53
                         - backtrace::backtrace::trace<closure>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.2/src/backtrace/mod.rs:42
   1:     0x55665263c9af - backtrace::capture::{{impl}}::new
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.2/src/capture.rs:64
   2:     0x55664bba0ab6 - servo::main::{{closure}}
                        at /shared/dev/rust/servo/ports/servo/main.rs:130
   3:     0x556652922146 - std::panicking::rust_panic_with_hook
                        at /checkout/src/libstd/panicking.rs:578
   4:     0x55664ff452b5 - std::panicking::begin_panic<&str>
                        at /checkout/src/libstd/panicking.rs:538
   5:     0x55664fdd5c56 - layout::flow_ref::{{impl}}::into_arc
                        at /shared/dev/rust/servo/components/layout/flow_ref.rs:44
   6:     0x55664fd30e39 - core::ops::function::FnOnce::call_once<fn(layout::flow_ref::FlowRef) -> alloc::arc::Arc<Flow>,(layout::flow_ref::FlowRef)>
                        at /checkout/src/libcore/ops/function.rs:223
   7:     0x55664fd060c8 - core::option::{{impl}}::map<layout::flow_ref::FlowRef,alloc::arc::Arc<Flow>,fn(layout::flow_ref::FlowRef) -> alloc::arc::Arc<Flow>>
                        at /checkout/src/libcore/option.rs:398
   8:     0x55664fdd565b - layout::flow_list::{{impl}}::pop_front_arc
                        at /shared/dev/rust/servo/components/layout/flow_list.rs:84
   9:     0x55664fdd8582 - layout::multicol::{{impl}}::assign_block_size
                        at /shared/dev/rust/servo/components/layout/multicol.rs:155
  10:     0x55664fdeb9c4 - layout::traversal::{{impl}}::process
                        at /shared/dev/rust/servo/components/layout/traversal.rs:277
  11:     0x55664fdd9ae5 - layout::parallel::bottom_up_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:93
  12:     0x55664fdda07a - layout::parallel::top_down_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:157
  13:     0x55664fdda133 - layout::parallel::top_down_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:167
  14:     0x55664fdda133 - layout::parallel::top_down_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:167
  15:     0x55664fdda3bf - layout::parallel::top_down_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:183
  16:     0x55664fdda133 - layout::parallel::top_down_flow
                        at /shared/dev/rust/servo/components/layout/parallel.rs:167
  17:     0x55664fdda48f - layout::parallel::top_down_flow::{{closure}}
                        at /shared/dev/rust/servo/components/layout/parallel.rs:179
  18:     0x55664fce186d - rayon_core::scope::{{impl}}::execute_job_closure::{{closure}}<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:354
  19:     0x55664fcd7fca - std::panic::{{impl}}::call_once<(),closure>
                        at /checkout/src/libstd/panic.rs:296
  20:     0x55664ff45b82 - std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panicking.rs:480
  21:     0x5566529292dc - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:99
  22:     0x55664ff455dc - std::panicking::try<(),std::panic::AssertUnwindSafe<closure>>
                        at /checkout/src/libstd/panicking.rs:459
  23:     0x55664fd11545 - std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panic.rs:361
  24:     0x55664fce1d14 - rayon_core::unwind::halt_unwinding<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/unwind.rs:19
  25:     0x55664fdf826a - rayon_core::scope::{{impl}}::execute_job_closure<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:354
  26:     0x55664fdf8130 - rayon_core::scope::{{impl}}::execute_job<closure>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:343
  27:     0x55664fce1927 - rayon_core::scope::{{impl}}::spawn::{{closure}}<closure>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:274
  28:     0x55664fd7cbc3 - rayon_core::job::{{impl}}::execute<closure>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/job.rs:142
  29:     0x556652266c4f - rayon_core::job::{{impl}}::execute
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/job.rs:55
  30:     0x5566522691ee - rayon_core::registry::{{impl}}::execute
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:476
  31:     0x556652268b7f - rayon_core::registry::{{impl}}::wait_until_cold<rayon_core::latch::CountLatch>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:460
  32:     0x55665225f73f - rayon_core::registry::{{impl}}::wait_until<rayon_core::latch::CountLatch>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:436
  33:     0x55665225fd2c - rayon_core::scope::{{impl}}::steal_till_jobs_complete
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:382
  34:     0x55664fce1ab9 - rayon_core::scope::scope::{{closure}}<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:257
  35:     0x55664fce24c3 - rayon_core::registry::in_worker<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:597
  36:     0x55664fdf89d5 - rayon_core::scope::scope<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/scope/mod.rs:248
  37:     0x55664fddaa07 - layout::parallel::reflow::{{closure}}
                        at /shared/dev/rust/servo/components/layout/parallel.rs:205
  38:     0x55664fd97a6d - rayon_core::job::{{impl}}::execute::{{closure}}<rayon_core::latch::LockLatch,closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/job.rs:99
  39:     0x55664fcd8087 - std::panic::{{impl}}::call_once<(),closure>
                        at /checkout/src/libstd/panic.rs:296
  40:     0x55664ff45cdf - std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panicking.rs:480
  41:     0x5566529292dc - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:99
  42:     0x55664ff457bc - std::panicking::try<(),std::panic::AssertUnwindSafe<closure>>
                        at /checkout/src/libstd/panicking.rs:459
  43:     0x55664fd11472 - std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panic.rs:361
  44:     0x55664fce1c11 - rayon_core::unwind::halt_unwinding<closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/unwind.rs:19
  45:     0x55664fd97777 - rayon_core::job::{{impl}}::execute<rayon_core::latch::LockLatch,closure,()>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/job.rs:99
  46:     0x556652266c4f - rayon_core::job::{{impl}}::execute
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/job.rs:55
  47:     0x5566522691ee - rayon_core::registry::{{impl}}::execute
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:476
  48:     0x556652268b7f - rayon_core::registry::{{impl}}::wait_until_cold<rayon_core::latch::CountLatch>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:460
  49:     0x55665226899f - rayon_core::registry::{{impl}}::wait_until<rayon_core::latch::CountLatch>
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:436
  50:     0x556652269a10 - rayon_core::registry::main_loop
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:559
  51:     0x556652253e56 - rayon_core::registry::{{impl}}::new::{{closure}}
                        at /shared/dev/rust/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rayon-core-1.2.0/src/registry.rs:145
  52:     0x5566522491f2 - std::sys_common::backtrace::__rust_begin_short_backtrace<closure,()>
                        at /checkout/src/libstd/sys_common/backtrace.rs:136
  53:     0x5566522610ca - std::thread::{{impl}}::spawn::{{closure}}::{{closure}}<closure,()>
                        at /checkout/src/libstd/thread/mod.rs:394
  54:     0x556652260132 - std::panic::{{impl}}::call_once<(),closure>
                        at /checkout/src/libstd/panic.rs:296
  55:     0x55665224a734 - std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panicking.rs:480
  56:     0x5566529292dc - panic_unwind::__rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:99
  57:     0x55665224a515 - std::panicking::try<(),std::panic::AssertUnwindSafe<closure>>
                        at /checkout/src/libstd/panicking.rs:459
  58:     0x556652260fd9 - std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure>,()>
                        at /checkout/src/libstd/panic.rs:361
  59:     0x55665224a0ee - std::thread::{{impl}}::spawn::{{closure}}<closure,()>
                        at /checkout/src/libstd/thread/mod.rs:393
  60:     0x556652251447 - alloc::boxed::{{impl}}::call_box<(),closure>
                        at /checkout/src/liballoc/boxed.rs:682
  61:     0x556652920dcb - alloc::boxed::{{impl}}::call_once<(),()>
                        at /checkout/src/liballoc/boxed.rs:692
                         - std::sys_common::thread::start_thread
                        at /checkout/src/libstd/sys_common/thread.rs:21
                         - std::sys::imp::thread::{{impl}}::new::thread_start
                        at /checkout/src/libstd/sys/unix/thread.rs:84
  62:     0x7fbbc2c81493 - start_thread
  63:     0x7fbbc27aeabe - __clone
  64:                0x0 - <unknown>
ERROR:servo: assertion failed: FlowRef::get_mut(&mut this).is_some()
@mateon1
Copy link
Contributor Author

@mateon1 mateon1 commented Sep 19, 2017

Test case reproducing this bug:

<div style="position:fixed"></div>
<script>
document.body.children[0].style["column-count"] = 1
</script>
@ferjm
Copy link
Member

@ferjm ferjm commented Jan 22, 2018

I cannot reproduce this bug with the suggested test case or with http://citilink.ru. Please, reopen if you can reproduce it again.

@ferjm ferjm closed this Jan 22, 2018
@emilio
Copy link
Member

@emilio emilio commented Jan 22, 2018

We should still land the testcase though.

This was probably fixed by #18893, which fixed the "can be fragmented" bit to be propagated properly.

@emilio emilio reopened this Jan 22, 2018
@ferjm ferjm assigned ferjm and emilio and unassigned ferjm Jan 22, 2018
ferjm added a commit to ferjm/servo that referenced this issue Jan 22, 2018
ferjm added a commit to ferjm/servo that referenced this issue Jan 22, 2018
@ferjm ferjm mentioned this issue Jan 22, 2018
4 of 4 tasks complete
ferjm added a commit to ferjm/servo that referenced this issue Jan 22, 2018
bors-servo added a commit that referenced this issue Jan 23, 2018
Test for #18544 - Flow list crash

- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #18544
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19834)
<!-- Reviewable:end -->
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.