Bug 185545 - Add release logging for incoming and outgoing webrtc audio tracks
Summary: Add release logging for incoming and outgoing webrtc audio tracks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-11 04:06 PDT by youenn fablet
Modified: 2019-01-17 11:24 PST (History)
6 users (show)

See Also:


Attachments
Patch (4.91 KB, patch)
2018-05-11 04:10 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (7.89 KB, patch)
2018-05-11 04:27 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (32.16 KB, patch)
2019-01-16 14:41 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (32.11 KB, patch)
2019-01-16 14:46 PST, youenn fablet
no flags Details | Formatted Diff | Diff
Fix GTK (32.24 KB, patch)
2019-01-17 07: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 youenn fablet 2018-05-11 04:06:55 PDT
Add release logging for incoming and outgoing webrtc audio tracks
Comment 1 youenn fablet 2018-05-11 04:10:40 PDT
Created attachment 340185 [details]
Patch
Comment 2 youenn fablet 2018-05-11 04:27:55 PDT
Created attachment 340186 [details]
Patch
Comment 3 Daniel Bates 2018-05-11 23:13:08 PDT
Comment on attachment 340186 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340186&action=review

> Source/WebCore/ChangeLog:9
> +        one log line is added each second for each audio track.

What is the motivation for such logging? Is this to diagnosis a hard to find bug? When can we remove this logging?  I am not at a computer with a checkout at the moment, is this logging always enabled?
Comment 4 Daniel Bates 2018-05-11 23:14:19 PDT
Comment on attachment 340186 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340186&action=review

>> Source/WebCore/ChangeLog:9
>> +        one log line is added each second for each audio track.
> 
> What is the motivation for such logging? Is this to diagnosis a hard to find bug? When can we remove this logging?  I am not at a computer with a checkout at the moment, is this logging always enabled?

Is it necessary to to log every second? That seems pretty frequent.
Comment 5 youenn fablet 2018-05-13 14:53:00 PDT
Logging is always enabled and allows verifying that audio capture is working fine.
We have the same logging for video capture.

There are cases where a webrtc call fails.
This logging allows to check whether capture is working fine or not.
Our current way of diagnose this is to ask users to turn mock capture sources and retry.

It is not necessary to log every second.
We need a value that is smaller than the timeout values some websites use for error handling.
Comment 6 youenn fablet 2019-01-15 11:03:54 PST
Ping review.
This would help investigating some cases where audio is not sent as can be seen from stats found in rdar://problem/37516414.
Comment 7 Eric Carlson 2019-01-15 12:41:15 PST
Comment on attachment 340186 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=340186&action=review

> Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:78
> +    if (!(++m_chunksReceived % 100))

Nit: it would be useful to log a unique identifier to help debug cases with more than one track.

> Source/WebCore/platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:161
> +            RELEASE_LOG(MediaStream, "RealtimeOutgoingAudioSourceCocoa::pullAudioData %zu chunk", m_chunksSent);

Ditto

> Source/WebKit/WebProcess/cocoa/UserMediaCaptureManager.cpp:237
> +        RELEASE_LOG(MediaStream, "UserMediaCaptureManager::audioSamplesAvailable %zu chunk for %llu", m_receivedSamples, id);

Ditto
Comment 8 youenn fablet 2019-01-16 14:41:22 PST
Created attachment 359311 [details]
Patch for landing
Comment 9 youenn fablet 2019-01-16 14:42:24 PST
(In reply to Eric Carlson from comment #7)
> Comment on attachment 340186 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=340186&action=review
> 
> > Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:78
> > +    if (!(++m_chunksReceived % 100))
> 
> Nit: it would be useful to log a unique identifier to help debug cases with
> more than one track.

Good idea.
This makes it a larger patch with more refactoring and I applied it to existing sources as well.
I plan to land it tomorrow, if you want to have a quick look before, do not hesitate.
Comment 10 youenn fablet 2019-01-16 14:46:52 PST
Created attachment 359312 [details]
Patch for landing
Comment 11 Eric Carlson 2019-01-16 17:16:08 PST
(In reply to youenn fablet from comment #9)
> 
> Good idea.
> This makes it a larger patch with more refactoring and I applied it to
> existing sources as well.
> I plan to land it tomorrow, if you want to have a quick look before, do not
> hesitate.

Nice improvement, thanks!
Comment 12 youenn fablet 2019-01-17 07:49:18 PST
Created attachment 359374 [details]
Fix GTK
Comment 13 WebKit Commit Bot 2019-01-17 11:23:51 PST
Comment on attachment 359374 [details]
Fix GTK

Clearing flags on attachment: 359374

Committed r240120: <https://trac.webkit.org/changeset/240120>
Comment 14 WebKit Commit Bot 2019-01-17 11:23:53 PST
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2019-01-17 11:24:32 PST
<rdar://problem/47357698>