Menu

#6 Under stress test accept starts failing

open
None
5
2000-12-18
2000-12-18
No

We run Emu under stress tests under Linux and after a while the wait_for_new_connections starts failing.

The error codes are -28,24. The first one tells us that it is a problem with accept. The second one is mode details, from UNIX. We have to find out what this error code means.

We're basically getting a callback from select for this server socket, which normally means there's an incoming connection. However, when we try to accept, we get the error. Not sure what it going on.

Discussion

  • Nobody/Anonymous

    http://www.ecst.csuchico.edu/~beej/guide/net/man.cgi?select

    Under the following conditions, select() fails and sets errno to:

    [EBADF] One or more of the file descriptor sets specified
    a file descriptor that is not a valid open file
    descriptor.

    [EINTR] The select() function was interrupted before any
    of the selected events occurred and before the
    timeout interval expired. If SA_RESTART has been
    set for the interrupting signal, it is
    implementation-dependent whether select() restarts
    or returns with EINTR.

    [EINVAL] An invalid timeout interval was specified.

    [EINVAL] The nfds argument is less than 0, or greater than
    or equal to FD_SETSIZE.

    [EINVAL] One of the specified file descriptors refers o a
    STREAM or multiplexer that is linked (directly or
    indirectly) downstream from a multiplexer.

     
  • Nobody/Anonymous

    http://guma.ii.fmph.uniba.sk/linux/usr/src/linux/include/asm/errno.h.html

    12: #define EBADF 9 /* Bad file number */
    7: #define EINTR 4 /* Interrupted system call */
    25: #define EINVAL 22 /* Invalid argument */
    27: #define EMFILE 24 /* Too many open files */

    So, 24 is "too many open files". Are we leaking socket handles ?

     

Log in to post a comment.

MongoDB Logo MongoDB