Closed Bug 1663250 Opened 5 years ago Closed 4 years ago

[Wayland] start failure: `[GFX1-]: Failed to create EGLContext!` on 32 bit llvmpipe

Categories

(Core :: Graphics: WebRender, defect)

Firefox 82
x86
Linux
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox80 --- disabled
firefox81 --- disabled
firefox82 --- disabled
firefox83 --- disabled

People

(Reporter: pmenzel+bugzilla.mozilla.org, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash, nightly-community)

Crash Data

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

On Debian Sid/unstable run enlightenment_start on VT, and then start Firefox 80.0.1 with MOZ_ENABLE_WAYLAND=1 MOZ_WEBRENDER=1 firefox from a terminal.

Actual results:

Firefox crashes with:

[GFX1-]: Failed to create EGLContext!: 0x3009
[GFX1-]: Failed to link shader program: cs_clip_rectangle
error: Too many vertex shader texture samplers

[2020-09-05T10:30:47Z ERROR webrender::device::gl] Failed to link shader program: cs_clip_rectangle
error: Too many vertex shader texture samplers

ExceptionHandler::GenerateDump cloned child 1054
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Exiting due to channel error.

Expected results:

Firefox should start normally.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Summary: enlightenment wayland → Firefox start failure with Enlightenment DE: `[GFX1-]: Failed to create EGLContext!`

Thank you for the report Paul.

Does this only happen with Wayland and/or WebRender enabled? To help us narrow this done further, could you please attach the output from about:support in this bug? This might be a graphics driver issue.

1. Enter about:support into the address bar.
2. Click the Copy text to clipboard button.
3. Paste the clipboard contents into a text editor like Notepad, and save the file.
4. Click the Attach New File button above the description here to upload the file.
Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

(In reply to Miko Mynttinen [:miko] from comment #2)

Thank you for the report Paul.

Thank you for the follow-up.

Does this only happen with Wayland and/or WebRender enabled?

It only happens with WebRender enabled. MOZ_ENABLE_WAYLAND=1 firefox starts, i. e. it does not crash, but it’s not very usable, as there are a lot of artifacts from previous images (scrolling, switching tabs, windows) or the mouse pointer.

To help us narrow this done further, could you please attach the output from about:support in this bug? This might be a graphics driver issue.

1. Enter about:support into the address bar.
2. Click the Copy text to clipboard button.
3. Paste the clipboard contents into a text editor like Notepad, and save the file.
4. Click the Attach New File button above the description here to upload the file.

Done. Please also note the crash stats:

  1. https://crash-stats.mozilla.org/report/index/9b35bd8b-7c0e-4d6d-9294-5a9810200910
  2. https://crash-stats.mozilla.org/report/index/abc4bb17-8ecf-4bb1-887a-dc4ed0200911

Doing this, I saw that on i386, Debian still has Firefox 79.0.

80.0.1-1: amd64 arm64 armhf mips64el s390x
79.0-1: i386 ppc64el

Sorry for missing that.

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

By the way, it’s unrelated to the window manager. It also happens with Weston.

Summary: Firefox start failure with Enlightenment DE: `[GFX1-]: Failed to create EGLContext!` → [Wayland] start failure: `[GFX1-]: Failed to create EGLContext!`
Version: 80 Branch → Firefox 82

Linux i686; rv:79.0
WebGL 1 Driver Version: 3.0 Mesa 20.1.7
WebGL 2 Driver Version: OpenGL ES 3.1 Mesa 20.1.7

So it's EGL (Wayland) with 32 bit llvmpipe: Yours seems to support OGL 3.0/EGL (bug 1474281), which is not enough, so it should fall back to GLES/EGL, which should work as GLES 3.1 is advertised.

Window Protocol: wayland/drm

(Could DMABUF cause problems with llvmpipe?)

Please also attach about:support of Nightly with EGL on Xwayland:
$ MOZ_X11_EGL=1 MOZ_WEBRENDER=1 path/to/firefox

Crash Signature: [@ tgsi_dup_tokens ]
OS: Unspecified → Linux
Hardware: Unspecified → x86
Summary: [Wayland] start failure: `[GFX1-]: Failed to create EGLContext!` → [Wayland] start failure: `[GFX1-]: Failed to create EGLContext!` on 32 bit llvmpipe

Typo: I meant MOZ_X11_EGL=1

Severity: -- → S3

I do not know, what change fixed it, but it works with Nightly 83.0a1 (20200927094310).

I updated to Mesa 20..1.9 and also to the current Nightly, so no idea what changed the behavior. The problem is still there, but a little different, and it does not happen when using Mesa’s radeonsi.

So console message are not shown anymore, and a crash report was uploaded 1.

I just traced similar crash on a system with older radeon card (mesa r600 driver) trying to reproduce bug 1673939 with software renderer to a bug in mesa https://gitlab.freedesktop.org/mesa/mesa/-/issues/3613

If you see that DRAW_USE_LLVM=no is set in the environment, this is the same issue.
It is still to be fixed in mesa-20.2.2 - unexpected environment variable is leaking into userspace causing llvmpipe to crash

src/gallium/drivers/r600/r600_pipe_common.c:       setenv("DRAW_USE_LLVM", "no", 0);

There is a workaround to unset the offending variable before running your test with software renrerer.

Like the following in the terminal window:

unset DRAW_USE_LLVM
run your firefox test

Please give it a go and see if that fixes the issue.

Paul, can you still reproduce this with recent mesa?

Flags: needinfo?(pmenzel+bugzilla.mozilla.org)

Closing because no crashes reported for 12 weeks.

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Flags: needinfo?(pmenzel+bugzilla.mozilla.org)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: