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 439255 - [rtspsrc] crash on unsupported transport
[rtspsrc] crash on unsupported transport
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: High critical
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-17 18:40 UTC by jeff
Modified: 2007-05-18 13:28 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description jeff 2007-05-17 18:40:58 UTC
Version: 2.19.0

What were you doing when the application crashed?
Trying to listen to audio stream from my local public radio station. URL is:

rtsp://129.186.60.6:554/encoder/woi-am.rm



Distribution: Fedora Core release 6 (Zod)
Gnome Release: 2.16.3 2007-01-31 (Red Hat, Inc)
BugBuddy Version: 2.16.0

System: Linux 2.6.20-1.2948.fc6 #1 SMP Fri Apr 27 19:48:40 EDT 2007 i686
X Vendor: The X.Org Foundation
X Vendor Release: 70101000
Selinux: No
Accessibility: Disabled

Memory status: size: 112062464 vsize: 0 resident: 112062464 share: 0 rss: 24809472 rss_rlim: 0
CPU usage: start_time: 1179427194 rtime: 0 utime: 74 stime: 0 cutime:69 cstime: 0 timeout: 5 it_real_value: 0 frequency: 29

Backtrace was generated from '/usr/bin/totem'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1209095760 (LWP 9622)]
[New Thread -1254925424 (LWP 9624)]
0x00c17402 in __kernel_vsyscall ()

Thread 1 (Thread -1209095760 (LWP 9622))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 __kernel_vsyscall
  • #5 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #6 *__GI_abort
    at abort.c line 88
  • #7 __libc_message
    at ../sysdeps/unix/sysv/linux/libc_fatal.c line 170
  • #8 *__GI___libc_free
    at malloc.c line 5758
  • #9 g_free
    from /lib/libglib-2.0.so.0
  • #10 rtsp_transport_init
    at rtsptransport.c line 133
  • #11 gst_rtspsrc_setup_streams
    at gstrtspsrc.c line 3203
  • #12 gst_rtspsrc_open
    at gstrtspsrc.c line 3393
  • #13 gst_rtspsrc_change_state
    at gstrtspsrc.c line 3915
  • #14 gst_element_change_state
    at gstelement.c line 2362
  • #15 gst_element_continue_state
    at gstelement.c line 2077
  • #16 gst_element_change_state
    at gstelement.c line 2399
  • #17 gst_element_set_state_func
    at gstelement.c line 2312
  • #18 gst_element_set_state
    at gstelement.c line 2218
  • #19 gst_bin_change_state_func
    at gstbin.c line 1877
  • #20 gst_pipeline_change_state
    at gstpipeline.c line 504
  • #21 gst_play_base_bin_change_state
    at gstplaybasebin.c line 2563
  • #22 gst_play_bin_change_state
    at gstplaybin.c line 1805
  • #23 gst_element_change_state
    at gstelement.c line 2362
  • #24 gst_element_continue_state
    at gstelement.c line 2077
  • #25 gst_element_change_state
    at gstelement.c line 2399
  • #26 gst_element_set_state_func
    at gstelement.c line 2312
  • #27 gst_element_set_state
    at gstelement.c line 2218
  • #28 bacon_video_widget_open_with_subtitle
    at bacon-video-widget-gst-0.10.c line 2753
  • #29 totem_action_set_mrl_with_warning
    at totem.c line 1033
  • #30 totem_action_set_mrl
    at totem.c line 1095
  • #31 totem_action_set_mrl_and_play
    at totem.c line 413
  • #32 totem_action_play_pause
    at totem.c line 571
  • #33 main
    at totem.c line 3565
  • #0 __kernel_vsyscall


----------- .xsession-errors (208 sec old) ---------------------
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
(evolution:3904): camel-WARNING **: camel_exception_get_id called with NULL parameter.
--------------------------------------------------
Comment 1 jeff 2007-05-17 19:11:52 UTC
Compiled latest version of totem from SVN and got a similar crash.
Comment 2 Bastien Nocera 2007-05-17 22:46:32 UTC
It's a crash in the RTSP plugin of GStreamer.
Comment 3 Tim-Philipp Müller 2007-05-18 12:00:13 UTC
Can reproduce. The bug still exists in GStreamer CVS. I know what the problem is, but I'm not entirely sure about the supposed logic of the code, so I'll better let Wim fix it.

In gst-plugins-good/gst/rtsp/gstrtspsrc.c, gst_rtspsrc_setup_streams():

    switch (code) {
      case RTSP_STS_OK:
        break;
      case RTSP_STS_UNSUPPORTED_TRANSPORT:
        /* cleanup of leftover transport */
        gst_rtspsrc_stream_free_udp (stream);
        goto next_stream;
      default:
        goto send_error;
    }

    /* parse response transport */
    {
      RTSPTransport transport = { 0 };

      ...

    next_stream:
      /* clean up our transport struct */
      rtsp_transport_init (&transport);
    }
  }

The 'goto next_stream' from the switch jumps directly into the parse block, where it'll try to clear the transport variable. However, because of the goto statement the transport variable has either not been cleared or not been allocated on the stack in the first place, so rtsp_transport_init() will try to free a garbage pointer when doing g_free(transport->foobar).

Also, I'm wondering if in the if() construction above next_stream there's a jump/continue/something missing.

Comment 4 Wim Taymans 2007-05-18 13:28:17 UTC
        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_streams):
        Don't crash when an unsupported transport error was returned by the
        server, just try to configure the next stream. Fixes #439255.