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: requested_size.width <= self.max_texture_size (running wpt tests with broken driver) #1260

Closed
MortimerGoro opened this issue May 16, 2017 · 6 comments

Comments

@MortimerGoro
Copy link
Contributor

MortimerGoro commented May 16, 2017

Running filtered servo wpt tests such as "./mach test-wpt --release dom" or "./mach test-wpt --release webgl" crash on my desktop linux machine.

They only crash when --no-pause-after-test is enabled (running test categories or a single test using "./mach test-wpt --release tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html --no-pause-after-test"). Running any single test without --no-pause-after-test works ok.

It seems like something broke in headless mode in a webrender change. I was able to run tests with no problem in the past.

Here is the backtrace, any idea?

 0:04.74 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "assertion failed: requested_size.width <= self.max_texture_size (thread main, at /home/mortimer/Projects/extensions/servo/.cargo/git/checkouts/webrender-c3596abe1cf4f320/4ab9b9b/webrender/src/texture_cache.rs:618)"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "stack backtrace:"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   0:     0x55e58ff2decc - backtrace::backtrace::trace::haa53f4880ff627c6"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   1:     0x55e58ff2e392 - backtrace::capture::Backtrace::new::h5f3de869c0349b3d"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   2:     0x55e58f06cd15 - servo::main::{{closure}}::hed617678bcb97b95"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   3:     0x55e59100a0ea - std::panicking::rust_panic_with_hook"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                        at /checkout/src/libstd/panicking.rs:550"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   4:     0x55e58fcf058f - std::panicking::begin_panic::h2cdb5c8f557073e7"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   5:     0x55e58fda2c00 - webrender::texture_cache::TextureCache::insert::hc64d8ec498dca297"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   6:     0x55e58fdadff0 - webrender::renderer::Renderer::new::h47c21963b9c0194b"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   7:     0x55e58f06a9bf - servo::main::h302fe8902df282c4"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   8:     0x55e59101117a - panic_unwind::__rust_maybe_catch_panic"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                        at /checkout/src/libpanic_unwind/lib.rs:98"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "   9:     0x55e59100a918 - std::panicking::try<(),closure>"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                        at /checkout/src/libstd/panicking.rs:433"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                         - std::panic::catch_unwind<closure,()>"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                        at /checkout/src/libstd/panic.rs:361"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                         - std::rt::lang_start"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "                        at /checkout/src/libstd/rt.rs:56"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "  10:     0x7feadcb0582f - __libc_start_main"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "  11:     0x55e58f03c228 - _start"
 0:05.09 PROCESS_OUTPUT: Thread-TestrunnerManager-1 (pid:9988) "  12:                0x0 - <unknown>"

@kvark
Copy link
Member

kvark commented May 16, 2017

Running this command is fine on my machine:

./mach test-wpt --release tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html --no-pause-after-test

Output:

Ran 7 tests (1 parents, 6 subtests)
Expected results: 7
Unexpected results: 0

Similarly, this command succeeds:

./mach test-wpt --release dom --no-pause-after-test

