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 632114 - [MeeGo 1.1] banshee is prone to hang when replaying video
[MeeGo 1.1] banshee is prone to hang when replaying video
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Playback
1.7.3
Other Linux
: Normal major
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-14 02:08 UTC by Zhou Ting
Modified: 2010-10-20 03:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
thread backtrace when deadlock happened. (24.11 KB, text/plain)
2010-10-14 02:12 UTC, Zhou Ting
  Details
patch to prevent hang (4.83 KB, patch)
2010-10-14 02:17 UTC, Zhou Ting
none Details | Review
patch to move video_mutex inside bp_video_find_xoverlay (2.20 KB, patch)
2010-10-18 05:24 UTC, Zhou Ting
none Details | Review
Move video_mutex inside bp_video_find_overlay (2.86 KB, patch)
2010-10-19 17:27 UTC, Alex Launi
committed Details | Review

Description Zhou Ting 2010-10-14 02:08:48 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.
Comment 1 Zhou Ting 2010-10-14 02:12:45 UTC
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
Comment 2 Zhou Ting 2010-10-14 02:17:30 UTC
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);"
Comment 3 David Nielsen 2010-10-14 17:46:04 UTC
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?
Comment 4 Zhou Ting 2010-10-18 05:24:09 UTC
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
Comment 5 Alex Launi 2010-10-19 17:27:40 UTC
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.
Comment 6 Alex Launi 2010-10-19 18:38:48 UTC
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.
Comment 7 David Nielsen 2010-10-20 03:35:31 UTC
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