GNOME Bugzilla – Bug 625618
[multiudpsink] socket_error_is_ignorable() can cause infinite loop
Last modified: 2014-05-21 12:29:48 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.
Created attachment 166797 [details] [review] Patch to add ECONNREFUSED test to socket_error_is_ignorable()
I don't understand, ECONNREFUSED is never returned by sendto() or sendmsg() so how could doing something with these return values fix anything?
Robert, can you elaborate on the question raised in comment #2?
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
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
[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
thanks for the answer. Reopening.
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
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 ?
Robert, Ping. So do we ignore the patch in this bug?
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
Sorry, I have been buried at work. This patch can safely be ignored.