Menu

epoll_wait always returning with "non-blocking call failure"

ganes
2013-11-21
2013-12-03
  • ganes

    ganes - 2013-11-21

    Dear Friends,

    We are using udt package (udt-4.11-1.fc14.x86_64) for our (C++) application on Centos (release 6.4, x86_64).

    UDT::epoll_wait(m_epoll, &readSocks, NULL, 60000, NULL, NULL);

    This epoll_wait call (after 60000 ms) always returns "non-blocking call failure" error.

    Do I need to upgrade the udt version that I am using? Or can this be because of socket options? This happens when there are no connections received on listening socket.

    Please help, how to resolve this issue in our application.

    many thanks for your help.

    Regards
    ganeshan

     
    • obein henry

      obein henry - 2013-12-03

      Hello Ganes,

      I faced the same issue today trying to use epoll_wait API.
      I found that the documentation has not been updated in the revision 1.18.
      commit: "fix UDT_SNDTIMEO/UDT_RCVTIMEO error code."

      In this commit, instead of returning 0 if a timeout occurs, the function throws an Exception.

      As a consequence, to handle epoll_wait timeout, you have to
      check if the returned value is -1 and the last error code is CUDTException::ETIMEOUT using UDT::getlasterror().getErrorCode().

      I hope it will fix your problem.

      Regards,
      Henry

       

Log in to post a comment.