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.
<rdar://problem/115911436>