Connection#send_datagram() destroys the socket if there is no network route for the given IP

11 views
Skip to first unread message

Iñaki Baz Castillo

unread,
Nov 4, 2011, 11:59:41 AM11/4/11
to eventm...@googlegroups.com
Hi, I've found an issue that is really critical for me. Hope there
could be an easy solution for it. The issue is reported here:

https://github.com/eventmachine/eventmachine/issues/276

Thanks a lot.


--
Iñaki Baz Castillo
<i...@aliax.net>

Iñaki Baz Castillo

unread,
Nov 5, 2011, 3:08:30 PM11/5/11
to eventm...@googlegroups.com
2011/11/4 Iñaki Baz Castillo <i...@aliax.net>:

> Hi, I've found an issue that is really critical for me. Hope there
> could be an easy solution for it. The issue is reported here:
>
>  https://github.com/eventmachine/eventmachine/issues/276

I've provided a code that reproduces the issue:

https://github.com/eventmachine/eventmachine/issues/276#issuecomment-2641869

Please, don't ignore this report, it's critical for me :(

Iñaki Baz Castillo

unread,
Nov 7, 2011, 9:17:08 AM11/7/11
to eventm...@googlegroups.com
2011/11/5 Iñaki Baz Castillo <i...@aliax.net>:

> 2011/11/4 Iñaki Baz Castillo <i...@aliax.net>:
>> Hi, I've found an issue that is really critical for me. Hope there
>> could be an easy solution for it. The issue is reported here:
>>
>>  https://github.com/eventmachine/eventmachine/issues/276
>
> I've provided a code that reproduces the issue:
>
>  https://github.com/eventmachine/eventmachine/issues/276#issuecomment-2641869
>
> Please, don't ignore this report, it's critical for me :(

I'd strongly appreciate any comment about this issue. Thanks.

James Tucker

unread,
Nov 7, 2011, 10:24:47 AM11/7/11
to eventm...@googlegroups.com

I've verified the issues, and will be happy to take a look at fixing it as soon as I have some time to do so. Until then, the best I can recommend is to rebind after unbind is called.

>
> --
> Iñaki Baz Castillo
> <i...@aliax.net>
>

> --
> You received this message because you are subscribed to the Google Groups "EventMachine" group.
> To post to this group, send email to eventm...@googlegroups.com.
> To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.
>

Iñaki Baz Castillo

unread,
Nov 7, 2011, 10:56:11 AM11/7/11
to eventm...@googlegroups.com
2011/11/7 James Tucker <jftu...@gmail.com>:

> I've verified the issues, and will be happy to take a look at fixing it as soon as I have some time to do so. Until then, the best I can recommend is to rebind after unbind is called.

Thanks a lot James, if you need anything from me please ask it.

BTW I've realized of the following:

ed.cpp
--------------------------------------
int DatagramDescriptor::SendOutboundDatagram (const char *data, int
length, const char *address, int port)
{
[...]

return length;
}
---------------------------------------

In the example code reproducing the issue, after the second call to
send_datagram (which tries to send it to 1.2.3.4) the above function
returns a proper integer with value 5. This is, the socket is
destroyed *later*.

Iñaki Baz Castillo

unread,
Feb 12, 2012, 2:46:34 PM2/12/12
to eventm...@googlegroups.com
2011/11/4 Iñaki Baz Castillo <i...@aliax.net>:
> Hi, I've found an issue that is really critical for me. Hope there
> could be an easy solution for it. The issue is reported here:
>
>  https://github.com/eventmachine/eventmachine/issues/276

This is fixed in https://github.com/eventmachine/eventmachine/pull/297
(thanks to cabo which has fixed LOT of issues related to IPv6 and
UDP).

The pull request includes an optional callback for the issue described
in #276 so the user can decide what to do (close the socket, notify it
and react, or just ignore and continue it alive).

Reply all
Reply to author
Forward
0 new messages