Bug 191278 - Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https.html is flaky
Summary: Layout Test imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemot...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks: 191299
  Show dependency treegraph
 
Reported: 2018-11-05 13:31 PST by Ryan Haddad
Modified: 2018-11-06 07:47 PST (History)
8 users (show)

See Also:


Attachments
Patch (5.46 KB, patch)
2018-11-06 01:49 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2018-11-05 13:31:31 PST
The following layout test is flaky on macOS and iOS:

imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https.html

Probable cause:

This test has been flaky since it was imported with https://trac.webkit.org/changeset/237773/webkit.

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported%2Fw3c%2Fweb-platform-tests%2Fwebrtc%2FRTCPeerConnection-setRemoteDescription-tracks.https.html

Here is the text diff which shows an unexpected "PASS" message:

--- /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https-expected.txt
+++ /Volumes/Data/slave/sierra-release-tests-wk2/build/layout-test-results/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-setRemoteDescription-tracks.https-actual.txt
@@ -4,7 +4,7 @@
 PASS addTrack() with a track and no stream makes ontrack fire with a track and no stream. 
 PASS addTrack() with a track and a stream makes ontrack fire with a track and a stream. 
 PASS ontrack fires before setRemoteDescription resolves. 
-FAIL addTrack() with two tracks and one stream makes ontrack fire twice with the tracks and shared stream. assert_array_equals: The remote stream == [first track, second track]. property 0, expected object "[object MediaStreamTrack]" but got object "[object MediaStreamTrack]"
+PASS addTrack() with two tracks and one stream makes ontrack fire twice with the tracks and shared stream. 
 PASS addTrack() for an existing stream makes stream.onaddtrack fire. 
 PASS stream.onaddtrack fires before setRemoteDescription resolves. 
 PASS addTrack() with a track and two streams makes ontrack fire with a track and two streams.
Comment 1 Ryan Haddad 2018-11-05 13:33:38 PST
This test also seems to be a flaky crash, as seen on this run:
https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r237778%20(7615)/results.html

Thread 20 Crashed:: com.apple.audio.IOThread.client
0   com.apple.WebCore             	0x0000000109ede9a8 WebCore::AudioSampleDataSource::pushSamplesInternal(AudioBufferList const&, WTF::MediaTime const&, unsigned long) + 104 (AudioSampleDataSource.mm:154)
1   com.apple.WebCore             	0x000000010afc5da0 WebCore::RealtimeOutgoingAudioSourceCocoa::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long) + 784 (RealtimeOutgoingAudioSourceCocoa.cpp:109)
2   com.apple.WebCore             	0x000000010afa6707 WebCore::MediaStreamTrackPrivate::forEachObserver(WTF::Function<void (WebCore::MediaStreamTrackPrivate::Observer&)> const&) const + 711 (Atomics.h:247)
3   com.apple.WebCore             	0x000000010afa6ebf WebCore::MediaStreamTrackPrivate::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long) + 191 (MediaStreamTrackPrivate.cpp:249)
4   com.apple.WebCore             	0x000000010afa9cc7 WebCore::RealtimeMediaSource::forEachObserver(WTF::Function<void (WebCore::RealtimeMediaSource::Observer&)> const&) const + 711 (Atomics.h:247)
5   com.apple.WebCore             	0x000000010afa9f7c WebCore::RealtimeMediaSource::audioSamplesAvailable(WTF::MediaTime const&, WebCore::PlatformAudioData const&, WebCore::AudioStreamDescription const&, unsigned long) + 92 (RealtimeMediaSource.cpp:170)
6   com.apple.WebCore             	0x0000000109de7c53 WebCore::MediaStreamAudioSource::consumeAudio(WebCore::AudioBus&, unsigned long) + 419 (MediaStreamAudioSourceCocoa.cpp:86)
7   com.apple.WebCore             	0x000000010a639f1b WebCore::AudioDestinationNode::render(WebCore::AudioBus*, WebCore::AudioBus*, unsigned long) + 395 (AudioDestinationNode.cpp:93)
8   com.apple.WebCore             	0x000000010aeb7bf2 WebCore::AudioDestinationMac::render(unsigned int, AudioBufferList*) + 82 (DumbPtrTraits.h:41)
9   com.apple.WebCore             	0x000000010aeb7b0f WebCore::AudioDestinationMac::inputProc(void*, unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) + 15 (AudioDestinationMac.cpp:190)
10  com.apple.audio.units.Components	0x000000046a226da9 AUInputElement::PullInput(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 185
11  com.apple.audio.units.Components	0x000000046a103f97 AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned int*, AudioBufferList*, AudioStreamPacketDescription**, void*) + 199
12  com.apple.audio.toolbox.AudioToolbox	0x00007fff34080257 AudioConverterChain::CallInputProc(unsigned int) + 613
13  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407ff0d AudioConverterChain::FillBufferFromInputProc(unsigned int*, CABufferList*) + 127
14  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407fe6f BufferedAudioConverter::GetInputBytes(unsigned int, unsigned int&, CABufferList const*&) + 207
15  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407fc71 CBRConverter::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 107
16  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407298a BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 346
17  com.apple.audio.toolbox.AudioToolbox	0x00007fff34072cda AudioConverterChain::RenderOutput(CABufferList*, unsigned int, unsigned int&, AudioStreamPacketDescription*) + 106
18  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407298a BufferedAudioConverter::FillBuffer(unsigned int&, AudioBufferList&, AudioStreamPacketDescription*) + 346
19  com.apple.audio.toolbox.AudioToolbox	0x00007fff3407231f AudioConverterFillComplexBuffer + 1076
20  com.apple.audio.units.Components	0x000000046a1036cb AUInputFormatConverter2::PullAndConvertInput(AudioTimeStamp const&, unsigned int&, AudioBufferList&, AudioStreamPacketDescription*, bool&) + 107
21  com.apple.audio.units.Components	0x000000046a10350c AUConverterBase::RenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int) + 572
22  com.apple.audio.units.Components	0x000000046a22dca4 AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement*, unsigned int, AudioBufferList&) + 166
23  com.apple.audio.units.Components	0x000000046a22d37a AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) + 546
24  com.apple.audio.units.Components	0x000000046a106d44 AUHAL::AUIOProc(unsigned int, AudioTimeStamp const*, AudioBufferList const*, AudioTimeStamp const*, AudioBufferList*, AudioTimeStamp const*, void*) + 1726
25  com.apple.audio.CoreAudio     	0x00007fff35136885 HALC_ProxyIOContext::IOWorkLoop() + 5021
26  com.apple.audio.CoreAudio     	0x00007fff3513531c HALC_ProxyIOContext::IOThreadEntry(void*) + 128
27  com.apple.audio.CoreAudio     	0x00007fff3513505e HALB_IOThread::Entry(void*) + 72
28  libsystem_pthread.dylib       	0x00007fff5dda8661 _pthread_body + 340
29  libsystem_pthread.dylib       	0x00007fff5dda850d _pthread_start + 377
30  libsystem_pthread.dylib       	0x00007fff5dda7bf9 thread_start + 13
Comment 2 Ryan Haddad 2018-11-05 15:11:51 PST
Marked test as a flaky failure in https://trac.webkit.org/r237832
Comment 3 youenn fablet 2018-11-05 19:49:37 PST
This is a bug in the test. Filed https://github.com/web-platform-tests/wpt/pull/13940
Comment 4 youenn fablet 2018-11-06 01:49:55 PST
Created attachment 353953 [details]
Patch
Comment 5 WebKit Commit Bot 2018-11-06 07:46:22 PST
Comment on attachment 353953 [details]
Patch

Clearing flags on attachment: 353953

Committed r237864: <https://trac.webkit.org/changeset/237864>
Comment 6 WebKit Commit Bot 2018-11-06 07:46:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-11-06 07:47:28 PST
<rdar://problem/45842896>