Skip to content

REGRESSION (287736@main?): [ iOS ] fast/mediastream/microphone-interruption-and-audio-session.html is constantly failing.#50597

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
youennf:eng/REGRESSION-287736-main-iOS-fast-mediastream-microphone-interruption-and-audio-session-html-is-constantly-failing
Sep 16, 2025
Merged

REGRESSION (287736@main?): [ iOS ] fast/mediastream/microphone-interruption-and-audio-session.html is constantly failing.#50597
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
youennf:eng/REGRESSION-287736-main-iOS-fast-mediastream-microphone-interruption-and-audio-session-html-is-constantly-failing

Conversation

@youennf
Copy link
Contributor

@youennf youennf commented Sep 11, 2025

755ea5b

REGRESSION (287736@main?): [ iOS ] fast/mediastream/microphone-interruption-and-audio-session.html is constantly failing.
https://bugs.webkit.org/show_bug.cgi?id=287033
rdar://144177133

Reviewed by Jean-Yves Avenard.

The test is flaky as we sometimes recreate the GPUProcess and the CoreAudioCaptureSourceFactory will register itself as an interruption observer to the dummy AudioSession.
Instead, we are now having a singleton set of interruption observers, used by AudioSession objects when being interrupted/ending interruptions.
Only the shared AudioSession is expected to being interrupted/ending interruptions, so there should be no issue with several AudioSessions doing interruptions in parallel.
We also update the test to make sure capture tracks are stopped explicitly.

* LayoutTests/fast/mediastream/microphone-interruption-and-audio-session.html:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/Modules/audiosession/DOMAudioSession.cpp:
(WebCore::DOMAudioSession::DOMAudioSession):
(WebCore::DOMAudioSession::~DOMAudioSession):
* Source/WebCore/platform/audio/AudioSession.cpp:
(WebCore::audioSessionInterruptionObserversSingleton):
(WebCore::AudioSession::addInterruptionObserver):
(WebCore::AudioSession::removeInterruptionObserver):
(WebCore::AudioSession::beginInterruption):
(WebCore::AudioSession::endInterruption):
(WebCore::AudioSession::activeStateChanged):
* Source/WebCore/platform/audio/AudioSession.h:
* Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::CoreAudioCaptureSourceFactory):
(WebCore::CoreAudioCaptureSourceFactory::~CoreAudioCaptureSourceFactory):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::~RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::beginInterruptionRemote):
(WebKit::RemoteAudioSessionProxyManager::endInterruptionRemote):
* Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit::~RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):
(WebKit::RemoteAudioSession::beginInterruptionRemote):
(WebKit::RemoteAudioSession::endInterruptionRemote):

Canonical link: https://commits.webkit.org/300015@main

469ad34

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ❌ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@youennf youennf self-assigned this Sep 11, 2025
@youennf youennf added the WebRTC For bugs in WebRTC label Sep 11, 2025
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 11, 2025
@youennf youennf force-pushed the eng/REGRESSION-287736-main-iOS-fast-mediastream-microphone-interruption-and-audio-session-html-is-constantly-failing branch from 5602bb0 to 469ad34 Compare September 11, 2025 19:05
@youennf youennf removed the merging-blocked Applied to prevent a change from being merged label Sep 12, 2025
@youennf youennf requested a review from jyavenard September 12, 2025 06:41
@youennf youennf marked this pull request as ready for review September 12, 2025 06:42
@youennf youennf requested a review from cdumez as a code owner September 12, 2025 06:42
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have an assertIsMainThread() here ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a mouthful !

@youennf youennf added the merge-queue Applied to send a pull request to merge-queue label Sep 16, 2025
…uption-and-audio-session.html is constantly failing.

https://bugs.webkit.org/show_bug.cgi?id=287033
rdar://144177133

Reviewed by Jean-Yves Avenard.

The test is flaky as we sometimes recreate the GPUProcess and the CoreAudioCaptureSourceFactory will register itself as an interruption observer to the dummy AudioSession.
Instead, we are now having a singleton set of interruption observers, used by AudioSession objects when being interrupted/ending interruptions.
Only the shared AudioSession is expected to being interrupted/ending interruptions, so there should be no issue with several AudioSessions doing interruptions in parallel.
We also update the test to make sure capture tracks are stopped explicitly.

* LayoutTests/fast/mediastream/microphone-interruption-and-audio-session.html:
* LayoutTests/platform/ios/TestExpectations:
* Source/WebCore/Modules/audiosession/DOMAudioSession.cpp:
(WebCore::DOMAudioSession::DOMAudioSession):
(WebCore::DOMAudioSession::~DOMAudioSession):
* Source/WebCore/platform/audio/AudioSession.cpp:
(WebCore::audioSessionInterruptionObserversSingleton):
(WebCore::AudioSession::addInterruptionObserver):
(WebCore::AudioSession::removeInterruptionObserver):
(WebCore::AudioSession::beginInterruption):
(WebCore::AudioSession::endInterruption):
(WebCore::AudioSession::activeStateChanged):
* Source/WebCore/platform/audio/AudioSession.h:
* Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
(WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.cpp:
(WebCore::CoreAudioCaptureSourceFactory::CoreAudioCaptureSourceFactory):
(WebCore::CoreAudioCaptureSourceFactory::~CoreAudioCaptureSourceFactory):
* Source/WebKit/GPUProcess/media/RemoteAudioSessionProxyManager.cpp:
(WebKit::RemoteAudioSessionProxyManager::RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::~RemoteAudioSessionProxyManager):
(WebKit::RemoteAudioSessionProxyManager::beginInterruptionRemote):
(WebKit::RemoteAudioSessionProxyManager::endInterruptionRemote):
* Source/WebKit/GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererInternalUnitManager.cpp:
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit):
(WebKit::RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit::~RemoteAudioMediaStreamTrackRendererInternalUnitManagerUnit):
* Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp:
(WebKit::RemoteAudioSession::RemoteAudioSession):
(WebKit::RemoteAudioSession::~RemoteAudioSession):
(WebKit::RemoteAudioSession::beginInterruptionRemote):
(WebKit::RemoteAudioSession::endInterruptionRemote):

Canonical link: https://commits.webkit.org/300015@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/REGRESSION-287736-main-iOS-fast-mediastream-microphone-interruption-and-audio-session-html-is-constantly-failing branch from 469ad34 to 755ea5b Compare September 16, 2025 06:56
@webkit-commit-queue
Copy link
Collaborator

Committed 300015@main (755ea5b): https://commits.webkit.org/300015@main

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

@webkit-commit-queue webkit-commit-queue merged commit 755ea5b into WebKit:main Sep 16, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebRTC For bugs in WebRTC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants