Bug 180486 - [EME] Possible deadlock when aborting a SourceBufferPrivateAVFObjC append operation
Summary: [EME] Possible deadlock when aborting a SourceBufferPrivateAVFObjC append ope...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-06 10:53 PST by Jer Noble
Modified: 2017-12-07 11:26 PST (History)
5 users (show)

See Also:


Attachments
Patch (5.94 KB, patch)
2017-12-06 11:00 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (2.84 MB, application/zip)
2017-12-06 12:16 PST, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>