Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP engine out_event aborts when sendto fails #3102

Closed
simias opened this issue May 14, 2018 · 1 comment
Closed

UDP engine out_event aborts when sendto fails #3102

simias opened this issue May 14, 2018 · 1 comment

Comments

@simias
Copy link
Contributor

simias commented May 14, 2018

Issue description

The current implementation of udp_engine triggers an assert when sendto fails. This makes it hard to recover from the error.

libzmq/src/udp_engine.cpp

Lines 392 to 403 in 6092431

#ifdef ZMQ_HAVE_WINDOWS
rc = sendto (fd, (const char *) out_buffer, (int) size, 0, out_address,
(int) out_addrlen);
wsa_assert (rc != SOCKET_ERROR);
#elif defined ZMQ_HAVE_VXWORKS
rc = sendto (fd, (caddr_t) out_buffer, size, 0,
(sockaddr *) out_address, (int) out_addrlen);
errno_assert (rc != -1);
#else
rc = sendto (fd, out_buffer, size, 0, out_address, out_addrlen);
errno_assert (rc != -1);
#endif

I'm not sure what's the proper way to address this issue given that out_event returns void.

Environment

  • libzmq version (commit hash if unreleased): current master (6092431)
  • OS: Any

Minimal test code / Steps to reproduce the issue

I'm having the issue when binding a multicast RADIO to an interface that doesn't have the link yet. It causes my python app to abort brutally.

What's the actual result? (include assertion message & call stack if applicable)

Abort

What's the expected result?

Return an error to let the calling code handle the situation

@simias simias changed the title UDP engine out_event aborts when sendo fails UDP engine out_event aborts when sendto fails May 14, 2018
@bluca
Copy link
Member

bluca commented May 14, 2018

I think this is the same as #2862 and yes it should get fixed

@simias simias closed this as completed May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants