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 625618 - [multiudpsink] socket_error_is_ignorable() can cause infinite loop
[multiudpsink] socket_error_is_ignorable() can cause infinite loop
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal major
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-07-29 20:47 UTC by Robert Krakora
Modified: 2014-05-21 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add ECONNREFUSED test to socket_error_is_ignorable() (580 bytes, patch)
2010-07-29 20:48 UTC, Robert Krakora
none Details | Review

Description Robert Krakora 2010-07-29 20:47:35 UTC
socket_error_is_ignorable() can cause infinite loop in gstmultiudpsink.c
if RTSP client connection is lost and EOS is sent to pipeline for
gst-rtsp-server.  The remedy is to add ECONNREFUSED to the
conditional.
Comment 1 Robert Krakora 2010-07-29 20:48:57 UTC
Created attachment 166797 [details] [review]
Patch to add ECONNREFUSED test to socket_error_is_ignorable()
Comment 2 Wim Taymans 2011-01-03 17:18:38 UTC
I don't understand, ECONNREFUSED is never returned by sendto() or sendmsg() so how could doing something with these return values fix anything?
Comment 3 Tobias Mueller 2011-03-16 09:26:28 UTC
Robert, can you elaborate on the question raised in comment #2?
Comment 4 Robert Krakora 2011-03-16 11:54:56 UTC
Hi Wim & Tobias,

sendto() and sendmsg() certainly do return ECONNREFUSED (error 61).  It is largely undocumented for Linux and was not documented for the longest time for BSD, but both functions do return the error.  I would not have supplied a patch unless I had seen a error 61 returned by sendmsg().

Documented for other BSD OSes:
http://www.gsp.com/cgi-bin/man.cgi?section=2&topic=sendmsg
http://resin.csoft.net/cgi-bin/man.cgi?section=2&topic=sendmsg

Link from 2001 requesting ECONNREFUSED (error 61) be documented for BSD:
http://markmail.org/message/fjojurqx4mef6dbo

Best Regards,

Rob Krakora

rob.krakora@technicolor.com
Comment 5 Robert Krakora 2011-03-16 12:06:13 UTC
The distro that I found this on was CentOS 5.5 with a flavor of the 2.6.18 RedHat kernel that comes with the distro.  Maybe ECONNRESET should also be tested?

Best Regards,

Rob Krakora

rob.krakora@technicolor.com
Comment 6 Robert Krakora 2011-03-16 12:16:48 UTC
[ECONNREFUSED] 
The socket received an ICMP destination unreachable message from the last message sent. This typically means that the receiver is not listening on the remote port.

Best Regards,

Rob Krakora

rob.krakora@technicolor.com
Comment 7 Tobias Mueller 2011-03-16 12:29:07 UTC
thanks for the answer. Reopening.
Comment 8 Robert Krakora 2011-03-17 12:30:03 UTC
Hi Tobias,

I cannot comment as to whether ECONNREFUSED is still returned by send() and sendmsg() on later kernels as we strictly use only Red Hat Enterprise kernels which, until REL6, were a flavor of 2.6.18.  However, this error return value went undocumented in Free BSD for years in regards to send() and sendmsg().

Best Regards,

Rob Krakora

rob.krakora@technicolor.com
Comment 9 Tim-Philipp Müller 2012-10-26 22:44:17 UTC
Sorry, I know it's been a while, but the code has been ported from custom socket handling to GLib/GIO's socket API.

Is this still an issue with 1.0.x ?
Comment 10 Tobias Mueller 2013-03-20 12:52:23 UTC
Robert, Ping.

So do we ignore the patch in this bug?
Comment 11 Robert Krakora 2013-03-20 13:08:17 UTC
Hi Tobias,

Let me take a look at the GLib/GIO source and I will see whether or not there is a possibility that this issue may still exist.  I will get back with you by tomorrow AM.

Best Regards,

Rob
Comment 12 Robert Krakora 2014-05-21 12:29:48 UTC
Sorry, I have been buried at work.  This patch can safely be ignored.