firefox www.google.com crashes when a firefox instance is already running and MOZ_ENABLE_WAYLAND is set to 1

Bug #1855997 reported by Marius Gedminas
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Won't Fix
Medium
firefox (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Steps to reproduce:

- make sure Firefox is not running
- export MOZ_ENABLE_WAYLAND=1
- firefox

then in a new terminal

- export MOZ_ENABLE_WAYLAND=1
- firefox www.google.com

Expectation:

- a new tab opens in the Firefox window, loading google

Actual result:

- firefox crashes

This is a recent regression: it used to work fine in 70.0.1+build1-0ubuntu0.19.10.1, broke when I upgraded to 71.0+build5-0ubuntu0.19.10.1.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: firefox 71.0+build5-0ubuntu0.19.10.1
ProcVersionSignature: Ubuntu 5.3.0-24.26-generic 5.3.10
Uname: Linux 5.3.0-24-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
BuildID: 20191205203726
CurrentDesktop: ubuntu:GNOME
Date: Wed Dec 11 09:26:41 2019
DefaultProfileExtensions: extensions.sqlite corrupt or missing
DefaultProfileIncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite)
DefaultProfileLocales: extensions.sqlite corrupt or missing
DefaultProfilePrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:722
DefaultProfileThemes: extensions.sqlite corrupt or missing
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-06-12 (181 days ago)
InstallationMedia: Ubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
Profiles:
 Profile1 (Default) - LastVersion=None/None (Out of date)
 Profile0 - LastVersion=71.0/20191205203726 (In use)
SourcePackage: firefox
UpgradeStatus: Upgraded to eoan on 2019-10-18 (53 days ago)

Revision history for this message
In , Bjonnh-ff (bjonnh-ff) wrote :

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

Steps to reproduce:

- Open firefox (empty or used profile, no difference)
- Open an URL from xdg or from a terminal (firefox-developer-edition https://www.mozilla.org)

Actual results:

Firefox Crashes and ask to restart. If I run firefox in a terminal I see:
(firefoxdeveloperedition:496386): Gdk-WARNING **: 21:58:25.007: (../gtk/gdk/wayland/gdkwindow-wayland.c:810):buffer_release_callback: runtime check failed: (impl->staging_cairo_surface != cairo_surface)
firefox: cairo-surface.c:930: cairo_surface_reference: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)' failed.
ExceptionHandler::GenerateDump cloned child 496921
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.

Expected results:

Firefox should open a new tab

Revision history for this message
In , Bjonnh-ff (bjonnh-ff) wrote :

I tried with setting GDK_BACKEND=x11. As long as GDK_BACKEND is set for the new firefox call, when adding a new tab in a terminal it works.

If I set GDK_BACKEND only for the initial firefox call, the subsequent calls in another terminal with GDK_BACKEND unset do not open a new tab, and after a few seconds a window saying that firefox is not responding appears.

I will make firefox run in X11 mode for now. But I would be happy run any experiment that could help solve that issue.

Revision history for this message
In , Release-mgmt-account-bot (release-mgmt-account-bot) wrote :

