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 769212 - Pipeline state change ( PLAYING -> PAUSED ) hung on the RPi.
Pipeline state change ( PLAYING -> PAUSED ) hung on the RPi.
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: dont know
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-27 07:26 UTC by Petros
Modified: 2018-05-07 15:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Debug log with GST_DEBUG=6 (2.00 MB, audio/audible)
2016-07-27 07:35 UTC, Petros
Details
Debug log with GST_DEBUG=6 ( part B ) (1.55 MB, application/octet-stream)
2016-07-27 07:36 UTC, Petros
Details
Threads backtrace (42.03 KB, text/plain)
2016-07-27 07:50 UTC, Petros
Details

Description Petros 2016-07-27 07:26:04 UTC
I am experiencing some issues with PLAYING -> PAUSED state changes especially when trying to perform the state change in a synchronous way.

The issue seems to appear also when trying the async way but less frequently. More specifically the pipeline will just hung waiting for playbinsink to commit the state change which never seems to happen in the end.

My pipeline is playbin-based with a bin connected that contains an appsink and glupload/glcolorconvert for the texture handling. 

Going through the log from what I understand all child elements are successfully changing state but playbinsink seems to refuse to do that..

Same code works properly on OS X and Linux desktop with the same versions of gst and plugins.

Attached is a log output configured with GST_DEBUG=6.

Thanks for any hints
Petros
Comment 1 Sebastian Dröge (slomo) 2016-07-27 07:31:58 UTC
Can you get a backtrace of all threads when it hangs? Also which version of GStreamer and the plugins are you using?
Comment 2 Petros 2016-07-27 07:35:34 UTC
Created attachment 332197 [details]
Debug log with GST_DEBUG=6
Comment 3 Petros 2016-07-27 07:36:57 UTC
Created attachment 332198 [details]
Debug log with GST_DEBUG=6 ( part B )
Comment 4 Petros 2016-07-27 07:38:33 UTC
I had to break down the log file to be able to upload it. Apologies for that.

I am using 1.9.1.1 ( Basically master from last week ). I will get back with a backtrace from all threads.
Comment 5 Petros 2016-07-27 07:50:04 UTC
Created attachment 332204 [details]
Threads backtrace

This is as far as I can get before gdb quitting on me..
Comment 6 Sebastian Dröge (slomo) 2016-07-27 08:21:21 UTC
It might work better after installing debug symbols for libc6 and glib
Comment 7 Petros 2016-07-27 08:40:53 UTC
Debug symbols for libc6 are already installed. This does not seem to be the case for glib but apt is unable to locate and install libglib2.0-0-dbg on the RPi.
Comment 8 Vincent Penquerc'h 2016-08-05 09:40:10 UTC
This could be that some parts of the pipeline don't have quite enough buffering to allow for max interleaving.

Thread 10 (Thread 0x70dff3c0 (LWP 2736))

  • #0 syscall
    at ../ports/sysdeps/unix/sysv/linux/arm/syscall.S line 37
  • #1 g_cond_wait
    from /lib/arm-linux-gnueabihf/libglib-2.0.so.0
  • #2 gst_queue_chain_buffer_or_list
    at gstqueue.c line 1225
  • #3 gst_pad_chain_data_unchecked
    at gstpad.c line 4205

Comment 9 Patrick 2016-08-22 16:57:52 UTC

I'm experiencing the same bug with the latest gstreamer source code. 

For me I found a workaround to not completely stall the whole program by adding a timeout to gst_element_get_state. 

After the call timed out, the program continues and goes to PAUSE state just fine. 
Using this makes it work on the RPI but it's an asynchronous behavior and comes with other problems for me. 

By the way I'm using the same pipeline as Petros.
Comment 10 Patrick 2016-09-16 11:27:08 UTC

Hey all, 

just to add my findings on this bug on RPi and Jessie. 
I also saw that a similar bug was reported here: https://bugzilla.gnome.org/show_bug.cgi?id=770420

I'm also struggling since over a month to get it right. 
I'm using gstreamer 1.9.1 and gst-omx 1.9.1 uninstalled environment. 

I extensively tested the testegl example found in gst-omx repo and the bug never happened there. 

Then I was looking for a bug on the player implementation on our side and it looks like as soon as I use the provided GstSample from the appsink callback (just holding a pointer, with proper unrefing is enough ) it hangs sometime after playback. If I don't use the GstSample and just unref it in the callback. It runs forever. 

So since the only difference between testegl, our implementation (Cinder framework)and the other bug report (Openframewokrs) is, that testegl is not using appsink while the others do, I'm wondering if someone has a new clue and what could be the problem here. 


Thanks
Patrick
Comment 11 Petros 2016-09-16 11:50:29 UTC
For reference here you can find the player implementation ( work in progress )

https://github.com/PetrosKataras/Cinder/blob/gst-player-refactor-and-osx-support/src/cinder/linux/GstPlayer.cpp

Best,
Petros
Comment 12 Sebastian Dröge (slomo) 2018-05-07 15:50:45 UTC
It sounds like you're keeping a reference to the buffer for too long, essentially starving the gst-omx buffer pool. You need to make sure that this never happens from the application side.