Bug 245801

Summary: REGRESSION(254597@main): [ macOS wk1 Debug ] 4X imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/(Layout tests) are flakily crashing
Product: WebKit Reporter: Hercules Hjalmarsson <hhjalmarsson>
Component: New BugsAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Hercules Hjalmarsson 2022-09-28 15:13:11 PDT
imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html
imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-module.https.html
imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-classic.https.html 
imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-module.http-rp/upgrade/worker-module.https.html

Are 4 flaky crashes on macOS wk1 ToT and since around 254597@main. The assert failed error pointing to WorkerOrWorkletThread.cpp indicates it most likely is caused by 254597@main.

HISTORY:
https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fupgrade-insecure-requests%2Fgen%2Fworker-classic.http-rp%2Fupgrade%2Fworker-classic.https.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fupgrade-insecure-requests%2Fgen%2Fworker-classic.http-rp%2Fupgrade%2Fworker-module.https.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fupgrade-insecure-requests%2Fgen%2Fworker-module.http-rp%2Fupgrade%2Fworker-classic.https.html&test=imported%2Fw3c%2Fweb-platform-tests%2Fupgrade-insecure-requests%2Fgen%2Fworker-module.http-rp%2Fupgrade%2Fworker-module.https.html

DIFF:
stdout:

FAIL Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and downgrade redirection from https context. assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
FAIL Upgrade-Insecure-Requests: Expects allowed for worker-module to same-http-downgrade origin and no-redirect redirection from https context. assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"
FAIL Upgrade-Insecure-Requests: Expects allowed for worker-module to same-https origin and downgrade redirection from https context. assert_equals: The resource request should be 'allowed'. expected "allowed" but got "blocked"


stderr:
CONSOLE MESSAGE: Unsafe attempt to load URL http://localhost:9443/common/security-features/subresource/worker.py?action=purge&key=21ad7d01-4976-4f56-be14-d26bf43f2b47&path=%2Fmixed-content from origin https://localhost:9443. Domains, protocols and ports must match.

ASSERTION FAILED: m_globalScope->hasOneRef()
workers/WorkerOrWorkletThread.cpp(203) : void WebCore::WorkerOrWorkletThread::destroyWorkerGlobalScope(Ref<WebCore::WorkerOrWorkletThread> &&)
1   0x16f40ebb0 (null)
2   0x119c9e1dd (null)
3   0xb17768778 (null)
4   0x16f40ebb0 (null)
5   0x16f40eb68 (null)
6   0x16f40eb80 (null)
7   0x117768914 WTFPrintBacktrace
8   0x16f40eb68 (null)
9   0x11a62d738 vtable for CrashLogPrintStream
10  0xb6f40eb9c (null)
11  0x16f40ebb0 (null)

BUILD URL:
https://build.webkit.org/results/Apple-BigSur-Debug-WK1-Tests/254960@main%20(9630)/results.html
Comment 1 Radar WebKit Bug Importer 2022-09-28 15:13:36 PDT
<rdar://problem/100530286>
Comment 2 Hercules Hjalmarsson 2022-09-28 15:28:53 PDT
This issue can be reproduced using command:

run-webkit-tests --debug -f --clobber-old-results --exit-after-n-failures 1  --force  --child-processes=5 --iterations=1000 -1  imported/w3c/web-platform-tests/upgrade-insecure-requests/gen/worker-classic.http-rp/upgrade/worker-classic.https.html
Comment 3 EWS 2022-09-28 15:30:54 PDT
Test gardening commit 254971@main (532472ab88bd): <https://commits.webkit.org/254971@main>

Reviewed commits have been landed. Closing PR #4807 and removing active labels.
Comment 4 EWS 2022-09-28 15:38:54 PDT
Test gardening commit 254972@main (2daf67251a5c): <https://commits.webkit.org/254972@main>

Reviewed commits have been landed. Closing PR #4809 and removing active labels.
Comment 5 Chris Dumez 2022-10-31 16:28:18 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5985
Comment 6 EWS 2022-11-04 09:50:34 PDT
Committed 256326@main (80256b359d24): <https://commits.webkit.org/256326@main>

Reviewed commits have been landed. Closing PR #5985 and removing active labels.