Closed Bug 1821256 Opened 2 years ago Closed 1 year ago

[Wayland] Firefox freezes after a tool-tip is displayed and the date picker is opened

Categories

(Core :: Widget: Gtk, defect, P3)

Desktop
Linux
defect

Tracking

()

VERIFIED FIXED
113 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox110 --- wontfix
firefox111 --- wontfix
firefox112 --- wontfix
firefox113 --- verified

People

(Reporter: atrif, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Attached image wayland_deadlock.gif β€”

Found in

  • 112.0a1 (2023-03-08)

Affected versions

  • 112.0a1 (2023–03-08)
  • 111.0 - Wayland On
  • 110.0.1 - Wayand On

Tested platforms

  • Affected platforms: Ubuntu 22.04.1 Wayland, Ubuntu 20.04 Wayland
  • Unaffected platforms: Ubuntu 22 X11, Windows 10x64, macOS 12

Steps to reproduce

  1. Open Firefox and load https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date.
  2. Scroll down to Value and hover over the calendar icon until the Value sample tooltip is displayed.
  3. Click multiple times on the calendar icon.
  4. Open a new tab.

Expected result

  • The tab is opened.

Actual result

  • Firefox freezes.

Regression range

Additional notes

  • Attached a screen recording.
  • The issue does not reproduce if Ubuntu is started in X11.
  • On Firefox 111 and 110.0.1 Wayland must be enabled from the terminal on a Wayland session, to reproduce the issue. On Nightly it’s enabled by default.
  • Profiller link: https://share.firefox.dev/3yrRK2C

:stransky, since you are the author of the regressor, bug 1645677, could you take a look?

For more information, please visit auto_nag documentation.

Flags: needinfo?(stransky)

Yes, I do see that too. Looks like we pause UI refresh driver with calendar popup.

Priority: -- → P3

We're hitting this, not pausing the refresh driver.

So I took a look and the transactions for the popup never finish. That is because when we hide it, in this case the popup still has a pending transaction (because the tooltip was behind the date picker) but we never cleared because this code never ran.

Martin, wdyt about always calling ClearRenderingQueue()? I don't think we otherwise have the guarantee of all transactions finishing.

There's also the question about whether we should block the refresh driver for popup transactions, but...

Set release status flags based on info from the regressing bug 1645677

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

So I took a look and the transactions for the popup never finish. That is because when we hide it, in this case the popup still has a pending transaction (because the tooltip was behind the date picker) but we never cleared because this code never ran.

Martin, wdyt about always calling ClearRenderingQueue()? I don't think we otherwise have the guarantee of all transactions finishing.

There's also the question about whether we should block the refresh driver for popup transactions, but...

ClearRenderingQueue() is a workaround which may or may not help. The rendering queue is small (2 transactions AFAIK) and it can be easily jammed again after ClearRenderingQueue() call as the popup may be still painted to by SW/WR although it's closed (and that causes the pending transactions and queue block).
The problem is that one queue is shared by more windows (popup/tooltips/main window) and any paint to closed popup can cause the chrome queue jam.

Would be better to find out how to disable / remove refresh driver for popup before is hidden. I must admin I failed here and haven't found reliable solution yet. One solution may be to create PressShell for every UI popup (as refresh driver is tied to PressShell of a window).

Flags: needinfo?(stransky)
Flags: needinfo?(stransky)

Seems like something like this should do?

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Based on patch by Emilio Cobos Álvarez (D172786)

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/67a0b67ad8bb
[Linux] Don't throttle webrender transactions on unmapped windows r=emilio
Assignee: emilio → stransky

Backed out for causing mochitest-plain failures on test_group_keyboard.html.

[task 2023-03-29T17:43:44.859Z] 17:43:44     INFO - TEST-PASS | gfx/layers/apz/test/mochitest/test_group_keyboard.html | Starting subtest helper_bug1695598.html 
[task 2023-03-29T17:43:44.860Z] 17:43:44     INFO - Buffered messages finished
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO - TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_keyboard.html | helper_bug1695598.html | missed event firing 60 times 
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     SimpleTest.ok@SimpleTest/SimpleTest.js:421:16
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     runSubtestsSeriallyInFreshWindows/</advanceSubtestExecution/spawnTest/w.ok@gfx/layers/apz/test/mochitest/apz_test_utils.js:500:32
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:69:11
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.870Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.871Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.871Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.871Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.871Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.871Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.872Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.872Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.872Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.873Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.873Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.874Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.874Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.875Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.876Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.876Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.876Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.877Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.877Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.878Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.878Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.878Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.878Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.879Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.879Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.881Z] 17:43:44     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-03-29T17:43:44.890Z] 17:43:44     INFO - TEST-UNEXPECTED-FAIL | gfx/layers/apz/test/mochitest/test_group_keyboard.html | helper_bug1695598.html | missed scroll update 60 times 
[task 2023-03-29T17:43:44.890Z] 17:43:44     INFO -     SimpleTest.ok@SimpleTest/SimpleTest.js:421:16
[task 2023-03-29T17:43:44.890Z] 17:43:44     INFO -     runSubtestsSeriallyInFreshWindows/</advanceSubtestExecution/spawnTest/w.ok@gfx/layers/apz/test/mochitest/apz_test_utils.js:500:32
[task 2023-03-29T17:43:44.890Z] 17:43:44     INFO -     sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:70:11
[task 2023-03-29T17:43:44.890Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.891Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.891Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.891Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.891Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.892Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.893Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.893Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.893Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.893Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.893Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.894Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.894Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.894Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.894Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.895Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.895Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.896Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.897Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.897Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.897Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.898Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.898Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.899Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.899Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.899Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.900Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.900Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.901Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.901Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.902Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.902Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.902Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.903Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.903Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.904Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.904Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.905Z] 17:43:44     INFO -     async*sendScrollEvent@gfx/layers/apz/test/mochitest/helper_bug1695598.html:39:19
[task 2023-03-29T17:43:44.905Z] 17:43:44     INFO -     FrameRequestCallback*sendScrollEvent/<@gfx/layers/apz/test/mochitest/helper_bug1695598.html:60:18
[task 2023-03-29T17:43:44.905Z] 17:43:44     INFO - must wait for focus
[task 2023-03-29T17:43:44.905Z] 17:43:44     INFO - TEST-PASS | gfx/layers/apz/test/mochitest/test_group_keyboard.html | Starting subtest helper_scroll_snap_on_page_down_scroll.html 
Flags: needinfo?(stransky)

Tested on my Ubuntu 18.04 VM system and I can't reproduce...I wonder what can be different here.

Updated, thanks.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/0846d258566e
[Linux] Don't throttle webrender transactions on unmapped windows r=emilio

Backed out for causing mochitest failures in test_group_keyboard.html

Flags: needinfo?(stransky)

Updated, Thanks.

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/01c39c2b09d2
[Linux] Don't throttle webrender transactions on unmapped windows r=emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

The patch landed in nightly and beta is affected.
:stransky, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox112 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(stransky)
Flags: needinfo?(stransky)

Verified fixed with Firefox 113.0a1 (2023-04-07) on Ubuntu 20.04 and Ubuntu 22.04 Wayland. Firefox no longer freezes after following steps from comment 0.

Status: RESOLVED → VERIFIED
Attachment #9323464 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: