Closed Bug 1638084 Opened 9 months ago Closed 4 months ago

[Wayland] Crash when using autoscroll: "Compositors might be mixed (5,2)"

Categories

(Core :: Graphics: WebRender, defect, P3)

Desktop
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1661192
Tracking Status
firefox-esr68 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- disabled
firefox79 --- disabled
firefox80 --- disabled

People

(Reporter: jan, Unassigned)

References

(Blocks 2 open bugs, Regression)

Details

(Keywords: crash, nightly-community, regression)

Crash Data

(Jan Andre Ikenmeyer [:darkspirit] from bug 1635186 comment 9)

(Robert Mader [:rmader] from bug 1635186 comment 7)

Can't reproduce here but there are a couple of possible reasons ... lets start with this: could you try if it still happens if you enable widget.wayland_vsync.enabled?

Can you try this with env var $ MOZ_ENABLE_WAYLAND=1 path/to/firefox on Gnome Wayland?

(Vojtěch Sajdl from bug 1635186 comment 11)

Using that option causes Firefox to crash when using autoscroll - is that a known issue? I couldn't find anything much on bugzilla, but I don't exactly know how to search on here properly

[GFX1-]: window is null
[GFX1-]: Failed to create EGLSurface
[GFX1-]: We don't have EGLSurface to draw into. Called too early?
[GFX1-]: Compositors might be mixed (5,2)
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
ExceptionHandler::GenerateDump cloned child 27008
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Exiting due to channel error.

(Martin Stránský [:stransky] from bug 1635186 comment 13)

Can you please try to catch mozilla crash report for it, submit it and paste the crash id here?
Thanks.

(Martin Stránský [:stransky] from bug 1635186 comment 14)

It looks like WebRender compositor crashed and GL compositor is used instead. This may not crash whole browser and it may not produce a mozilla crash dialog. I wonder how to debug this one...

(Jan Andre Ikenmeyer [:darkspirit] from bug 1635186 comment 15)

I could reproduce the autoscroll icon bug with Gnome Wayland on Ubuntu 20.04: The autoscroll icon was always invisible. (It was not invisible on Debian Testing.) At some point, the window flashed once when I activated autoscroll, got the same error log on about:support and saw that Nightly fell back to OpenGL. It didn't create a crash report. So far I could not reproduce it again.

(Vojtěch Sajdl from bug 1635186 comment 16)

