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 Result::unwrap() panic in WPT reftest ("Connection reset by peer" or "Couldn't receive FontCacheThread") #8815

Closed
jdm opened this issue Dec 4, 2015 · 11 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Dec 4, 2015

 ▶ TIMEOUT [expected FAIL] /html/dom/elements/global-attributes/dir_auto-N-EN.html
  │ 
  │ was ready to save, resetting ready_to_save_state
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ was ready to save, resetting ready_to_save_state
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread 'Constellation' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 104, message: "Connection reset by peer" } }', ../src/libcore/result.rs:741
  │ stack backtrace:
  │    1:     0x7feb8058e3a0 - sys::backtrace::tracing::imp::write::h064b2475ee0d772cxXt
  │    2:     0x7feb805912d5 - panicking::log_panic::_<closure>::closure.40992
  │    3:     0x7feb80590d50 - panicking::log_panic::h29f8d24759545d7862x
  │    4:     0x7feb8057a003 - sys_common::unwind::begin_unwind_inner::hdadcc96a1ecb24974Ps
  │    5:     0x7feb8057a6b8 - sys_common::unwind::begin_unwind_fmt::h9442bd88fc02b35caPs
  │    6:     0x7feb8058da01 - rust_begin_unwind
  │    7:     0x7feb805be46f - panicking::panic_fmt::h2f3428e3725b99d6VFK
  │    8:     0x7feb7ef6dc65 - constellation::_<impl>::handle_is_ready_to_save_image::handle_is_ready_to_save_image::h7464060649015599629
  │    9:     0x7feb7eefb4e5 - constellation::_<impl>::handle_request::handle_request::h2512767965772658699
  │   10:     0x7feb7eee5f47 - sys_common::unwind::try::try_fn::try_fn::h18033304662745029905
  │   11:     0x7feb8058d848 - __rust_try
  │   12:     0x7feb80589c1b - sys_common::unwind::try::inner_try::hb6fbb19d6020cb51CMs
  │   13:     0x7feb7eee81ba - boxed::_<impl>::call_box::call_box::h3977225798282015024
  │   14:     0x7feb8058fc33 - sys::thread::_<impl>::new::thread_start::h51b5333730e2e1a3I5w
  │   15:     0x7feb7c53a181 - start_thread
  │   16:     0x7feb7cd5447c - __clone
  └   17:                0x0 - <unknown>

This looks like a case of the layout/script threads already having shut down and the constellation racing to communicate with them.

@jdm
Copy link
Member Author

@jdm jdm commented Jan 18, 2016

These might be caused by servo/ipc-channel#29.

@jdm
Copy link
Member Author

@jdm jdm commented Jan 25, 2016

This will hopefully be solved by servo/ipc-channel#30.

frewsxcv added a commit that referenced this issue Jan 28, 2016
bors-servo added a commit that referenced this issue Jan 28, 2016
Upgrade ipc-channel dependency.

servo/ipc-channel@dfd8513...4cc8773

Attempt to fix #8815

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9445)
<!-- Reviewable:end -->
@jdm jdm reopened this Jan 30, 2016
@jdm
Copy link
Member Author

@jdm jdm commented Jan 30, 2016

Still happening.

@jdm
Copy link
Member Author