[Bugbug](https://github.com/mozilla/bugbug/) thinks this bug should belong to this component, but please revert this change in case of error.

Revision history for this message
In , Stransky (stransky) wrote :

Which desktop do you run? And do you see it also with nightly and release?
Thanks.

Revision history for this message
In , Bjonnh-ff (bjonnh-ff) wrote :

I do not see it with release.
Desktop is gnome-shell.

Revision history for this message
In , Bjonnh-ff (bjonnh-ff) wrote :

Doesn't happen with 20191128-firefox-72.0a1 . So I guess it has been fixed and will make its way in the DE?

Revision history for this message
In , François Glais (franglais125) wrote :

Isn't it expected to have some issues when meddling with GDK_BACKEND?

Wouldn't the use of MOZ_ENABLE_WAYLAND=1 solve the issue? Or Firefox really tries to support both approaches?

Revision history for this message
In , Bjonnh-ff (bjonnh-ff) wrote :

I only used GDK_BACKEND to revert to x11 (and then solving the issue). GDK_BACKEND was unset in the issue reported.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

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

Steps to reproduce:

1. Open Firefox and make sure it's the default browser.
2. Open another application that can open links in the default browser. Use that application to open a new tab.
3. Change which window has focus.

Actual results:

Changing which window has focus causes Firefox to crash. (Sometimes the act of opening the link causes the change of focus so the crash happens as part of step 2, but the first several times I tried, I read the whole article and it only crashed when I switched away.)

Expected results:

It shouldn't crash. You should be able to change which window has focus normally.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

I submitted this in crashreporter a few times, e.g.:
5007f351-8b66-43b8-94c1-61bf60191203
36c530fc-462c-45dd-abbc-ce08d0191203
66d7e78e-d1d4-42b7-81f3-3f1d30191203

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

Okay, I've finally narrowed it down. This only happens when `MOZ_USE_XINPUT2=1` is set in the environment.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

(In reply to Peter Simonyi from comment #2)
> Okay, I've finally narrowed it down. This only happens when `MOZ_USE_XINPUT2=1` is set in the environment.

Hm, I thought that was true, but it's happening again without it set.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

Okay, the trigger seems to be just using Wayland. Tested with a fresh installation and fresh profile in a fresh user account, the only change being setting `MOZ_ENABLE_WAYLAND=1`.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :
Revision history for this message
In , madperson (madperson) wrote :

based on the regression range, i'll assume it got introduced by bug 1592350.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

That seems like the most likely one, but only when it was uplifted. I tried mozilla-inbound build built on 2019-11-05 11:37:23.610000, revision 4d585c7e (first build with bug 1592350 fixed) and it does not crash.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

This also seems to crash when using the switch-to-tab function of the location bar.

Revision history for this message
In , Maxime de Roucy (mderoucy) wrote :

I can confirm this bug.

Archlinux (uptodate)
Mozilla Firefox 71.0

Same result with `MOZ_ENABLE_WAYLAND=1` or `GDK_BACKEND=wayland`.

```
max@mde-oxalide % MOZ_ENABLE_WAYLAND=1 firefox
(firefox:2094): Gdk-WARNING **: 22:52:46.806: (../gtk/gdk/wayland/gdkwindow-wayland.c:810):buffer_release_callback: runtime check failed: (impl->staging_cairo_surface != cairo_surface)
firefox: cairo-surface.c:930: cairo_surface_reference: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)' failed.
ExceptionHandler::GenerateDump cloned child 2328
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
ExceptionHandler::WaitForContinueSignal waiting for continue signal...
Exiting due to channel error.
Exiting due to channel error.
Exiting due to channel error.
Failed to open curl lib from binary, use libcurl.so instead
```
the line Gdk-WARNING / crash appear when I run
```
xdg-open 'https://bugzilla.mozilla.org/show_bug.cgi?id=1598995'
```
Same result if I run `MOZ_ENABLE_WAYLAND=1 firefox 'https://bugzilla.mozilla.org/show_bug.cgi?id=1598995'`.

If I run `firefox 'https://bugzilla.mozilla.org/show_bug.cgi?id=1598995'` without env, it open a window saying:
```
Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system.
```

Revision history for this message
In , Spastorino (spastorino) wrote :

If I click `What's New` on the Firefox About dialog it happens the same thing. I guess it's the same issue. Also using `MOZ_ENABLE_WAYLAND=1`

Revision history for this message
In , Farid (7dare) wrote :

I can confirm I am also affected using Wayland, under sway.

The bug disappears either by downgrading to 70.0.1 or by disabling the MOZ_ENABLE_WAYLAND environment variable (and thus using XWayland).

Revision history for this message
In , Stransky (stransky) wrote :

I'm unable to reproduce in Fedora 31 / Gnome / Firefox 71 from Mozilla. Do you see that under Gnome or is that Sway only?
Also can you please try to get full backtrace, how-to for Fedora is here [1].
The crash stat at mozilla are missing signatures from system libraries.

[1] https://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products#Application_crash

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

Created attachment 9114802
crash_bt

I am using Fedora 31 / Gnome 3 / Firefox 71 from Mozilla. (I do *not* see the bug in the Fedora package `firefox-71.0-8.npgo.fc31.x86_64` though.)

I've attached the backtrace (though it's a little incomplete because the Firefox from Mozilla doesn't come with debuginfo). For this one, I triggered the crash by clicking the "What's new" link in the About window, since that's an easy case to set up. Additionally, here's a bit of the console output that didn't end up in the log file:

```
(firefox:62794): Gdk-WARNING **: 07:54:45.019: (gdkwindow-wayland.c:810):buffer_release_callback: runtime check failed: (impl->staging_cairo_surface != cairo_surface)
firefox: cairo-surface.c:930: cairo_surface_reference: Assertion `CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&surface->ref_count)' failed.

Thread 1 "firefox-bin" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 return ret;
```

And I did try the DumpJSStack part of those instructions but unsurprisingly didn't get any results:

```
(gdb) print DumpJSStack()
'DumpJSStack' has unknown return type; cast the call to its declared return type
(gdb) print (void)(DumpJSStack())
there is no JSContext on the stack!
[Thread 0x7fffe02e3700 (LWP 62803) exited]
$1 = void
```

Revision history for this message
In , Stransky (stransky) wrote :

Can you attach your about:config please? Thanks.

Revision history for this message
In , Stransky (stransky) wrote :

Great, I can reproduce it with Firefox 71 from mozilla but it works with Firefox 72 beta and Nightly and also Firefox from Fedora.

Revision history for this message
In , Spastorino (spastorino) wrote :

I reproduce the error using Archlinux Firefox 71.0-1, clicking `What's New` from Firefox About dialog is the way I found that makes the error more consistently show up. From time to time it also crashes clicking on links from Gnome notifications but that does not happens in the 100% of the cases. I've mentioned this earlier but I'm also using `MOZ_ENABLE_WAYLAND=1`.

Revision history for this message
In , Pts+bmo (pts+bmo) wrote :

I used a fresh profile, so about:config is all defaults. Yes, the crash is only in 71 — Nightly and Beta72 are unaffected. So I guess if there's no 71 point release then no work is needed; this will fix itself for release users in January.

Revision history for this message
Marius Gedminas (mgedmin) wrote :
Revision history for this message
Marius Gedminas (mgedmin) wrote :

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1598995

(same steps to reproduce, and I see the same "runtime check failed: (impl->staging_cairo_surface != cairo_surface)" errors in my journal that correspond to Firefox crashes)

Revision history for this message
In , Marius Gedminas (mgedmin) wrote :

I've started seeing this on Ubuntu with Firefox 71: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1855997. Firefox 70 did not suffer from this crash. I've stopped using MOZ_ENABLE_WAYLAND=1 as a workaround.

Revision history for this message
In , Stransky (stransky) wrote :

(In reply to Marius Gedminas from comment #9)
> I've started seeing this on Ubuntu with Firefox 71: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1855997. Firefox 70 did not suffer from this crash. I've stopped using MOZ_ENABLE_WAYLAND=1 as a workaround.

Mariu, can you check if that works for you in Beta or Nightly?
Thanks.

Revision history for this message
In , Marius Gedminas (mgedmin) wrote :

I cannot reproduce this in Beta (firefox-72.0b4.tar.bz2).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Changed in firefox (Ubuntu):
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
In , Stransky (stransky) wrote :

*** Bug 1603977 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Krs-random (krs-random) wrote :

Can confirm, arch - wayland - firefox 71 - MOZ_ENABLE_WAYLAND=1

Revision history for this message
In , Stransky (stransky) wrote :

*** This bug has been marked as a duplicate of bug 1601082 ***

Revision history for this message
In , Stransky (stransky) wrote :

*** Bug 1598995 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Stransky (stransky) wrote :

Closing as WONTFIX as it's 71 only.

Changed in firefox:
importance: Unknown → Medium
status: Unknown → Invalid
Revision history for this message
In , Stransky (stransky) wrote :

*** Bug 1604817 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Stransky (stransky) wrote :

*** Bug 1606618 has been marked as a duplicate of this bug. ***

Revision history for this message
Olivier Tilloy (osomon) wrote :

According to the upstream bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1601082), this was affecting firefox 71 only. Marking fixed accordingly.

Changed in firefox:
importance: Medium → Unknown
status: Invalid → Unknown
Changed in firefox (Ubuntu):
status: Triaged → Fix Released
Changed in firefox:
importance: Unknown → Medium
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.