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 612406 - [PATCH] rtspsrc: Race condition
[PATCH] rtspsrc: Race condition
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.16
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-10 10:43 UTC by Anders Skargren
Modified: 2013-06-25 12:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer log showing the race condition and abort. (10.84 KB, application/octet-stream)
2010-03-10 10:43 UTC, Anders Skargren
  Details
Patch for rtspsrc (4.05 KB, patch)
2010-03-30 14:28 UTC, Anders Skargren
none Details | Review
Another problem still remains; log excerpt (10.83 KB, text/plain)
2010-03-30 14:40 UTC, Anders Skargren
  Details

Description Anders Skargren 2010-03-10 10:43:23 UTC
Created attachment 155720 [details]
gstreamer log showing the race condition and abort.

There is a race condition in rtspsrc in conjunction with using the timeout property and changing the state of the element to NULL.

Attaching a gstreamer log showing an abort cause by this.
In this log the rtspsrc is set to receive data over multicast with a timeout of 10 seconds. Due to a router on the way not letting the multicast traffic pass it times out (timestamp 0:00:31.145568704).

Hence the rtspsrc begins shutting down.

Very soone afterwards, our controlling application who has set up a similar timeout of 10 seconds times out and gets scheduled before the rtspsrc is done(at 0:00:31.196563630). It then sets the pipeline to NULL in the call to media_streamer_disconnect_nolock().

This seems to trigger a parallel state change on rtspsrc and confuses it completely, ending with the Gstreamer-CRITICAL.

rtspsrc doesnt seem MT safe...
Comment 1 Anders Skargren 2010-03-30 14:28:15 UTC
Created attachment 157491 [details] [review]
Patch for rtspsrc

Attaching a patch that fixes this problem for us. Contains both a few changes suggested by Wim Taymans and some changes for this special case.

Patch is only tested in our environment.
Comment 2 Anders Skargren 2010-03-30 14:40:42 UTC
Created attachment 157494 [details]
Another problem still remains; log excerpt

Above patch didnt fix everything. Got this crash after a while.
Still a race in there.
Comment 3 Sebastian Dröge (slomo) 2011-05-23 15:42:33 UTC
Wim? Are these patches good and do you have an idea how to fix the remaining race?
Comment 4 Tim-Philipp Müller 2012-10-26 20:07:58 UTC
Looks like at least parts of the patch may still apply (did not check log or if it's needed)
Comment 5 Wim Taymans 2012-11-16 14:54:37 UTC
Is this still a problem? many things changes, state changes are not done async etc..