@jdm jdm commented Jan 30, 2016

  ▶ TIMEOUT [expected PASS] /css-transforms-1_dev/html/svg-scalex-002.htm
  │ 
  │ thread 'Constellation' panicked at 'called `Result::unwrap()` on an `Err` value: IoError(Error { repr: Os { code: 104, message: "Connection reset by peer" } })', ../src/libcore/result.rs:688
  │ stack backtrace:
  │    1:     0x7f8f0b7b81b0 - sys::backtrace::tracing::imp::write::hd273f86d5325347aweu
  │    2:     0x7f8f0b7bb0c5 - panicking::default_handler::_<closure>::closure.42335
  │    3:     0x7f8f0b7bab6f - panicking::default_handler::h907ce0af740f5f06spy
  │    4:     0x7f8f0b7a40d6 - sys_common::unwind::begin_unwind_inner::ha417239bcab1f2ff56s
  │    5:     0x7f8f0b7a4838 - sys_common::unwind::begin_unwind_fmt::hac4637ed0b5bb49eb6s
  │    6:     0x7f8f0b7b7811 - rust_begin_unwind
  │    7:     0x7f8f0b7ee7af - panicking::panic_fmt::he5f9c513e9167673LnK
  │    8:     0x7f8f0a08ce0c - constellation::Constellation<LTF, STF>::handle_request::h13343495223626346809
  │    9:     0x7f8f0a0773f7 - export::compositing::constellation::Constellation<LTF, STF>::start::_<closure>::closure.22535
  │   10:     0x7f8f0a076c53 - sys_common::unwind::try::try_fn::h2331431658975388735
  │   11:     0x7f8f0b7b7658 - __rust_try
  │   12:     0x7f8f0b7b393b - sys_common::unwind::try::inner_try::h62f00e3d34dbb509D3s
  │   13:     0x7f8f0a078c3a - boxed::F.FnBox<A>::call_box::h7687463075028640429
  │   14:     0x7f8f0b7b9933 - sys::thread::Thread::new::thread_start::hb3a0514b9d87669e1mx
  │   15:     0x7f8f07d42181 - start_thread
  │   16:     0x7f8f0785947c - __clone
  └   17:                0x0 - <unknown>
@jdm
Copy link
Member Author

@jdm jdm commented Jan 30, 2016

Unfortunately the stack here is much less informative than the original ones that prompted servo/ipc-channel#29 :(

emilio added a commit to emilio/servo that referenced this issue May 12, 2016
One of these two unwraps is the one that is causing servo#8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
emilio added a commit to emilio/servo that referenced this issue May 12, 2016
One of these two unwraps is the one that is causing most occurrences
of servo#8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
emilio added a commit to emilio/servo that referenced this issue May 12, 2016
One of these two unwraps is the one that is causing most occurrences
of servo#8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
bors-servo added a commit that referenced this issue May 12, 2016
gfx: Add expect messages to FontCacheThread::exit()

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they only add debug info.

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

One of these two unwraps is the one that is causing most occurrences
of #8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
@emilio emilio mentioned this issue May 12, 2016
4 of 5 tasks complete
@emilio
Copy link
Member

@emilio emilio commented May 12, 2016

Since most of the occurrences of this now happen in FontCacheThread::exit(), I added debug info in #11166.

It's probably a race, but if it's not really important (something like the other side has already exited) and we don't care a lot (that depends on what the other side is and expects), we could drop the unwrap()s.

bors-servo added a commit that referenced this issue May 12, 2016
gfx: Add expect messages to FontCacheThread::exit()

Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because they only add debug info.

Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process.

