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

Handle select errors. #64

Closed
ArtemGr opened this issue Aug 28, 2012 · 3 comments
Closed

Handle select errors. #64

ArtemGr opened this issue Aug 28, 2012 · 3 comments
Labels

Comments

@ArtemGr
Copy link
Contributor

ArtemGr commented Aug 28, 2012

I have found the hard way that libcppa calls exit from middleman.cpp:

    int sresult;
    do {
        sresult = select(maxfd + 1, &rdset, wrset_ptr, nullptr, nullptr);
        if (sresult < 0) {
            CPPA_CRITICAL("select() failed");
        }
    }
    while (sresult == 0);

I think select errors should be handled gracefully and explained with "strerror".

(It's a blocker, I can't use libcppa as long as it calls exit instead of handling errros.
AFAIK, it is even normal for select to exit with EINTR).

@Neverlord
Copy link
Member

Sorry for the inconvenience! At least EINTR really has to be caught. The issue should be fixed in the unstable branch (see the related commit), so you can hopefully go on using libcppa by switching to do the unstable branch until 0.4.2 releases. After the patch, the middleman is calling exit only for really serious errors like invalid error codes or integer overflows on socket descriptors.

@ArtemGr
Copy link
Contributor Author

ArtemGr commented Aug 28, 2012

Thanks a lot!

28.08.2012 22:19 ÐÏÌØÚÏ×ÁÔÅÌØ "Dominik Charousset" notifications@github.com
ÎÁÐÉÓÁÌ:

Sorry for the inconvenience! At least EINTR really has to be caught. The
issue should be fixed in the unstable branch (see the related commit), so
you can hopefully go on using libcppa by switching to do the unstable
branch until 0.4.2 releases. After the patch, the middleman is calling exit
only for really serious errors like invalid error codes or integer
overflows on socket descriptors.

Reply to this email directly or view it on
GitHubhttps://github.com//issues/64#issuecomment-8103690.

@mavam
Copy link
Collaborator

mavam commented Aug 31, 2012

Just for the record: I experienced this bug as well when facing high message loads. Thankfully it's resolved.

Neverlord added a commit that referenced this issue Apr 21, 2022
Fix bug in tcp_stream_socket
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

3 participants