Bug 133762 - [Win] Avoid deadlock with AVFoundation
Summary: [Win] Avoid deadlock with AVFoundation
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar, Regression
Depends on:
Reported: 2014-06-11 13:54 PDT by Brent Fulgham
Modified: 2014-06-11 14:45 PDT (History)
6 users (show)

See Also:

Patch (1.74 KB, patch)
2014-06-11 14:03 PDT, Brent Fulgham
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2014-06-11 13:54:37 PDT
If WebKit is allowed to loop various kinds of media content for long periods of time, we sometimes run into a deadlock between AVFoundationCF and the AVFWrapper mutex used to protect individual AVF playback instances.

This deadlock happens because in some cases a notification will trigger on the main thread, which will immediately begin executing handler content without releasing the AVFWrapper container mutex used to prevent deleting AVFWrapper instances while they are still being used.

For Windows, we should tell WebKit to always invoke these handlers asynchronously so that we do not encounter this deadlock.
Comment 1 Brent Fulgham 2014-06-11 14:03:20 PDT
Created attachment 232901 [details]
Comment 2 Brent Fulgham 2014-06-11 14:04:15 PDT
Comment 3 Brent Fulgham 2014-06-11 14:41:28 PDT
Note: The EWS error is due to a problem on the build machine, not this patch.
Comment 4 Brent Fulgham 2014-06-11 14:45:34 PDT
Committed r169842: <http://trac.webkit.org/changeset/169842>