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

gpu_cache hits debug_assert over mismatched epochs #2667

Closed
Gankra opened this issue Apr 17, 2018 · 4 comments
Closed

gpu_cache hits debug_assert over mismatched epochs #2667

Gankra opened this issue Apr 17, 2018 · 4 comments
Assignees

Comments

@Gankra
Copy link
Contributor

@Gankra Gankra commented Apr 17, 2018

Scrolling around https://gankro.github.io/blah/webtests/text.html in gecko causes this very quickly (may need to shrink window vertically)

It seems to be related to text-shadows, as in release builds they will fail to render when first scrolled onto screen (and this is very visible thanks to APZ).

The assertion is in GpuCache::get_address, but my stack seems to be messed up:

thread 'WRRenderBackend#1' panicked at 'assertion failed: `(left == right)`
  left: `Epoch(11)`,
 right: `Epoch(10)`', gfx/webrender/src/gpu_cache.rs:646:9
stack backtrace:
   0:     0x7f47aa8bdb5b - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::hb18bafd8df1a59a5
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7f47aa8d1a6e - std::sys_common::backtrace::print::he2db06f5f327c580
                               at /checkout/src/libstd/sys_common/backtrace.rs:68
                               at /checkout/src/libstd/sys_common/backtrace.rs:57
   2:     0x7f47aa8ac290 - std::panicking::default_hook::{{closure}}::hef814c3eb720780d
                               at /checkout/src/libstd/panicking.rs:381
   3:     0x7f47aa8abdcc - std::panicking::default_hook::hf0d3601b84335f7c
                               at /checkout/src/libstd/panicking.rs:397
   4:     0x7f47aa8ac79b - std::panicking::rust_panic_with_hook::hf9f34d7f0d667943
                               at /checkout/src/libstd/panicking.rs:577
   5:     0x7f47aa8ac5ee - std::panicking::begin_panic::h215af23ff6354aaf
                               at /checkout/src/libstd/panicking.rs:538
   6:     0x7f47aa8ac55a - std::panicking::begin_panic_fmt::h752224a2c436be23
                               at /checkout/src/libstd/panicking.rs:522
   7:     0x7f47aa788467 - <unknown>
                               at gfx/webrender/src/gpu_cache.rs:0
Redirecting call to abort() to mozalloc_abort

Hit MOZ_CRASH() at /home/alexis/gecko/gecko/memory/mozalloc/mozalloc_abort.cpp:34

Program /home/alexis/gecko/gecko/obj-debug/dist/bin/firefox (pid = 11913) received signal 11.
Stack:
#01: ???[/home/alexis/gecko/gecko/obj-debug/dist/bin/libxul.so +0x88494d4]
#02: ???[/home/alexis/gecko/gecko/obj-debug/dist/bin/libxul.so +0x87d7433]
#03: ???[/lib/x86_64-linux-gnu/libpthread.so.0 +0x11390]
#04: mozalloc_abort(char const*)[/home/alexis/gecko/gecko/obj-debug/dist/bin/firefox +0x2048c]
#05: ???[/home/alexis/gecko/gecko/obj-debug/dist/bin/firefox +0x204b6]
#06: __rust_start_panic[/home/alexis/gecko/gecko/obj-debug/dist/bin/libxul.so +0x91e85f9]

Bugzilled: https://bugzilla.mozilla.org/show_bug.cgi?id=1454538

@glennw
Copy link
Member

@glennw glennw commented Apr 17, 2018

I'll look at this today.

@glennw glennw self-assigned this Apr 17, 2018
@glennw
Copy link
Member

@glennw glennw commented Apr 17, 2018

@kvark is already looking into this :)

@glennw glennw assigned kvark and unassigned glennw Apr 17, 2018
@Gankra
Copy link
Contributor Author

@Gankra Gankra commented Apr 18, 2018

it's possible this was caused by #2588

see https://bugzilla.mozilla.org/show_bug.cgi?id=1454538#c6

@glennw
Copy link
Member

@glennw glennw commented Apr 18, 2018

Yup, that seems quite likely to be the cause of it.

bors-servo added a commit that referenced this issue Apr 18, 2018
GPU cache invalidation fix and extra checks

Fixes #2667

This PR is a bag of small things:
  - 420dd5b adds debug-only checks to make sure all the batches being rendered have been prepared correctly. It didn't fire for my limited testing, but I find it useful anyway for the peace of mind.
  - 78ca661 brings more symmetry to the prepare/add duopoly, checking for the filter to be visible on the other side
  - f280d47 fixes the GPU cache invalidation. If the epoch has already been updated, means the cache entry belongs to a different primitive, and we have no rights to access it.

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

3 participants
You can’t perform that action at this time.