[Webkit-unassigned] [Bug 227540] [MacOS wk1] crypto/workers/subtle/hrsa-postMessage-worker.html is a flaky failure

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 2 12:46:12 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227540

--- Comment #6 from Chris Dumez <cdumez at apple.com> ---
This is not an issue with the test but rather is really bug in Crypto key deserialization:

38  0x16325d3ad WebCore::ScriptExecutionContext::Task::performTask(WebCore::ScriptExecutionContext&)
39  0x165a32f5d WebCore::WorkerRunLoop::Task::performTask(WebCore::WorkerOrWorkletGlobalScope*)
40  0x165a3249d WebCore::WorkerRunLoop::runInMode(WebCore::WorkerOrWorkletGlobalScope*, WebCore::ModePredicate const&, WebCore::WorkerRunLoop::WaitMode)
41  0x165a3291f WebCore::WorkerRunLoop::runInMode(WebCore::WorkerOrWorkletGlobalScope*, WTF::String const&, WebCore::WorkerRunLoop::WaitMode)
42  0x1659fa04a WebCore::WorkerGlobalScope::unwrapCryptoKey(WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&)
43  0x1635bfd3a WebCore::unwrapCryptoKey(JSC::JSGlobalObject*, WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::Vector<unsigned char, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&)
44  0x16359677d WebCore::CloneDeserializer::readTerminal()
45  0x163594179 WebCore::CloneDeserializer::deserialize()

The test sends 2 messages to the worker, the first one with the public key and the second one with the private key. When processing the first message on the worker thread and doing the deserialization of the public key, we call WorkerRunLoop::runInMode() which processes the pending message for the private key.

As a result, the MessageEvents are dispatched to the JS in the wrong order (private key first, then then public key) sometimes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210702/c445788e/attachment-0001.htm>


More information about the webkit-unassigned mailing list