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

StylesheetContext::response_complete called multiple times w/ WebComponents. #10254

Closed
eddyb opened this issue Mar 29, 2016 · 5 comments
Closed

StylesheetContext::response_complete called multiple times w/ WebComponents. #10254

eddyb opened this issue Mar 29, 2016 · 5 comments

Comments

@eddyb
Copy link
Contributor

@eddyb eddyb commented Mar 29, 2016

After #10247, Servo can load enough of https://elements.polymer-project.org/bower_components/paper-button/demo/index.html (or, a simpler example, https://elements.polymer-project.org/bower_components/iron-fit-behavior/demo/index.html) to result in the following panic:

(EDIT: N.B. This first panic is tracked by #12047, the second one is specific to this issue)

thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at
'assertion failed: count_cell.get() > 0', /home/eddy/Projects/servo/components/script/dom/document.rs:1144
stack backtrace:
   1:     0x55ed83bdc3a0 - sys::backtrace::tracing::imp::write::h495bc662e480d01f2cv
   2:     0x55ed83be12ef - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44522
   3:     0x55ed83be0f68 - panicking::default_handler::h4e73712d1e927dfeH0z
   4:     0x55ed83bcacec - sys_common::unwind::begin_unwind_inner::h0e1be209f5e9e87dg2t
   5:     0x55ed8247c34f - sys_common::unwind::begin_unwind::h14217152112849155013
   6:     0x55ed825594b8 - dom::htmllinkelement::StylesheetContext.AsyncResponseListener::response_complete::h2eb8bd1165b1b970oU4
   7:     0x55ed82f2f6d3 - ResponseAction::process::heea94a2037600089Ypf
   8:     0x55ed82558187 - network_listener::ListenerRunnable<T>.Runnable::handler::h2666221587141280080
   9:     0x55ed82709894 - script_thread::ScriptThread::handle_msg_from_script::h0d5ea602ace550ebACt
  10:     0x55ed8274bc0b - script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::closure.188277
  11:     0x55ed8273a1b9 - script_thread::ScriptThread::handle_msgs::h18e431bcf8aa6677eot

By commenting out the body of Document::{in,de}crement_script_blocking_stylesheet_count, the underlying problem is exhibited:

thread 'ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }' panicked at
'unknown completed load Stylesheet(Url { scheme: "https", scheme_data: Relative(RelativeSchemeData { username: "", password: None, host: Domain("fonts.googleapis.com"), port: None, default_port: Some(443), path: ["css"] }), query: Some("family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic"), fragment: None })', ../src/libcore/option.rs:704
stack backtrace:
   1:     0x55b069c09460 - sys::backtrace::tracing::imp::write::h495bc662e480d01f2cv
   2:     0x55b069c0e3af - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44522
   3:     0x55b069c0e028 - panicking::default_handler::h4e73712d1e927dfeH0z
   4:     0x55b069bf7dac - sys_common::unwind::begin_unwind_inner::h0e1be209f5e9e87dg2t
   5:     0x55b069bf8d58 - sys_common::unwind::begin_unwind_fmt::h45dc2fac9b5e0d23m1t
   6:     0x55b069c08761 - rust_begin_unwind
   7:     0x55b069c45dcf - panicking::panic_fmt::h40f5ec0cdc3fc429FRL
   8:     0x55b069c51004 - option::expect_failed::h56e104933d0889c7LpO
   9:     0x55b0684ab746 - document_loader::DocumentLoader::finish_load::hc65f67d3d717ad00Jdb
  10:     0x55b0684a998a - dom::document::Document::finish_load::hd5020bc39a09b698qEO
  11:     0x55b0685860c9 - dom::htmllinkelement::StylesheetContext.AsyncResponseListener::response_complete::h5538b238e4650b00xT4
  12:     0x55b068f5c793 - ResponseAction::process::heea94a2037600089Ypf
  13:     0x55b068585187 - network_listener::ListenerRunnable<T>.Runnable::handler::h14943577174353779088
  14:     0x55b068736854 - script_thread::ScriptThread::handle_msg_from_script::h93c0d0f15dd73f87JBt
  15:     0x55b068778bcb - script_thread::ScriptThread::handle_msgs::_$u7b$$u7b$closure$u7d$$u7d$::closure.188264
  16:     0x55b068767179 - script_thread::ScriptThread::handle_msgs::hd7d61674a04d5f4dnnt
@alex
Copy link
Contributor

@alex alex commented May 26, 2016

@eddyb
Copy link
Contributor Author

@eddyb eddyb commented May 26, 2016

@alex Wow, that's good news, more reproductions! The only thing I notice on that page is:

<script async="" src="http://plaintext.ssllabs.com/plaintext/script.js?t=1464221349657&amp;_=1464221349650"></script>

So maybe async scripts are just broken? How can we confirm this?

@jdm
Copy link
Member

@jdm jdm commented Jul 2, 2016

With the changes from #12047 applied I can't reproduce the problem on any of the URLs listed here.

@jdm
Copy link
Member

@jdm jdm commented Jul 2, 2016

Sorry, I didn't notice that the original URL (rather than the simplified one) still shows the "unknown completed load" panic. Let's keep this issue focused on that panic and leave #12047 for the original assertion.

@nox
Copy link
Member

@nox nox commented Oct 1, 2017

I don't get a panic 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
4 participants
You can’t perform that action at this time.