One of these two unwraps is the one that is causing most occurrences
of #8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11166)
<!-- Reviewable:end -->
@mbrubeck mbrubeck changed the title Intermittent Result::unwrap() panic in WPT reftest ("Connection reset by peer") Intermittent Result::unwrap() panic in WPT reftest ("Connection reset by peer" or "Couldn't receive FontCacheThread") May 13, 2016
@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented May 13, 2016

  ▶ TIMEOUT [expected FAIL] /css21_dev/html4/font-family-rule-001.htm
  │ 
  │ Xlib:  extension "XFree86-VidModeExtension" missing on display ":0".
  │ Shutting down the Constellation after generating an output file or exit flag specified
  │ thread 'Constellation' panicked at 'Couldn't receive FontCacheThread reply: IoError(Error { repr: Os { code: 104, message: "Connection reset by peer" } })', ../src/libcore/result.rs:785
  │ stack backtrace:
  │    1:     0x7f4f8177b040 - std::sys::backtrace::tracing::imp::write::h9fb600083204ae7f
  │    2:     0x7f4f817827bb - std::panicking::default_hook::_$u7b$$u7b$closure$u7d$$u7d$::hca543c34f11229ac
  │    3:     0x7f4f81782423 - std::panicking::default_hook::hc2c969e7453d080c
  │    4:     0x7f4f80eb4c47 - util::panicking::initiate_panic_hook::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h625edf9a36237d31
  │    5:     0x7f4f81768503 - std::sys_common::unwind::begin_unwind_inner::h30e12d15ce2b2e25
  │    6:     0x7f4f81769f48 - std::sys_common::unwind::begin_unwind_fmt::hb2de8a9968d38523
  │    7:     0x7f4f8177a291 - rust_begin_unwind
  │    8:     0x7f4f817b983f - core::panicking::panic_fmt::h257ceb0aa351d801
  │    9:     0x7f4f80a593e3 - core::result::unwrap_failed::h330560dbaf0a51e7
  │   10:     0x7f4f80a7f6ca - gfx::font_cache_thread::FontCacheThread::exit::ha2f1f4fd6ebc6397
  │   11:     0x7f4f7fdf0d68 - _<compositing..Constellation<LTF, STF>>::handle_exit::hae6d0417398a20fa
  │   12:     0x7f4f7fdc6592 - _<compositing..Constellation<LTF, STF>>::handle_request::h3c97e2d5b7782802
  │   13:     0x7f4f7fdba1dc - std::sys_common::unwind::try::try_fn::h12e8cdd1c52fbc04
  │   14:     0x7f4f8177a21b - __rust_try
  │   15:     0x7f4f8177a1ad - std::sys_common::unwind::inner_try::h47a4d9cd4a369dcd
  │   16:     0x7f4f7fdbb7ca - _<F as std..boxed..FnBox<A>>::call_box::h4fbd446f73dda14f
  │   17:     0x7f4f81780c74 - std::sys::thread::Thread::new::thread_start::h6f266e069bf4ec2b
  │   18:     0x7f4f7d738181 - start_thread
  │   19:     0x7f4f7d24f47c - __clone
  └   20:                0x0 - <unknown>
zakorgy added a commit to zakorgy/servo that referenced this issue May 26, 2016
One of these two unwraps is the one that is causing most occurrences
of servo#8815.

I'd go with removing the second unwrap entirely, but let's get some
debug info first, since it might probably be a race.
@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Jul 7, 2016

Seems to have disappeared.

@Ms2ger Ms2ger closed this Jul 7, 2016
@metajack metajack mentioned this issue Jul 12, 2016
8 of 18 tasks complete
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 1, 2019
…ipc-channel); r=jdm

servo/ipc-channel@dfd8513...4cc8773

Attempt to fix servo/servo#8815

Source-Repo: https://github.com/servo/servo
Source-Revision: 0cd034041f5859d6bc6f302f03376ae276611ebf

UltraBlame original commit: 5fd5b0576e5cf40fae1df5f3acd1a4519ff879e1
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 1, 2019
…ipc-channel); r=jdm

servo/ipc-channel@dfd8513...4cc8773

Attempt to fix servo/servo#8815

Source-Repo: https://github.com/servo/servo
Source-Revision: 0cd034041f5859d6bc6f302f03376ae276611ebf

UltraBlame original commit: 5fd5b0576e5cf40fae1df5f3acd1a4519ff879e1
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 1, 2019
…ipc-channel); r=jdm

servo/ipc-channel@dfd8513...4cc8773

Attempt to fix servo/servo#8815

Source-Repo: https://github.com/servo/servo
Source-Revision: 0cd034041f5859d6bc6f302f03376ae276611ebf

UltraBlame original commit: 5fd5b0576e5cf40fae1df5f3acd1a4519ff879e1
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.