Bug 261777

Summary: REGRESSION(267963@main): [ wk2 Debug ] imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html is constantly crashing with ASSERTION FAILED: frame->isDetached()
Product: WebKit Reporter: Ben Schwartz <ben_schwartz>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: philn, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=261107
https://bugs.webkit.org/show_bug.cgi?id=263527

Description Ben Schwartz 2023-09-19 15:29:47 PDT
imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html

This test is constantly crashing with `ASSERTION FAILED: frame->isDetached()` on WK2 debug.

HISTORY:

https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fwebcodecs%2Faudio-encoder.https.any.html

CRASH LOG (preview):

ASSERTION FAILED: frame->isDetached()
/Volumes/Data/worker/Apple-Ventura-Debug-Build/build/Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp(243) : ExceptionOr<void> WebCore::WebCodecsAudioEncoder::encode(Ref<WebCore::WebCodecsAudioData> &&)
1   0x2ab20ee29 WTFCrash
2   0x332d7d53b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x335abfd2a WebCore::WebCodecsAudioEncoder::encode(WTF::Ref<WebCore::WebCodecsAudioData, WTF::RawPtrTraits<WebCore::WebCodecsAudioData>>&&)
4   0x334c13457 WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encodeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebCodecsAudioEncoder*)::'lambda'()::operator()() const
5   0x334c131f1 JSC::JSValue WebCore::toJS<WebCore::IDLUndefined, WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encodeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebCodecsAudioEncoder*)::'lambda'()>(JSC::JSGlobalObject&, JSC::ThrowScope&, WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encodeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebCodecsAudioEncoder*)::'lambda'()&&)
6   0x334c1314b WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encodeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebCodecsAudioEncoder*)
7   0x334c12e5e long long WebCore::IDLOperation<WebCore::JSWebCodecsAudioEncoder>::call<&WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encodeBody(JSC::JSGlobalObject*, JSC::CallFrame*, WebCore::JSWebCodecsAudioEncoder*), (WebCore::CastedThisErrorBehavior)0>(JSC::JSGlobalObject&, JSC::CallFrame&, char const*)
8   0x334c12364 WebCore::jsWebCodecsAudioEncoderPrototypeFunction_encode(JSC::JSGlobalObject*, JSC::CallFrame*)

FULL CRASH LOG:

https://build.webkit.org/results/Apple-Ventura-Debug-WK2-Tests/268119%40main%20(3003)/imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any-crash-log.txt

REPRODUCTION:

I was able to reproduce this issue on macOS Ventura (13.5, 22G74/arm64) ToT using the following command:

run-webkit-tests --debug --clobber-old-results --verbose imported/w3c/web-platform-tests/webcodecs/audio-encoder.https.any.html

REGRESSION:

I was able to bisect a regression point at 267963@main (issue did not reproduce at 267962@main). Changes at that point are directly related to this issue, and are likely what caused it.
Comment 1 Radar WebKit Bug Importer 2023-09-19 15:30:02 PDT
<rdar://problem/115749541>
Comment 2 EWS 2023-09-19 15:53:58 PDT
Test gardening commit 268155@main (895e3651c69a): <https://commits.webkit.org/268155@main>

Reviewed commits have been landed. Closing PR #17942 and removing active labels.
Comment 3 Ryan Haddad 2023-09-20 09:57:59 PDT
*** Bug 261807 has been marked as a duplicate of this bug. ***
Comment 4 Ryan Haddad 2023-09-20 09:58:31 PDT
Fix landed via another (now duped) bugzilla.

https://commits.webkit.org/268195@main
Comment 5 EWS 2023-09-20 10:15:45 PDT
Test gardening commit 268206@main (244ef47bdd67): <https://commits.webkit.org/268206@main>

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