However, testing webgl produces a number of timeout and crashes like this one (seems unrelated to the subject issue):

  │ Unexpected WebGL error: 0x506 (1286) (thread RenderBackend, at /home/kvark/Code/servo/.cargo/git/checkouts/webrender-c3596abe1cf4f320/4ab9b9b/webrender_traits/src/webgl.rs:638)
  │ stack backtrace:
  │    0:     0x5652d292d8fc - backtrace::backtrace::trace::haa53f4880ff627c6
  │    1:     0x5652d292c4c5 - backtrace::capture::Backtrace::new::h5f3de869c0349b3d
  │    2:     0x5652d0fe385d - servo::main::{{closure}}::h39d9f1152402b9c7
  │    3:     0x5652d3544caa - std::panicking::rust_panic_with_hook
  │                         at /checkout/src/libstd/panicking.rs:550
  │    4:     0x5652d3544af4 - std::panicking::begin_panic<collections::string::String>
  │                         at /checkout/src/libstd/panicking.rs:511
  │    5:     0x5652d3544a79 - std::panicking::begin_panic_fmt
  │                         at /checkout/src/libstd/panicking.rs:495
  │    6:     0x5652d29b4d7f - webrender_traits::webgl::WebGLCommand::apply::hf56a7859fac3ff2d
  │    7:     0x5652d2985383 - webrender::webgl_types::GLContextWrapper::apply_command::h05271b5d85b8476f
  │    8:     0x5652d295eaea - webrender::render_backend::RenderBackend::run::h9eba8e3bc033dd6c
  │    9:     0x5652d2a82739 - std::sys_common::backtrace::__rust_begin_short_backtrace::h6e1232fbe5b0fb62
  │   10:     0x5652d2a82425 - <std::panic::AssertUnwindSafe<F> as core::ops::FnOnce<()>>::call_once::h6df2da4b5fe58e96
  │   11:     0x5652d2a3c715 - std::panicking::try::do_call::hb4c54df768b096a3
  │   12:     0x5652d354bd3a - panic_unwind::__rust_maybe_catch_panic
  │                         at /checkout/src/libpanic_unwind/lib.rs:98
  │   13:     0x5652d2a3c479 - std::panicking::try::haee18f9996a39cd2
  │   14:     0x5652d2a821a9 - std::panic::catch_unwind::h45d54a70951c0019
  │   15:     0x5652d2a5e015 - <F as alloc::boxed::FnBox<A>>::call_box::hbde75f04ec6f1618
  │   16:     0x5652d3543845 - alloc::boxed::{{impl}}::call_once<(),()>
  │                         at /checkout/src/liballoc/boxed.rs:658
  │                          - 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
  │   17:     0x7f53219cc6c9 - start_thread
  │   18:     0x7f53214eff7e - clone
  │   19:                0x0 - <unknown>

I'm running off rev d04a64394efb40adeadf0dd950247d2a08ba13b0 of servo/servo#16891
Kernel: 4.10.8-200.fc25.x86_64

@MortimerGoro
Copy link
Contributor Author

I printed the sizes and max_texture_size is 0:

 device::new 0
  │ requested Size: 2 <= max_texture_size 0
  │ assertion failed: requested_size.width <= self.max_texture_size (thread main, at /home/mortimer/Projects/4ab9b9b/webrender/src/texture_cache.rs:619)

I tried adding this servo/servo#16903 but the same problem.

I'm running latest servo upstream with Ubuntu 16.04 with kernel 4.8.0-49-generic

@glennw
Copy link
Member

glennw commented May 18, 2017

@MortimerGoro Have you recently installed / updated nvidia proprietary drivers on your machine?

@MortimerGoro
Copy link
Contributor Author

MortimerGoro commented May 22, 2017

@glennw Yes, I installed & updated some time ago. I have tried to switch to nouveau driver and it works!. The crash only happens with the proprietary drivers.

@glennw
Copy link
Member

glennw commented May 22, 2017

@MortimerGoro OK, that matches up with what I've seen on someone else's machine. Something in our build config results in the nVidia proprietary libGL.so being loaded when using OSMesa for the CI tests. This results in much badness, and a non-working GL context.

@nical nical changed the title assertion failed: requested_size.width <= self.max_texture_size (running wpt tests) assertion failed: requested_size.width <= self.max_texture_size (running wpt tests with broken driver) Aug 9, 2017
bors-servo pushed a commit that referenced this issue Aug 9, 2017
Fail initialization if the max texture size is insufficient.

This works around #1260 ([driver issues entry](https://github.com/servo/webrender/wiki/Driver-issues#1260---broken-gl-context-reports-max-texture-size-equal-to-zero)) by gracefully failing the initialization instead of panicking the first time we try to allocate a texture cache page.
This should let us fallback to another compositor backend and more easily identify the issue when it happens.
bors-servo pushed a commit that referenced this issue Aug 9, 2017
Fail initialization if the max texture size is insufficient.

This works around #1260 ([driver issues entry](https://github.com/servo/webrender/wiki/Driver-issues#1260---broken-gl-context-reports-max-texture-size-equal-to-zero)) by gracefully failing the initialization instead of panicking the first time we try to allocate a texture cache page.
This should let us fallback to another compositor backend and more easily identify the issue when it happens.
@glennw
Copy link
Member

glennw commented Aug 17, 2017

Fixed by #1563.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants