Closed Bug 1601082 Opened 8 months ago Closed 8 months ago

Crash on some window focus changes under Wayland

Categories

(Firefox :: Untriaged, defect, P3)

71 Branch
x86_64
Linux
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: pts+bmo, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

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.

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

Crash Signature: libc-2.30.so@0x3c625 | libc-2.30.so@0x7f355 | libcairo.so.2.11600.0@0xe806c
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

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

(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.

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.

Blocks: wayland

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

Crash Signature: libc-2.30.so@0x3c625 | libc-2.30.so@0x7f355 | libcairo.so.2.11600.0@0xe806c → [@ libc-2.30.so@0x3c625 | libc-2.30.so@0x7f355 | libcairo.so.2.11600.0@0xe806c]
Keywords: crash
Regressed by: 1592350

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.

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

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

Summary: Crash when changing window focus after opening a link from another application → Crash on some window focus changes under Wayland

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).

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

Flags: needinfo?(pts+bmo)
Priority: -- → P3
Attached file 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
Flags: needinfo?(pts+bmo) → needinfo?(stransky)

Can you attach your about:config please? Thanks.

Flags: needinfo?(stransky) → needinfo?(pts+bmo)

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

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.

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.

Flags: needinfo?(pts+bmo)

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

Duplicate of this bug: 1598995

Closing as WONTFIX as it's 71 only.

Status: UNCONFIRMED → RESOLVED
Closed: 8 months ago
Resolution: --- → WONTFIX
Duplicate of this bug: 1604817
Duplicate of this bug: 1606618
You need to log in before you can comment on or make changes to this bug.