After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 675626 - d3dvideosink: fix several deadlocks
d3dvideosink: fix several deadlocks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.x
Other Windows
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-07 17:27 UTC by Andoni Morales
Modified: 2012-05-09 08:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix several deadlocks (7.92 KB, patch)
2012-05-07 17:30 UTC, Andoni Morales
needs-work Details | Review
Fix deadlock when the device is lost (1.09 KB, patch)
2012-05-08 16:03 UTC, Andoni Morales
committed Details | Review

Description Andoni Morales 2012-05-07 17:27:50 UTC
The following patch several potential deadlock in the d3d video sink.

release_swap_chain() and initialize_swap_chain() are called from set_windows_handle() with the swap_chain lock.

notify_device_lost() and resize_swap_chain() are called from show_frame() with the shared_3d3_dev lock and the swap_chain lock.

notify_device_lost() is called from device_list() with shared_d3d_dev lock and shared_d3d lock

This patch needs more testing.
Comment 1 Andoni Morales 2012-05-07 17:30:24 UTC
Created attachment 213611 [details] [review]
fix several deadlocks
Comment 2 Sebastian Dröge (slomo) 2012-05-08 12:31:32 UTC
This doesn't apply to latest gst-plugins-bad git master and not to the 0.10 branch either. Can you rebase it?
Comment 3 Andoni Morales 2012-05-08 16:03:26 UTC
Created attachment 213679 [details] [review]
Fix deadlock when the device is lost

Loosing the device (eg: UAC pops in) creates a deadlock.
SendMessage() is synchronous and the swap chain lock is taken again in SharedHiddenWndProc()
Comment 4 Sebastian Dröge (slomo) 2012-05-09 07:53:01 UTC
Is only the last patch required now?
Comment 5 Andoni Morales 2012-05-09 08:28:02 UTC
Yes, only the last one is required
Comment 6 Sebastian Dröge (slomo) 2012-05-09 08:39:04 UTC
commit 171321c5ebef7f79f41a802aacf311c2a0338cb0
Author: Andoni Morales Alastruey <ylatuya@gmail.com>
Date:   Tue May 8 17:58:58 2012 +0200

    d3dvideosink: fix deadlock when the device is lost