Bug 225196

Summary: REGRESSION (r276633): ASSERTION FAILED: !forbidMallocUseScopeCount || disableMallocRestrictionScopeCount under WebCore::AudioSampleDataSource::create()
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, sihui_liu, 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=224750
Attachments:
Description Flags
Patch none

Description Ryan Haddad 2021-04-29 10:32:48 PDT
The following two API tests are consistently asserting on debug WK2 bots

TestWebKitAPI.WebKit2.SpeechRecognitionPageBecomesInvisible
TestWebKitAPI.WebKit2.SpeechRecognitionErrorWhenStartingAudioCaptureOnDifferentPage

        ASSERTION FAILED: !forbidMallocUseScopeCount || disableMallocRestrictionScopeCount
        /Volumes/Data/worker/bigsur-debug/build/Source/WTF/wtf/FastMalloc.cpp(524) : void *WTF::fastMalloc(size_t)
        1   0x10d2b0df9 WTFCrash
        2   0x10eb5643b WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x10d2f327b WTF::fastMalloc(unsigned long)
        4   0x1298d7595 WTF::ThreadSafeRefCountedBase::operator new(unsigned long)
        5   0x12b40f530 WebCore::AudioSampleDataSource::create(unsigned long, WTF::LoggerHelper&, unsigned long)
        6   0x12bdff2c5 WebCore::SpeechRecognitionCaptureSourceImpl::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long)
        7   0x12e145699 WebCore::RealtimeMediaSource::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long)
        8   0x12e1abdea WebCore::BaseAudioSharedUnit::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long)
        9   0x12bba4388 WebCore::MockAudioSharedUnit::emitSampleBuffers(unsigned int)
        10  0x12bba4691 WebCore::MockAudioSharedUnit::render(WTF::Seconds)
        11  0x12bbb3835 WebCore::MockAudioSharedUnit::tick()::$_3::operator()() const
        12  0x12bbb37be WTF::Detail::CallableWrapper<WebCore::MockAudioSharedUnit::tick()::$_3, void>::call()
        13  0x10d2dce02 WTF::Function<void ()>::operator()() const
        14  0x10d40607e WTF::WorkQueue::dispatch(WTF::Function<void ()>&&)::$_0::operator()() const
        15  0x10d406282 WTF::BlockPtr<void ()> WTF::BlockPtr<void ()>::fromCallable<WTF::WorkQueue::dispatch(WTF::Function<void ()>&&)::$_0>(WTF::WorkQueue::dispatch(WTF::Function<void ()>&&)::$_0)::'lambda'(void*)::operator()(void*) const
        16  0x10d406255 WTF::BlockPtr<void ()> WTF::BlockPtr<void ()>::fromCallable<WTF::WorkQueue::dispatch(WTF::Function<void ()>&&)::$_0>(WTF::WorkQueue::dispatch(WTF::Function<void ()>&&)::$_0)::'lambda'(void*)::__invoke(void*)
        17  0x7fff201975dd _dispatch_call_block_and_release
        18  0x7fff201987c7 _dispatch_client_callout
        19  0x7fff2019e5fe _dispatch_lane_serial_drain
        20  0x7fff2019f0cb _dispatch_lane_invoke
        21  0x7fff201a8c5d _dispatch_workloop_worker_thread
        22  0x7fff20340499 _pthread_wqthread
        23  0x7fff2033f467 start_wqthread


https://results.webkit.org/?suite=api-tests&suite=api-tests&test=TestWebKitAPI.WebKit2.SpeechRecognitionPageBecomesInvisible&test=TestWebKitAPI.WebKit2.SpeechRecognitionErrorWhenStartingAudioCaptureOnDifferentPage
Comment 1 Radar WebKit Bug Importer 2021-04-29 10:33:04 PDT
<rdar://problem/77329071>
Comment 2 Ryan Haddad 2021-04-29 10:48:10 PDT
Test history suggests that this started with https://trac.webkit.org/changeset/276633/webkit
Comment 3 youenn fablet 2021-04-29 10:50:47 PDT
Will fix it tomorrow
Comment 4 youenn fablet 2021-04-30 00:58:57 PDT
Created attachment 427399 [details]
Patch
Comment 5 EWS 2021-04-30 08:19:34 PDT
Committed r276839 (237190@main): <https://commits.webkit.org/237190@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427399 [details].