GNOME Bugzilla – Bug 632114
[MeeGo 1.1] banshee is prone to hang when replaying video
Last modified: 2010-10-20 03:35:31 UTC
The MeeGo 1.1 media player use banshee 1.7.3 as code and add upstream patch as below to seperate video mutex and replaygain mutex. http://git.gnome.org/browse/banshee/commit/?id=277677f3d728bb13f9ab402b145ff5d5d97348cb MeeGo 1.1 test image can be got from: http://repo.meego.com/MeeGo/builds/1.0.99/1.0.99.1.20101008.1/netbook/images/meego-netbook-ia32/ reproduction steps 1.launch banshee 2.selected “video” item in banshee’s play window 3.double click “blg-buck-bunny” to play the video 4.selected “video” item in banshee’s play window again 5.double click “blg-buck-bunny” or "kitten" within 10 times, banshee will hang.
Created attachment 172318 [details] thread backtrace when deadlock happened. Attachment is the bracktrace log when deadlock happened. In thread 1, bp_video_window_expose() firstly get the player->video_mutex , but blocked by g_object_get (player->playbin, "video-sink", &video_sink, NULL) In thread 7, bp_video_sink_element_added() is blocked when try to get player->video_mutex. Under normal cases, bp_video_sink_element_added() should be called before bp_video_window_expose(). It seems player->video_mutex conflict with gstreamer internal mutex
Created attachment 172319 [details] [review] patch to prevent hang Attachment if the patch based on 1.7.3 code base. Firstly, use the usptream patch to separate video_mutex and replaygain_mutex http://git.gnome.org/browse/banshee/commit/?id=277677f3d728bb13f9ab402b145ff5d5d97348cb Secondly, move "video_mutex" inside "bp_video_find_xoverlay()", put it after the call of "g_object_get (player->playbin, "video-sink", &video_sink, NULL);"
Thank you for the patch, however it does not apply to git master as you merged it with the already upstreamed patch. Can you please provide a version rebased against git master?
Created attachment 172581 [details] [review] patch to move video_mutex inside bp_video_find_xoverlay Thanks for the information. Attachment is the patch based on git master
Created attachment 172745 [details] [review] Move video_mutex inside bp_video_find_overlay Authorship and so on has been maintained. I'm really just testing git-bz and it's rejecting the patch from diff.
Review of attachment 172745 [details] [review]: Looks good. I like moving the locking into the function call itself- much cleaner. Tested and definitely fixes the bug.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. http://git.gnome.org/browse/banshee/commit/?id=31abc6d198c2f8f83ef3a869872ca0e8f1e203b1