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

LayoutWorker panic: RefCell<T> already mutably borrowed #11316

Closed
ocerman opened this issue May 21, 2016 · 7 comments
Closed

LayoutWorker panic: RefCell<T> already mutably borrowed #11316

ocerman opened this issue May 21, 2016 · 7 comments

Comments

@ocerman
Copy link

@ocerman ocerman commented May 21, 2016

Servo will crash (tested on Windows 8.1 x64) on this page http://siemensmania.cz

This is how to reproduce the issue:
launch servo via ./mach run --release http://siemensmania.cz and scroll page (like via PgDown/PgUp) - servo will crash (sooner or later) like this:
panic

Output:

$ ./mach run --release http://siemensmania.cz
ERROR:script::dom::htmlscriptelement: error loading script Internal("other os error")
ERROR:script::dom::htmlscriptelement: error loading script Internal("HTTP error code 404")
ERROR:script::dom::htmlscriptelement: error loading script Internal("other os error")
ERROR:js::rust: Error at http://cdn.clustrmaps.com/map_v2.js?u=zggb&d=8Bqdk8tcFPSpVgrbDaYSM3bxJDPNKU2jaL4AoR4eRrY:134:11265: document.createStyleSheet is not a function

thread 'LayoutWorker worker 5/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
thread 'LayoutWorker worker 6/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
thread 'LayoutWorker worker 2/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
thread 'LayoutWorker worker 3/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
thread 'LayoutWorker worker 1/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
thread 'LayoutWorker worker 4/6' panicked at 'RefCell<T> already mutably borrowed', ../src/libcore\cell.rs:444
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
stack backtrace:
   0:          0x213f2dc - <unknown>
   1:          0x213e7f7 - <unknown>
   2:          0x1b31ac8 - <unknown>
   3:          0x21035ff - <unknown>
   4:          0x2140385 - <unknown>
   5:          0x2105145 - <unknown>
   6:          0x213ffec - <unknown>
   7:          0x2154115 - <unknown>
   8:          0x2154c20 - <unknown>
   9:          0x1b850c4 - <unknown>
  10:          0x14fc6c8 - <unknown>
  11:          0x1501329 - <unknown>
  12:           0x7c8921 - <unknown>
  13:           0x93fc81 - <unknown>
  14:           0x93eeb6 - <unknown>
  15:           0x930651 - <unknown>
  16:           0x8d63bd - <unknown>
  17:           0x8dfa7a - <unknown>
  18:           0x82a5ec - <unknown>
  19:          0x214e7c8 - <unknown>
  20:           0x82c042 - <unknown>
  21:          0x213c7c9 - <unknown>
  22:     0x7ffc6bd113d1 - <unknown>
ERROR:constellation::constellation: Panic: called `Result::unwrap()` on an `Err` value: "SendError(..)"
ERROR:constellation::constellation: Backtrace:
frame #0  - 0x0000000001b3d653 - <no info>
frame #1  - 0x0000000001b3d563 - <no info>
frame #2  - 0x000000000080a591 - <no info>
frame #3  - 0x0000000001b31aab - <no info>
frame #4  - 0x0000000002103600 - <no info>
frame #5  - 0x0000000002140386 - <no info>
frame #6  - 0x0000000002105146 - <no info>
frame #7  - 0x000000000213ffed - <no info>
frame #8  - 0x0000000002154116 - <no info>
frame #9  - 0x00000000008d7473 - <no info>
frame #10 - 0x0000000000872028 - <no info>
frame #11 - 0x0000000000855917 - <no info>
frame #12 - 0x0000000000841974 - <no info>
frame #13 - 0x0000000000808dfb - <no info>
frame #14 - 0x000000000214e7c9 - <no info>
frame #15 - 0x0000000000809c40 - <no info>
frame #16 - 0x000000000213c7ca - <no info>
frame #17 - 0x00007ffc6bd113d2 - BaseThreadInitThunk

ERROR:constellation::constellation: Panic: assertion failed: !self.Document().needs_reflow() || self.window_size.get().is_none() ||
    self.suppress_reflow.get()
ERROR:constellation::constellation: Backtrace skipped (run with -Z full-backtraces to see every backtrace).
thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', ../src/libcore\result.rs:785
thread panicked while panicking. aborting.
Servo exited with return value -4
@metajack
Copy link
Contributor

@metajack metajack commented May 21, 2016

@larsbergstrom @pcwalton Any idea why these backtraces are so bad?

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 21, 2016

On windows compiled with the msys version of rust, we don't get symbol resolution. You'll have to open in gdb and use info line, as in #9468 (comment)

@metajack
Copy link
Contributor

@metajack metajack commented May 21, 2016

Does that mean if we compile for the msvc target we will get normal backtraces?

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 21, 2016

I believe that if we compile with msvc rust instead of the msys one, we will both get proper backtrace reporting and we'll work inside of the Visual Studio debugger :-)

cc @alexcrichton

@alexcrichton
Copy link
Contributor

@alexcrichton alexcrichton commented May 21, 2016

Yeah unfortunately the system APIs we use on Windows aren't compatible with the dwarf debug information that mingw generates. We might be able to use libbacktrace entirely to generate a backtrace (as it reads lots of dwarf info) but I've only seen very spotty results from time to time, and I've essentially never seen a good backtrace on Windows.

@alexcrichton
Copy link
Contributor

@alexcrichton alexcrichton commented May 21, 2016

Er, never seen a good backtrace on mingw

@nox
Copy link
Member

@nox nox commented Oct 1, 2017

I can't reproduce this anymore.

@nox nox closed this Oct 1, 2017
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
6 participants
You can’t perform that action at this time.