(In reply to Martin Stránský [:stransky] from comment #13)

Can you please try to catch mozilla crash report for it, submit it and paste the crash id here?
Thanks.

I already submitted it yesterday when Firefox crashed - this is the id: bp-14dff2d9-db49-45eb-901a-9b8c90200513
Hope it helps.

(Vojtěch Sajdl from bug 1635186 comment 17)

Just FYI when I disabled the previously suggested widget.wayland_vsync.enabled the crash doesn't happen anymore and I get the behavior Jan Andre Ikenmeyer [:darkspirit] mentioned.

(Robert Mader [:rmader] from bug 1635186 comment 18)

Can we open a new issue for that? It's completely unrelated. That being said, the fact that the problem occurs only on Ubuntu so far suggests it might be a Mutter bug and we just need to wait for Ubuntu to ship 3.36.2 :/

This bug is for crash report bp-14dff2d9-db49-45eb-901a-9b8c90200513.

GraphicsCriticalError |[0][GFX1-]: window is null (t=820.347) |[1][GFX1-]: Failed to create EGLSurface (t=820.347) |[2][GFX1-]: We don't have EGLSurface to draw into. Called too early? (t=820.348) |[3][GFX1-]: Compositors might be mixed (5,2) (t=820.373)

Top 10 frames of crashing thread:

0 libEGL_mesa.so.0 libEGL_mesa.so.0@0x1059f 
1 libEGL_mesa.so.0 libEGL_mesa.so.0@0x10d63 
2 libgallium_dri.so radeon_drm_winsys_create 
3 libgallium_dri.so radeon_drm_winsys_create 
4 libgallium_dri.so radeon_drm_winsys_create 
5 libgallium_dri.so radeon_drm_winsys_create 
6 libgallium_dri.so radeon_drm_winsys_create 
7 libgallium_dri.so radeon_drm_winsys_create 
8 libEGL_mesa.so.0 __egl_Main 
9 libEGL_mesa.so.0 __egl_Main 

Crash Signature: [@ libEGL_mesa.so.0@0x1059f ]

Is there a way to help you find the issue that is causing Webrender to crash without the widget.wayland_vsync.enabled? Because Webrender does still crash, but Firefox transitions pretty smoothly to the OpenGL compositor. Or do you think these issues are the same?

I'm running Gnome 3.36.2 so I don't think the (Robert Mader [:rmader] from bug 1635186 comment 18) about waiting for 3.36.2 to ship to Ubuntu applies

Just tried again on nightly and it does indeed crash now, too, with widget.wayland_vsync.enabled and the indicator is either invisible or misplaced. On my main browser, 76 Fedora 32 build, things work just fine. That suggests a regression - you could try mozregression (https://mozilla.github.io/mozregression/documentation/usage.html) to find out if it indeed broke between 76 and nightly and find the change in question. I'm currently too busy to do it myself so that would be very helpful :)

Since bug 1574746 software rendering is thankfully no longer enforced for the autoscroll icon when using WebRender. (I haven't run mozregression yet.)

Flags: needinfo?(jan)

I can run mozregression tommorow (I'm away from my main PC right now) if that helps :)

See Also: → 1640651

(Vojtěch Sajdl from comment #5)

The crashes actually started with this Webrender related change: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=74d50028caec9d5856a173c98a6172700f1ccc29&tochange=6a43f985307516ec1ae2d413a39cd6d813560b8b

I encounter two bugs.

  • A ScrollAnchorContainer assertion, that only crashes with release builds and affects last good and first bad. The autoscroll icon is always invisible for me.
  • The other one is this bug: "Compositors might be mixed" with fallback to OpenGL, which was uncovered by bug 1574746 because it finally allowed the autoscroll icon to use WebRender. It looks like setting widget.wayland_vsync.enabled to true makes this bug more likely to occur.

Gnome Wayland on Ubuntu 20.04

  1. run "first bad": MOZ_ENABLE_WAYLAND=1 mozregression --repo autoland --launch 6a43f985307516ec1ae2d413a39cd6d813560b8b --pref gfx.webrender.all:true general.autoScroll:true widget.wayland_vsync.enabled:true -a https://mozilla.org -a about:support
  2. middle click to activate autoscroll (rendered by WebRender): window flashes
  3. switch to about:support tab, reload it:

    Compositing OpenGL
    (#0) Error window is null
    (#1) Error Failed to create EGLSurface
    (#2) Error We don't have EGLSurface to draw into. Called too early?
    (#3) Error Compositors might be mixed (5,2)

Running mozregression with -B debug:

 0:54.45 INFO: b"\x07[Child 11811, Main Thread] ###!!! ASSERTION: overflow rect must include border rect, and the clamping logic here depends on that: 'overflowRect.Contains(borderRect)', file /builds/worker/checkouts/gecko/layout/generic/ScrollAnchorContainer.cpp, line 164"
 0:56.95 INFO: b'[Parent 11626, Main Thread] WARNING: Getting screen in wayland, primary display will be returned.: file /builds/worker/checkouts/gecko/widget/ScreenManager.cpp, line 116'
 0:57.21 INFO: b'[Parent 11626, Main Thread] WARNING: Failed to create EGLContext with rbab_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 681'
 0:57.21 INFO: b'[Parent 11626, Main Thread] WARNING: Failed to create EGLContext with robustness_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 687'
 0:57.21 INFO: b'Initializing context 0x7fe1ca975350 surface 0x7fe1b690a800 on display 0x7fe1e6cd3800'
 0:57.21 INFO: b'[Parent 11626, Main Thread] WARNING: robust_buffer_access_behavior marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
 0:57.21 INFO: b'[Parent 11626, Main Thread] WARNING: Robustness supported, strategy is not LOSE_CONTEXT_ON_RESET!: file /builds/worker/checkouts/gecko/gfx/gl/GLContext.cpp, line 968'
 0:57.21 INFO: b'[Parent 11626, Main Thread] WARNING: robustness marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
 0:57.21 INFO: b'JavaScript warning: resource://gre/modules/Troubleshoot.jsm, line 626: WebGL context was lost.'
 0:57.22 INFO: b'Destroying context 0x7fe1ca975350 surface 0x7fe1b690a800 on display 0x7fe1e6cd3800'
 0:57.22 INFO: b'[Parent 11626, Main Thread] WARNING: Failed to create EGLContext with rbab_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 681'
 0:57.22 INFO: b'[Parent 11626, Main Thread] WARNING: Failed to create EGLContext with robustness_attribs: file /builds/worker/checkouts/gecko/gfx/gl/GLContextProviderEGL.cpp, line 687'
 0:57.22 INFO: b'Initializing context 0x7fe1ca975430 surface 0x7fe1b690a800 on display 0x7fe1e6cd3800'
 0:57.22 INFO: b'[Parent 11626, Main Thread] WARNING: robust_buffer_access_behavior marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
 0:57.22 INFO: b'[Parent 11626, Main Thread] WARNING: Robustness supported, strategy is not LOSE_CONTEXT_ON_RESET!: file /builds/worker/checkouts/gecko/gfx/gl/GLContext.cpp, line 968'
 0:57.22 INFO: b'[Parent 11626, Main Thread] WARNING: robustness marked as unsupported: file /builds/worker/checkouts/gecko/gfx/gl/GLContextFeatures.cpp, line 623'
 0:57.22 INFO: b'JavaScript warning: resource://gre/modules/Troubleshoot.jsm, line 626: WebGL context was lost.'
 0:57.22 INFO: b'Destroying context 0x7fe1ca975430 surface 0x7fe1b690a800 on display 0x7fe1e6cd3800'
 1:01.04 INFO: b'[Parent 11626, Main Thread] WARNING: Getting screen in wayland, primary display will be returned.: file /builds/worker/checkouts/gecko/widget/ScreenManager.cpp, line 116'
 1:01.15 INFO: b"[Parent 11626, Main Thread] WARNING: Failed to collapse Selection at middle clicked: 'NS_SUCCEEDED(rv)', file /builds/worker/checkouts/gecko/dom/events/EventStateManager.cpp, line 5151"
 1:01.41 INFO: b'[GFX1-]: window is null'
 1:01.42 INFO: b'[GFX1-]: Failed to create EGLSurface'
 1:01.42 INFO: b"[GFX1-]: We don't have EGLSurface to draw into. Called too early?"
 1:01.42 INFO: b'Assertion failure: aLatestFrameId.IsValid(), at /builds/worker/checkouts/gecko/gfx/layers/wr/AsyncImagePipelineManager.cpp:534'
 1:01.42 INFO: b'#01: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x20f791b]'
 1:01.42 INFO: b'#02: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x20f6ec8]'
 1:01.42 INFO: b'[Parent 11626, Compositor] WARNING: Possibly dropping task posted to updater thread: file /builds/worker/checkouts/gecko/gfx/layers/apz/src/APZUpdater.cpp, line 370'
 1:01.42 INFO: b'#03: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x2103fd5]'
 1:01.42 INFO: b'#04: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x167ffb4]'
 1:01.42 INFO: b'#05: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x168053b]'
 1:01.42 INFO: b'#06: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x1680880]'
 1:01.42 INFO: b'#07: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x16812a0]'
 1:01.42 INFO: b'#08: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x167fde7]'
 1:01.42 INFO: b'#09: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x167fd41]'
 1:01.42 INFO: b'#10: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x168b4a6]'
 1:01.42 INFO: b'#11: ???[/tmp/tmpw6c58xu4/firefox/libxul.so +0x1686d2f]'
 1:01.42 INFO: b'#12: ???[/lib/x86_64-linux-gnu/libpthread.so.0 +0x9609]'
 1:01.42 INFO: b'#13: clone[/lib/x86_64-linux-gnu/libc.so.6 +0x122103]'
 1:01.42 INFO: b'#14: ??? (???:???)'
 1:01.42 INFO: b'ExceptionHandler::GenerateDump cloned child ExceptionHandler::WaitForContinueSignal waiting for continue signal...'
 1:01.43 INFO: b'12001'
 1:01.43 INFO: b'ExceptionHandler::SendContinueSignalToChild sent continue signal to child'
 1:01.61 INFO: b'Exiting due to channel error.'
 1:01.61 INFO: b'Exiting due to channel error.'
 1:01.61 INFO: b'Exiting due to channel error.'
 1:01.62 INFO: b'[Socket 11660, Main Thread] WARNING: Shutting down Socket process early due to a crash!: file /builds/worker/checkouts/gecko/netwerk/ipc/SocketProcessChild.cpp, line 129'
 1:01.62 INFO: b'Exiting due to channel error.'

 1:01.67 WARNING: Process exited with code 11

Offtopic: "last good": MOZ_ENABLE_WAYLAND=1 mozregression --repo autoland --launch 74d50028caec9d5856a173c98a6172700f1ccc29 --pref gfx.webrender.all:true general.autoScroll:true widget.wayland_vsync.enabled:true -a https://mozilla.org -a about:support
Maybe this was last good for you, but it still crashes for me when I activate autoscroll (software rendered).
Running mozregression with -B debug, the autoscroll icon is invisible, I see the following assertion many times, but the debug build doesn't crash (it keeps WebRender):

1:10.62 INFO: b"\x07[Child 10508, Main Thread] ###!!! ASSERTION: overflow rect must include border rect, and the clamping logic here depends on that: 'overflowRect.Contains(borderRect)', file /builds/worker/checkouts/gecko/layout/generic/ScrollAnchorContainer.cpp, line 164"

Has Regression Range: --- → yes
Has STR: --- → yes
Component: Widget: Gtk → Graphics: WebRender
Flags: needinfo?(jan) → needinfo?(sotaro.ikeda.g)
Regressed by: 1574746

On Debian Testing I first wasn't able to reproduce this bug 12 days ago.
Since bug 1637948 landed, the autoscroll icon was incorrectly placed and I was finally able to reproduce a crash, so I filed bug 1640651.
However the crashes look like as if they belong to this bug:

(Jan Andre Ikenmeyer [:darkspirit] from bug 1640651 comment #0)

With partial present disabled (0): bp-7a3a328c-515b-4641-9a73-2ded10200525

GraphicsCriticalError |[0][GFX1-]: window is null (t=8.89703) |[1][GFX1-]: Failed to create EGLSurface (t=8.89707) |[2][GFX1-]: We don't have EGLSurface to draw into. Called too early? (t=8.89735) |[3][GFX1-]: We don't have EGLSurface to draw into. Called too early? (t=8.90555) |[4][GFX1-]: Compositors might be mixed (5,2) (t=8.94609)

Offtopic, as it affects "last good" as well: For me, the autoscroll icon is only invisible on Ubuntu 20.04 Wayland, but visible on my Debian Testing Macbook (Gnome Wayland, Plasma Wayland) - as long as I don't run into the crash.

Severity: -- → S3
Priority: -- → P3
See Also: → 1643993
See Also: → 1643645
See Also: → 1645677
Summary: [Wayland] Crash when using autoscroll with widget.wayland_vsync.enabled: "Compositors might be mixed (5,2)" → [Wayland] Crash when using autoscroll: "Compositors might be mixed (5,2)"
Depends on: 1650583

For the record, it happens very often to me (sway, mesa/AMD R9 Fury on ArchLinux). I'm using MOZ_ENABLE_WAYLAND=1 and MOZ_USE_XINPUT2=1. Multiple monitors are present in my sway config, though I mostly use one.

It will sometimes happen when I use autoscroll (with an often mispositioned autoscroll indicator, though that might be a sway bug as it sometimes happens with context menus). At other times, it will happen when I paste something in a textarea with the middle click. I also had crashes when closing TreeTabs tabs using the middle mouse button.

I encounter around 2 crashes per hour (that's up to ~20 crashes a day depending on browser use) and try to submit traces when Firefox prompts me, which it doesn't always do. I will continue doing so.

No longer depends on: 1650583
See Also: → 1661192
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1661192
Flags: needinfo?(sotaro.ikeda.g)
You need to log in before you can comment on or make changes to this bug.