Bug 193724 - Flaky AVEncoderBitRateKey symbol not found crash on imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html
Summary: Flaky AVEncoderBitRateKey symbol not found crash on imported/w3c/web-platform...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
: 196166 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-23 09:48 PST by Alexey Proskuryakov
Modified: 2019-03-25 09:30 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.82 KB, patch)
2019-03-22 14:31 PDT, Eric Carlson
jer.noble: review+
Details | Formatted Diff | Diff
Patch for landing (4.92 KB, patch)
2019-03-22 14:42 PDT, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2019-01-23 09:48:54 PST
Not sure how this kind of an issue can be flaky, but it is. Happens on both High Sierra and Mojave, debug and release.

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-constructor.html

Happens as long as records go, since mid-December at least.

ASSERTION FAILED: dlsym(0x7fce1ed713b0, AVEncoderBitRateKey): symbol not found
constant
./platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm(55) : NSString *initAVEncoderBitRateKey()
1   0x21fa0eb89 WTFCrash
2   0x20e91aea0 initAVEncoderBitRateKey()
3   0x20e90f0f7 WebCore::MediaRecorderPrivateWriter::setAudioInput()
4   0x20e90eca4 WebCore::MediaRecorderPrivateWriter::create(WebCore::MediaStreamTrackPrivate const*, WebCore::MediaStreamTrackPrivate const*)
5   0x2110a479a WebCore::MediaRecorderPrivateAVFImpl::create(WebCore::MediaStreamPrivate const&)
6   0x20f73f026 WebCore::MediaRecorder::getPrivateImpl(WebCore::MediaStreamPrivate const&)
7   0x20f73ed87 WebCore::MediaRecorder::create(WebCore::Document&, WTF::Ref<WebCore::MediaStream, WTF::DumbPtrTraits<WebCore::MediaStream> >&&, WebCore::MediaRecorder::Options&&)
Comment 1 Radar WebKit Bug Importer 2019-01-23 09:49:27 PST
<rdar://problem/47483831>
Comment 2 Ryan Haddad 2019-03-20 16:29:08 PDT
Also frequently seen with http/wpt/mediarecorder/MediaRecorder-AV-audio-video-dataavailable.html:
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=http%2Fwpt%2Fmediarecorder%2FMediaRecorder-AV-audio-video-dataavailable.html
Comment 3 Eric Carlson 2019-03-22 14:31:03 PDT
Created attachment 365759 [details]
Patch
Comment 4 Jer Noble 2019-03-22 14:37:10 PDT
Comment on attachment 365759 [details]
Patch

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

> Source/WebCore/platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:86
> +#define AVEncoderBitRateKey myAVEncoderBitRateKey()
> +#define AVFormatIDKey myAVFormatIDKey()
> +#define AVNumberOfChannelsKey myAVNumberOfChannelsKey()
> +#define AVSampleRateKey myAVSampleRateKey()

"my" as a prefix isn't useful. Could these be changed to "get*WithFallback()"?
Comment 5 Eric Carlson 2019-03-22 14:42:50 PDT
Created attachment 365761 [details]
Patch for landing
Comment 6 WebKit Commit Bot 2019-03-22 15:54:55 PDT
Comment on attachment 365761 [details]
Patch for landing

Clearing flags on attachment: 365761

Committed r243404: <https://trac.webkit.org/changeset/243404>
Comment 7 WebKit Commit Bot 2019-03-22 15:54:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Eric Carlson 2019-03-22 16:37:08 PDT
*** Bug 196166 has been marked as a duplicate of this bug. ***
Comment 9 Alexey Proskuryakov 2019-03-25 09:30:32 PDT
Comment on attachment 365761 [details]
Patch for landing

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

> Source/WebCore/ChangeLog:11
> +        The soft link macros occasionally fail to load constants from AVFoundation.framework
> +        which are actually in one of its sub-frameworks. While we investigate the cause
> +        cause of the failure, ise the SOFT_LINK_CONSTANT_MAY_FAIL so we can detect the failure

Thank you Eric for tackling this! What bug tracks finding the root cause?