Closed Bug 1751790 Opened 4 years ago Closed 4 years ago

Failing WPT test verify pass (frequent timeouts)

Categories

(Core :: DOM: Streams, defect, P1)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: mgaudet, Assigned: mgaudet)

References

Details

Attachments

(4 files)

Attached file test-verify.log

Running ./mach wpt --headless testing/web-platform/tests/streams/ --verify we fail for having unstable results. (This is after I updated the test expectations to match what DOM streams ought to have).

It appears we've got some tests that are timing out 3/10 times.

Attached is the log.

I'm attempting to get more info now.

A pernosco trace of one of the tests timing out (under rr a 3/10 timeout became 5/10)

Summary: Failing WPT test verify pass → Failing WPT test verify pass (frequent timeouts)

Thanks to a suggestion from Olli, I managed to narrow down to at leastt one source of timeout.

Essentially, if we put

test(() => {

  const sizeFunction = (new ByteLengthQueuingStrategy({ highWaterMark: 5 })).size;

}, 'ByteLengthQueuingStrategy: size behaves as expected with strange arguments');

as the only test in testing/web-platform/tests/streams/queuing-strategies.any.js, and run ./mach wpt --headless testing/web-platform/tests/streams/queuing-strategies.any.js --verify it will fail with a timeout. Weirdly, the largely identically implemented CountQueuingStrategy doesn't share the same problem.

You forgot to trace mByteLengthQueuingStrategySizeFunction in nsIGlobalObject.

Assignee: nobody → mgaudet
Status: NEW → ASSIGNED
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ea481dd8166a Add missing cycle collection for ByteLengthQueuingStrategy size function r=saschanaz

The landed path is necessary, but not sufficient to get us to a clean --verify run. I'm still seeing timeouts. Setting leave-open.

Keywords: leave-open

Kagami points out this reduced version of idlharness.any fails when run in worker context. Same issue as before, 3/7 timeouts.

// META: global=window,worker
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long

idl_test(
  ['streams'],
  ['dom'], // for AbortSignal
  async idl_array => {
    idl_array.add_objects({
      ByteLengthQueuingStrategy: ["new ByteLengthQueuingStrategy({ highWaterMark: 5 })"],
    });
  }
);
Attached file testcase.zip

I'm not sure why, but somehow importScripts and ByteLengthQueuingStrategy hate each other.

Unlink support also needs to be added: https://hg.mozilla.org/integration/autoland/file/ea481dd8166a2d70e8a0fcd40a3ff308b0341243/dom/base/nsIGlobalObject.cpp#l138. But if this also affects CountQueueingStrategy then I am not sure what is going wrong. Maybe there is some other place we don't traverse/unlink properly? Or the worker code doesn't call it?

When I run the test from comment 8 I just get crashes with MOZ_CRASH(Found dangling CheckedUnsafePtr). This seems to have been introduced yesterday by bug 1744025.

Let's track it in bug 1752075, as it seems to have different cause (and the error is different anyway).

No longer depends on: 1744025
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f39627f71c47 Add missing unlinking for ByteLengthQueuingStrategy size function r=saschanaz

Ok, I don't think we'll be landing other patches under this bug,so resolving as fixed

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: