Open Bug 2086933 Opened 1 month ago Updated 14 hours ago

Clipboard-using editing WPTs interfere with each other when run in parallel on macOS

Categories

(Testing :: web-platform-tests, defect, P5)

defect

Tracking

(Not tracked)

People

(Reporter: intermittent-bug-filer, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure, intermittent-testcase, Whiteboard: [collect_confirm_failure])

Filed by: agoloman [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=603202197&repo=mozilla-central&task=fKWZCE3FQPu5RYQ0fTu7ZQ.0
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/fKWZCE3FQPu5RYQ0fTu7ZQ/runs/0/artifacts/public/logs/live_backing.log


[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - TEST-PASS | /editing/other/exec-command-with-text-editor.tentative.html?type=text | In <input type="text"> in contenteditable, execCommand("paste", false, null), a[]c): execCommand() should return true
[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - TEST-UNEXPECTED-FAIL | /editing/other/exec-command-with-text-editor.tentative.html?type=text | In <input type="text"> in contenteditable, execCommand("paste", false, null), a[]c): <input>.value should be "abc[]c" - assert_equals: expected "abc[]c" but got "aabc[]c"
[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - runTest/<@http://web-platform.test:8000/editing/other/exec-command-with-text-editor.tentative.html?type=text:581:20
[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:2869:25
[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - test@http://web-platform.test:8000/resources/testharness.js:633:30
[task 2026-10-29T04:54:43.861+00:00] 04:54:43     INFO - runTest@http://web-platform.test:8000/editing/other/exec-command-with-text-editor.tentative.html?type=text:575:9
[task 2026-10-29T04:54:43.900+00:00] 04:54:43     INFO - .
[task 2026-10-29T04:54:43.900+00:00] 04:54:43     INFO - {'actions': [{'type': 'none', 'actions': [{'type': 'pause', 'duration': 16}, {'type': 'pause', 'duration': 16}, {'type': 'pause', 'duration': 16}, {'type': 'pause', 'duration': 16}], 'id': '16'}, {'type': 'key', 'actions': [{'type': 'keyDown', 'value': '\ue03d'}, {'type': 'keyDown', 'value': 'c'}, {'type': 'keyUp', 'value': 'c'}, {'type': 'keyUp', 'value': '\ue03d'}], 'id': '17'}]}
[task 2026-10-29T04:54:43.902+00:00] 04:54:43     INFO - .............
[task 2026-10-29T04:54:43.902+00:00] 04:54:43     INFO - TEST-OK | /editing/other/exec-command-with-text-editor.tentative.html?type=text | took 2637ms

Hi, could you please take a look, I couldn't find a regressor, it also fails where it was passing.

Flags: needinfo?(afarre)
Summary: High frequency /editing/other/exec-command-with-text-editor.tentative.html | single tracking bug → High frequency macOS debug /editing/other/exec-command-with-text-editor.tentative.html | single tracking bug
Flags: needinfo?(afarre) → needinfo?(echen)

Looking at the history, it seems that the failures started on October 27.
But I'm not aware of there is any clipboard changes recently.

I triggered a try run with dumping clipboard data from the paste event: https://treeherder.mozilla.org/jobs?repo=try&revision=dcad378c21f4f999fa74efa94cc78ac97fca3bf8.
Lets see if we can get some clue from it.

Flags: needinfo?(echen)

(BTW, I could not reproduce the failure locally, even in test-verify mode)

Ccing spohl, he might know something about because this occurs only on macOS machine in our CI.

I don't think this is a Firefox regression. It looks like clipboard tests now run at the same time in parallel Firefox instances, and macOS has a single clipboard for the whole system.

  1. Since October 27, the macOS debug web-platform-tests-2 chunk runs /clipboard-apis/events, /editing/other and /editing/plaintext-only together with --processes=3 (for example task fKWZCE3FQPu5RYQ0fTu7ZQ, the log in comment 0). In the passing runs of the same chunk on October 26 (tasks W29XqIhoSfqrP_mfe1Ep0Q and T7qpDNiTRrqFE9KeFxzg2A), none of these directories were in it, and this test didn't run there at all. All three runs were on macOS 15.3.
  2. paste.https.html copies "abc" (and "abc\ndef") with a real copy shortcut (utils.sendCopyShortcutKey()), while this test copies "bc" with execCommand("copy"). Each test ends up pasting the other one's text: here we get aabc[]c instead of abc[]c, and in bug 2087178 paste.https.html gets <b>AbB</b> or AbcB instead of <b>AabcB</b>.
  3. The macOS opt failure on autoland (task YQ_GO5NhTMe600E9YsmdWw) shows both at once: that chunk also runs /editing/plaintext-only and /editing/other with --processes=3, and the two tests fail about 0.4 seconds apart (23:03:31.284 and 23:03:31.640). So it isn't limited to debug builds.

This would also explain why it started on all trees at once (including beta, which doesn't have any recent macOS keyboard or clipboard changes), why retriggers fail on revisions that used to pass, and why it doesn't reproduce locally.

I'm moving this to Testing :: web-platform-tests. James, could you take a look? Keeping the directories that use the clipboard in the same group, or running them in a single process, would most likely avoid this. I haven't checked why the chunking changed on October 26 or 27, or why only macOS shows it.

Component: DOM: Editor → web-platform-tests
Flags: needinfo?(james)
Product: Core → Testing
Summary: High frequency macOS debug /editing/other/exec-command-with-text-editor.tentative.html | single tracking bug → Clipboard-using editing WPTs interfere with each other when run in parallel on macOS
Duplicate of this bug: 2087178
See Also: → 2050488

https://github.com/web-platform-tests/wpt/issues/44972 is the upstream issue for this. Apparently we don't really have a solution at the moment; I thought maybe Google would have added one since they run in parallel a lot more than we tend to.

It seems like something that does require a solution that identifies which shared resources a specific test is trying to access, and ensures that those tests are serialized.

Flags: needinfo?(james)
See Also: → 1866605
You need to log in before you can comment on or make changes to this bug.