Bug 180486

Summary: [EME] Possible deadlock when aborting a SourceBufferPrivateAVFObjC append operation
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, ews-watchlist, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 none

Description Jer Noble 2017-12-06 10:53:29 PST
[EME] Possible deadlock when aborting a SourceBufferPrivateAVFObjC append operation
Comment 1 Jer Noble 2017-12-06 11:00:02 PST
Created attachment 328592 [details]
Patch
Comment 2 EWS Watchlist 2017-12-06 12:16:27 PST
Comment on attachment 328592 [details]
Patch

Attachment 328592 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/5518010

New failing tests:
webrtc/video-replace-muted-track.html
Comment 3 EWS Watchlist 2017-12-06 12:16:28 PST
Created attachment 328605 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 4 Jer Noble 2017-12-06 16:15:24 PST
(In reply to Build Bot from comment #3)
> Created attachment 328605 [details]
> Archive of layout-test-results from ews105 for mac-elcapitan-wk2
> 
> The attached test failures were seen while running run-webkit-tests on the
> mac-wk2-ews.
> Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6

This test is a flakey failure locally even without my patch.
Comment 5 Eric Carlson 2017-12-06 16:25:00 PST
Comment on attachment 328592 [details]
Patch

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

> Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:222
> +        if (!dispatch_semaphore_wait(_abortSemaphore.get(), dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_MSEC * 100))) {
> +            dispatch_semaphore_signal(_abortSemaphore.get());

Nit: why abortSemaphore rather than _abortSemaphore?

> Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:243
> +        if (!dispatch_semaphore_wait(_abortSemaphore.get(), dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_MSEC * 100))) {
> +            dispatch_semaphore_signal(_abortSemaphore.get());

Ditto.
Comment 6 WebKit Commit Bot 2017-12-07 11:25:40 PST
Comment on attachment 328592 [details]
Patch

Clearing flags on attachment: 328592

Committed r225635: <https://trac.webkit.org/changeset/225635>
Comment 7 WebKit Commit Bot 2017-12-07 11:25:41 PST
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2017-12-07 11:26:21 PST
<rdar://problem/35914294>