WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
184583
REGRESSION(
r230627
): [GTK][WPE] Possible deadlock when destroying the player in non AC mode
https://bugs.webkit.org/show_bug.cgi?id=184583
Summary
REGRESSION(r230627): [GTK][WPE] Possible deadlock when destroying the player ...
Miguel Gomez
Reported
2018-04-13 04:23:57 PDT
In my effort to simplify the code in the patch for
https://bugs.webkit.org/show_bug.cgi?id=183362
I accidentally added the possibility of a deadlock between the main and gstreamer threads when not in AC mode. The thing is that when the player destructor is running, there's the possibility that a call to triggerRepaint() is being executed in the gstreamer thread. After
r230627
it's possible that cancelRepaint() called from the destructor is executed before triggerRepaint() waits in the m_drawCondition, which means that the gstreamer thread will be locked forever. The fix here is to put m_destroying inside cancelRepaint() again, and modify it inside the same lock where we notify m_drawCondition. And also check its value in triggerRepaint() inside the m_drawMutex lock. That way, if cancelRepaint() gets executed before triggerRepaint() reaches the lock, triggerRepaint will exit before waiting in the condition, and if cancelRepaint() is executed after triggerRepaint() reaches the lock it will signal the m_drawCondition an release the gstreamer thread. I'll send a patch in a while and then punish myself writing 500 times "watch out with the race conditions" :(
Attachments
Patch
(5.58 KB, patch)
2018-04-13 04:45 PDT
,
Miguel Gomez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Miguel Gomez
Comment 1
2018-04-13 04:45:05 PDT
Created
attachment 337880
[details]
Patch
WebKit Commit Bot
Comment 2
2018-04-13 06:18:34 PDT
Comment on
attachment 337880
[details]
Patch Clearing flags on attachment: 337880 Committed
r230629
: <
https://trac.webkit.org/changeset/230629
>
WebKit Commit Bot
Comment 3
2018-04-13 06:18:36 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug