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 313136 - [playbin] hang while playing truncated ogg file
[playbin] hang while playing truncated ogg file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: High critical
: 0.10.6
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-10 16:31 UTC by Chu Tan
Modified: 2006-04-11 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
I truncated the file after tag "genre" (256 bytes, application/ogg)
2005-08-11 02:24 UTC, Chu Tan
Details
test9.ogg (4.00 KB, application/ogg)
2005-08-11 14:42 UTC, Chu Tan
Details

Description Chu Tan 2005-08-10 16:31:02 UTC
Steps to reproduce:
1. Just add folder containing a truncated .ogg file.

Stack trace:
Program hangs.

Other information:
Comment 1 James "Doc" Livingston 2005-08-10 16:54:53 UTC
Playing a truncated ogg file works for me using both Rhythmbox 0.8.8, and 0.9.0
with gstreamer & gst-plugins 0.8.10.

What versions of gstreamer/gst-plugins do you have? If possible can you attach a
small truncated file that doesn't work for you.
Comment 2 Chu Tan 2005-08-11 02:24:04 UTC
Created attachment 50550 [details]
I truncated the file after tag "genre"
Comment 3 Chu Tan 2005-08-11 02:27:13 UTC
Rename it to something with extension .ogg.

I'm running rhythmbox 0.8.8, gst & plugins 0.8.10
Comment 4 Chu Tan 2005-08-11 02:34:11 UTC
Sorry for the fragmented msg.

How to reproduce:

1. Download the attachment, put it in a folder, and rename it test.ogg
2. Start rhythm box
3. Add the folder
4. Add the same folder again
5. Note the bottom right status says "loading songs"
6. Try to quit the program, it'll crash.
Comment 5 James "Doc" Livingston 2005-08-11 10:16:52 UTC
For me Rhythmbox, Totem and gst-launch all refuse to play that file saying they
can't find a decoder for it (using gstreamer and gst-plugis 0.8.10). What
versions of gstreamer and gst-plugins do you have?
Comment 6 Chu Tan 2005-08-11 14:39:59 UTC
Rhythmbox 0.8.8 gstreamer 0.8.10 gst-plugins 0.8.10 libogg-1.1.2 (Part of
slackware 10.1 + dropline gnome 2.10 distribution).

top also shows rhythmbox consuming 99% CPU when it happens.

If I corrupt an ogg file by modifying some bits, it'll behave right. But if I
truncate the file shorter than offset 1000, this bug will show.

Here's another attachment.
Comment 7 Chu Tan 2005-08-11 14:42:18 UTC
Created attachment 50572 [details]
test9.ogg
Comment 8 James "Doc" Livingston 2005-08-12 07:20:42 UTC
That one given me the following when I attempt to use play it with gst-launch
(using playbin)

doc@alyrion$ gst-launch playbin uri=file:///tmp/test9.ogg

GStreamer-WARNING **: element internal_thread claimed state-change success,but
state didn't change to PLAYING. State is PAUSED (NONE_PENDING pending), fix the
element
ERROR: from element /playbin0: There were no decoders found to handle the
stream, you might need to install the corresponding plugins
ERROR: pipeline doesn't want to play.

(process:15501): GLib-GObject-WARNING **: invalid uninstantiatable type `(null)'
in cast to `GstObject'
Segmentation fault


Running "gst-launch -t gnomevfssrc location=file:///tmp/test9.ogg  ! decodebin !
fakesink" (which is what RB uses to load the metadata) finds the serial tag and
then ends normally.

Can you get a backtrace of when Rhythmbox hangs?
http://live.gnome.org/GettingTraces contains some instructions, all you need to
do is type Control-Z in the terminal to get it to drop into gdb when RB hangs.
Comment 9 Chu Tan 2005-08-13 16:46:10 UTC
I did the following : gdb rhythmbox , run , make it hang, ctrl-c on gdb, thread
apply all bt

OUTPUT:

Program received signal SIGINT, Interrupt.
[Switching to Thread 147465 (LWP 1686)]
0x40e679f3 in __pthread_sigsuspend () from /lib/libpthread.so.0
(gdb) thread apply all bt

Thread 11 (Thread 147465 (LWP 1686))

  • #0 __pthread_sigsuspend
    from /lib/libpthread.so.0
  • #1 __pthread_wait_for_restart_signal
    from /lib/libpthread.so.0
  • #2 pthread_cond_wait
    from /lib/libpthread.so.0
  • #3 gnome_vfs_ssl_to_socket
    from /usr/lib/libgnomevfs-2.so.0
  • #4 ??
  • #5 ??
  • #6 ??
  • #7 ??
    from /usr/lib/libglib-2.0.so.0
  • #8 ??
    from /usr/lib/libglib-2.0.so.0
  • #9 ??
    from /usr/lib/libglib-2.0.so.0
  • #10 TC_null_struct
  • #11 g_static_rw_lock_free
    from /usr/lib/libglib-2.0.so.0
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 uselocale
    from /lib/libc.so.6
  • #16 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #17 clone
    from /lib/libc.so.6

Thread 10 (Thread 131080 (LWP 1685))

  • #0 __pthread_sigsuspend
    from /lib/libpthread.so.0
  • #1 __pthread_wait_for_restart_signal
    from /lib/libpthread.so.0
  • #2 pthread_cond_wait
    from /lib/libpthread.so.0
  • #3 gnome_vfs_ssl_to_socket
    from /usr/lib/libgnomevfs-2.so.0
  • #4 ??
  • #5 ??
  • #6 ??
  • #7 ??
    from /usr/lib/libglib-2.0.so.0
  • #8 ??
    from /usr/lib/libglib-2.0.so.0
  • #9 ??
    from /usr/lib/libglib-2.0.so.0
  • #10 TC_null_struct
  • #11 g_static_rw_lock_free
    from /usr/lib/libglib-2.0.so.0
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 uselocale
    from /lib/libc.so.6
  • #16 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #17 clone
    from /lib/libc.so.6

Thread 9 (Thread 114695 (LWP 1684))

  • #0 __pthread_sigsuspend
    from /lib/libpthread.so.0
  • #1 __pthread_wait_for_restart_signal
    from /lib/libpthread.so.0
  • #2 pthread_cond_wait
    from /lib/libpthread.so.0
  • #3 gnome_vfs_ssl_to_socket
    from /usr/lib/libgnomevfs-2.so.0
  • #4 ??
  • #5 ??
  • #6 ??
  • #7 ??
    from /usr/lib/libglib-2.0.so.0
  • #8 ??
    from /usr/lib/libglib-2.0.so.0
  • #9 ??
    from /usr/lib/libglib-2.0.so.0
  • #10 TC_null_struct
  • #11 g_static_rw_lock_free
    from /usr/lib/libglib-2.0.so.0
  • #12 ??
  • #13 ??
  • #14 ??
  • #15 uselocale
    from /lib/libc.so.6
  • #16 pthread_start_thread_event
    from /lib/libpthread.so.0
  • #17 clone
    from /lib/libc.so.6

Comment 10 James "Doc" Livingston 2005-08-17 04:22:07 UTC
That stack trace is odd. It contains several gnome_vfs_ssl_to_socket calls - is
the track you are trying to play on a remote system (over the network)? If so
does accessing that system usually require entering something in an
authentication dialog box?
Comment 11 Chu Tan 2005-08-17 16:19:30 UTC
It is located on my local reiserfs file system. Let me know if anything I can do
to help debug.
Comment 12 James "Doc" Livingston 2005-10-06 11:49:29 UTC
Okay, "gst-launch playbin uri=..." (using 0.8.11) spews lots of the following
errors when attempting to play the second attachment, until it is killed.

GStreamer-CRITICAL **: gst_bin_remove: assertion `GST_IS_ELEMENT (element)' failed
GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to
`GstElement'


"gst-launch gnomevfsfilesrc uri=... ! decodebin ! audioconvert ! audioscale !
gconfaudiosink" works cleanly though. This looks like a playbin bug, so I'm
moving it to gstreamer.
Comment 13 Andy Wingo 2005-10-11 15:57:44 UTC
Could be related to bug #111146.
Comment 14 Andy Wingo 2005-10-11 16:07:10 UTC
Actually, this doesn't work in HEAD either. Thanks for bringing the bug to our
attention.

The 0.8 size is close to unsolvable, given that RB uses threads. Luckily we
release the new one in a month and a half.
Comment 15 Andy Wingo 2006-01-13 18:20:49 UTC
Migrating to 0.10. Still doesn't play nicely.
Comment 16 Jan Schmidt 2006-02-10 00:21:47 UTC
In 0.10 at the moment, I get a really weird stacktrace with these 2 test files:

  • #14 gst_alsasink_finalise
    at gstalsasink.c line 154
  • #15 gst_alsasink_finalise
    at gstalsasink.c line 154
  • #16 g_object_unref
    from /usr/lib/libgobject-2.0.so.0
  • #17 gst_object_unref
    at gstobject.c line 414
  • #18 gst_message_finalize
    at gstmessage.c line 213
  • #19 gst_mini_object_unref
    at gstminiobject.c line 264
  • #20 gst_bus_set_flushing
    at gstbus.c line 444
  • #21 gst_pipeline_change_state
    at gstpipeline.c line 423
  • #22 gst_play_base_bin_change_state
    at gstplaybasebin.c line 1788
  • #23 gst_play_bin_change_state
    at gstplaybin.c line 1310
  • #24 gst_element_change_state
    at gstelement.c line 2171
  • #25 gst_element_set_state_func
    at gstelement.c line 2133
  • #26 gst_element_set_state
    at gstelement.c line 2043
  • #27 main
    at gst-launch.c line 693

This is pointing at an unsafe refcount handling bug. Probably in playbin somewhere, but it won't be fun to find it, I'm betting.
Comment 17 Julien MOUTTE 2006-03-06 22:54:07 UTC
gst-head dolphy@dell:~/workdir/gstreamer/gstreamer-head$ gst-launch-0.10 filesrc location=~/test.ogg ! oggdemux ! vorbisdec ! audioconvert ! alsasink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 1054000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

Seems to do the right thing for me in cvs HEAD. Can you still reproduce ?
Comment 18 Tim-Philipp Müller 2006-04-11 13:52:42 UTC
Both truncated files work for me with CVS HEAD as well now, so closing ...