Closed Bug 1721563 Opened 3 years ago Closed 3 years ago

[Wayland] Pasting from external application freezes browser

Categories

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

Firefox 92
defect

Tracking

()

VERIFIED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox90 --- unaffected
firefox91 --- unaffected
firefox92 --- verified

People

(Reporter: ke5trel, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

STR:

  1. Start with MOZ_ENABLE_WAYLAND=1 on Ubuntu 21.04.
  2. Copy plain text from gedit and paste into location bar.

Browser window becomes unresponsive and main process consumes 100% of a CPU core.

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=da1412413022e9f41073122b340e6f8d79091bb9&tochange=35d406f57982d5cf0a8d3f73421903d99c49ca8b

Regressed by Bug 1717476.

Confirmed regression on Arch Gnome/Wayland too.

Interesting, will look at it.

Assignee: nobody → stransky
Priority: -- → P1
Attached file Backtrace

I was going to file this... This is the stack trace on the main thread fwiw.

FYI: This also appears to happen on KDE/KWin 5.22.3 on openSUSE Tumbleweed, so it's not specific to GNOME.

Yes, from some reason the reading from fd is blocked. Interesting is that when switched to Async mode the read works. Also it's blocked for chrome process only, content works ok.

We're reading clipboard data from fd in non-blocking mode and repeat when data ate not ready.

Modify reading from fd to make sure we don't wait endlessly:

  • sleep 20 ms after unsuccessful before next attempt
  • limit maximal reading time to 0.5 sec
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/ef1b2cfdf17b [Wayland] Flush wl_display connection before reading clipboard data, r=emilio
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/2c6a58288b99 [Wayland] Limit time of reading clipboard data, r=emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Reproduced the issue on Firefox 92.0a1 (2021-07-21) under Ubuntu 20.04 Wayland by following the STR from Comment 0.

The issue is no longer reproducible on Firefox 92.0 on the same system.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: