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

Connection closed with RX socket error 9 #149

Open
mdavidsaver opened this issue Jul 3, 2019 · 2 comments
Open

Connection closed with RX socket error 9 #149

mdavidsaver opened this issue Jul 3, 2019 · 2 comments
Assignees
Labels

Comments

@mdavidsaver
Copy link
Member

@hhslepicka reports a side-effect of #144 in the form of Connection closed with RX socket error 9. Error 9 is EBADF, which previously was treated the same as normal connection end. So it looks like there is a race during TCP connection shutdown. This has potentially nasty consequences as FDs can be reused quickly.

} else {
// some other (fatal) error
errlogPrintf("%s : Connection closed with RX socket error %d\n", _socketName.c_str(), err);
return -1;

@mdavidsaver
Copy link
Member Author

The results of epics-base/epics-base#30 suggest that an interrupted recv() should return 0. However, given that a interrupted recvfrom() can return EBADF it isn't certain that there is an actual race here.

@mdavidsaver
Copy link
Member Author

While not a fix, a22f866 should hide this message if it occurs during connection shutdown. It appears that some interrupted calls on OSX return EBADF (which I guess is true after close()).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant