| Summary: | segmentation benchmark in JetStream 2 is not guaranteed to complete | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Seth Brenith <sethbrenith> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Minor | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
In the Microsoft performance lab, we've occasionally observed cases where JetStream 2 didn't complete and was stuck on the "segmentation" benchmark. We've only observed this on 13th gen Intel processors, but it seems to be due to a race condition in the JS code. The console shows two errors: Uncaught TypeError: AsyncTaskWorker._queue.pop(...) in segmentation.js:542, is not a fucntion at segmentation.js:542:49 Uncaught (in promise) Uncaught TypeError: AsyncTaskWorker._queue.pop(...) is not a function in JetStreamDriver.js:208 Here is a snippet of code from near segmentation.js:542: setTimeout(function () { var worker = AsyncTaskWorker._findAvailableWorker(); if (worker) AsyncTaskWorker._queue.pop()(worker); }, 50); This function attempts to find an available worker and set it to work. However, there is no guarantee that AsyncTaskWorker._queue is nonempty, so it is possible that .pop() returns undefined. This unhandled error would be harmless, except that JetStreamDriver.js attached a global exception handler: window.onerror = top.currentReject; The currentReject function rejects the Promise for the current benchmark, which prevents completion.