Open Bug 1857075 Opened 1 year ago Updated 11 months ago

Perma widget/tests/test_clipboard.html on new Ubuntu 22.04 Wayland pool

Categories

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

defect

Tracking

()

People

(Reporter: ahal, Unassigned)

References

(Blocks 3 open bugs, )

Details

This is happening on a new Ubuntu 22.04 Wayland enabled pool we're in the process of standing up.

Example failure log:
https://treeherder.mozilla.org/logviewer?job_id=431033471&repo=try&lineNumber=19297

There are two tests failing here:

  1. widget/tests/test_clipboard.html
[task 2023-10-02T17:24:00.438Z] 17:24:00     INFO - TEST-PASS | widget/tests/test_clipboard.html | Test getData for clipboard type 1 
[task 2023-10-02T17:24:00.439Z] 17:24:00     INFO - add_task | Leaving test_clipboard_apis
[task 2023-10-02T17:24:00.439Z] 17:24:00     INFO - add_task | Entering test_clipboard_set_empty_string
[task 2023-10-02T17:24:00.458Z] 17:24:00     INFO - Test setting empty string to type 1
[task 2023-10-02T17:24:00.459Z] 17:24:00     INFO - Buffered messages finished
[task 2023-10-02T17:24:00.460Z] 17:24:00     INFO - TEST-UNEXPECTED-FAIL | widget/tests/test_clipboard.html | Should get null data on clipboard type 1 - got "random number: 0.5657026208223416", expected null
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:509:14
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     test_clipboard_set_empty_string@widget/tests/file_test_clipboard.js:105:9
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     add_task/nextTick/<@SimpleTest/SimpleTest.js:2189:34
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     async*nextTick@SimpleTest/SimpleTest.js:2233:11
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:922:41
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     add_task@SimpleTest/SimpleTest.js:2137:17
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     add_setup@SimpleTest/SimpleTest.js:2253:10
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO -     @widget/tests/file_test_clipboard.js:35:10
[task 2023-10-02T17:24:00.463Z] 17:24:00     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO - TEST-UNEXPECTED-FAIL | widget/tests/test_clipboard.html | Should not have text/plain flavor on clipboard 1 
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     SimpleTest.ok@SimpleTest/SimpleTest.js:426:16
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     test_clipboard_set_empty_string@widget/tests/file_test_clipboard.js:110:9
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     add_task/nextTick/<@SimpleTest/SimpleTest.js:2189:34
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     async*nextTick@SimpleTest/SimpleTest.js:2233:11
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:922:41
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     add_task@SimpleTest/SimpleTest.js:2137:17
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     add_setup@SimpleTest/SimpleTest.js:2253:10
[task 2023-10-02T17:24:00.474Z] 17:24:00     INFO -     @widget/tests/file_test_clipboard.js:35:10
  1. widget/tests/test_textScaleFactor_system_font.html
[task 2023-10-02T17:24:03.802Z] 17:24:03     INFO - TEST-START | widget/tests/test_textScaleFactor_system_font.html
[task 2023-10-02T17:24:04.727Z] 17:24:04     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-10-02T17:24:04.727Z] 17:24:04     INFO - Buffered messages logged at 17:24:03
[task 2023-10-02T17:24:04.727Z] 17:24:04     INFO - add_task | Entering 
[task 2023-10-02T17:24:04.729Z] 17:24:04     INFO - Buffered messages logged at 17:24:04
[task 2023-10-02T17:24:04.731Z] 17:24:04     INFO - TEST-PASS | widget/tests/test_textScaleFactor_system_font.html | size of menu font - got 6.11111, expected 6.1111 +/- 0.000021854996681213382 
[task 2023-10-02T17:24:04.732Z] 17:24:04     INFO - Buffered messages finished
[task 2023-10-02T17:24:04.734Z] 17:24:04     INFO - TEST-UNEXPECTED-FAIL | widget/tests/test_textScaleFactor_system_font.html | width of menu font <p> in px - got 39.100006103515625, expected 38.991668701171875 +/- 0.0000152587890625 
[task 2023-10-02T17:24:04.735Z] 17:24:04     INFO -     SimpleTest.ok@SimpleTest/SimpleTest.js:426:16
[task 2023-10-02T17:24:04.735Z] 17:24:04     INFO -     fuzzyCompareLength@widget/tests/test_textScaleFactor_system_font.html:54:11
[task 2023-10-02T17:24:04.735Z] 17:24:04     INFO -     @widget/tests/test_textScaleFactor_system_font.html:118:23
[task 2023-10-02T17:24:04.736Z] 17:24:04     INFO -     async*add_task/nextTick/<@SimpleTest/SimpleTest.js:2189:34
[task 2023-10-02T17:24:04.737Z] 17:24:04     INFO -     nextTick@SimpleTest/SimpleTest.js:2233:11
[task 2023-10-02T17:24:04.737Z] 17:24:04     INFO -     setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:922:41
[task 2023-10-02T17:24:04.737Z] 17:24:04     INFO -     add_task@SimpleTest/SimpleTest.js:2137:17
[task 2023-10-02T17:24:04.738Z] 17:24:04     INFO -     @widget/tests/test_textScaleFactor_system_font.html:58:9

It's unclear whether these are a result of Wayland, upgrading to Ubuntu 22.04 or hardware characteristics of the new workers. The tests will be skipped on this new platform.

The severity field is not set for this bug.
:spohl, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(spohl.mozilla.bugs)
Component: Widget → Widget: Gtk
Flags: needinfo?(spohl.mozilla.bugs)

This seems to be relevant:

[task 2023-10-02T17:24:00.383Z] 17:24:00 INFO - GECKO(30425) | (firefox-nightly:30425): Gdk-WARNING **: 17:24:00.378: ../../../../../gdk/wayland/gdkselection-wayland.c:280: error reading selection buffer: Operation was cancelled

but I'm unable to reproduce locally on Wayland/Fedora 38.

widget/tests/test_textScaleFactor_system_font.html test fails on both Wayland and XWayland (X11 emulation). So it doesn't look Wayland related.

Ahh, managed to reproduce widget/tests/test_clipboard.html failure locally. It can be reproduced after some attempts.

There's relevant part of Wayland/clipboard log here. Looks like something sets clipboard data after deletion:

 0:05.23 INFO add_task | Entering test_clipboard_set_empty_string
 0:05.23 INFO Test setting empty string to type 1
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard EmptyClipboard: clipboard=1
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsClipboard::EmptyNativeClipboardData (clipboard)
 0:05.26 GECKO(273509) [3544747.177]  -> wl_data_device@24.set_selection(nil, 24609)
 0:05.26 GECKO(273509) [3544747.182]  -> wl_data_source@69.destroy()
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard clipboard_clear_cb() callback
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsClipboard::SelectionClearEvent (clipboard)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContext::ClearCachedTargetsClipboard()
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContext::ClearCachedTargetsClipboard()
 0:05.26 GECKO(273509) [3544747.341] wl_display@1.delete_id(69)
 0:05.26 GECKO(273509) [3544747.352] wl_data_device@24.selection(nil)
 0:05.26 GECKO(273509) [3544747.360]  -> wl_data_offer@4278190083.destroy()

--> here

 0:05.26 GECKO(273509) [3544747.373] wl_data_device@24.data_offer(new id wl_data_offer@4278190081)
 0:05.26 GECKO(273509) [3544747.379] wl_data_offer@4278190081.offer("text/plain;charset=utf-8")
 0:05.26 GECKO(273509) [3544747.384] wl_data_device@24.selection(wl_data_offer@4278190081)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard clipboard_owner_change_cb() callback
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsClipboard::OwnerChangedEvent (clipboard)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContext::ClearCachedTargetsClipboard()
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard GetData: clipboard=1
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsClipboard::GetNativeClipboardData (clipboard)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard   Flavors which can be imported:
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard     text/plain
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard     Getting text text/plain MIME clipboard data
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContextWayland::GetClipboardText(), clipboard Selection
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContextWayland::WaitForClipboardData, MIME (null)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard   getting TEXT
 0:05.26 GECKO(273509) [3544747.499]  -> wl_data_offer@4278190081.accept(24609, "text/plain;charset=utf-8")
 0:05.26 GECKO(273509) [3544747.521]  -> wl_data_offer@4278190081.receive("text/plain;charset=utf-8", fd 127)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard doing iteration 1 msec 0 ...
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard clipboard_owner_change_cb() callback
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsClipboard::OwnerChangedEvent (clipboard)
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard nsRetrievalContext::ClearCachedTargetsClipboard()
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard doing iteration 2 msec 0 ...
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard doing iteration 3 msec 0 ...
 0:05.26 GECKO(273509) [Parent 273509: Main Thread]: D/WidgetClipboard doing iteration 4 msec 10 ...

Looks like https://gitlab.gnome.org/GNOME/mutter/-/issues/1241

Mutter fails to clear clipboard and cache the data.
We may implement clipboard clear by setting empty data (and perhaps also return empty string instead of nullptr).

Flags: needinfo?(stransky)
Flags: needinfo?(stransky)
Summary: Perma widget/tests/mochitest.inifailures on new Ubuntu 22.04 Wayland pool → Perma widget/tests/test_clipboard.html on new Ubuntu 22.04 Wayland pool
You need to log in before you can comment on or make changes to this bug.