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 765132 - rtsp-server crash after last client is disconnected when media is shared
rtsp-server crash after last client is disconnected when media is shared
Status: RESOLVED DUPLICATE of bug 764744
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
1.8.0
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-16 05:11 UTC by Aleix Conchillo Flaqué
Modified: 2016-04-16 09:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
enabled media share (761 bytes, patch)
2016-04-16 05:11 UTC, Aleix Conchillo Flaqué
rejected Details | Review

Description Aleix Conchillo Flaqué 2016-04-16 05:11:14 UTC
Created attachment 326147 [details] [review]
enabled media share

When the last client is disconnected when media is shared, a crash occurs. The attached patch modifies examples/test-launch.c to enable media share.

These is the gdb session:

(lt-test-launch:12678): GStreamer-CRITICAL **: 
Trying to dispose element udpsrc1, but it is in PLAYING (locked) instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.


Program received signal SIGTRAP, Trace/breakpoint trap.

Thread 140737196738304 (LWP 12686)

  • #0 _g_log_abort
    at gmessages.c line 324
  • #1 g_logv
    at gmessages.c line 1081
  • #2 g_log
    at gmessages.c line 1119
  • #3 g_object_unref
    at gobject.c line 3142
  • #4 gst_object_unref
    at gstobject.c line 282
  • #5 gst_bin_remove_func
    at gstbin.c line 1638
  • #6 gst_bin_remove
    at gstbin.c line 1700
  • #7 gst_bin_dispose
    at gstbin.c line 527
  • #8 g_object_unref
    at gobject.c line 3142
  • #9 gst_object_unref
    at gstobject.c line 282
  • #10 gst_rtsp_media_finalize
    at rtsp-media.c line 438
  • #11 g_object_unref
    at gobject.c line 3179
  • #12 g_source_callback_unref
    at gmain.c line 1561
  • #13 g_main_dispatch
    at gmain.c line 3161
  • #14 g_main_context_dispatch
    at gmain.c line 3769
  • #15 g_main_context_iterate
    at gmain.c line 3840
  • #16 g_main_loop_run
    at gmain.c line 4034
  • #17 do_loop
    at rtsp-thread-pool.c line 329
  • #18 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #19 g_thread_proxy
    at gthread.c line 778
  • #20 start_thread
    at pthread_create.c line 333
  • #21 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 109

Comment 1 Aleix Conchillo Flaqué 2016-04-16 05:44:33 UTC
This is the offending commit:

https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/commit/?id=f62a9a7eb9fda096fb88c013d6787c28090037a2
Comment 2 Aleix Conchillo Flaqué 2016-04-16 06:48:26 UTC
I believe the problem is that because the media is shared, new udpsrc ports are allocated in the same stream:

https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/gst/rtsp-server/rtsp-stream.c#n1514

Then, when we leave the bin we are only setting the NULL state to udpsrc_v4[0] and udpsrc_v4[1].

https://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/gst/rtsp-server/rtsp-stream.c#n2938

But unfortunately we have lost the reference to the previous ones when the media is shared and there already was a first client

Before this patch I believe we were keeping a list of all the transports.
Comment 3 Sebastian Dröge (slomo) 2016-04-16 09:04:32 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 764744 ***