lkml.org 
[lkml]   [1999]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectNONBLOCKing close blocks in named

    If a socket file description has the O_NONBLOCK flag set, a close syscall
    should return almost straight away, right?

    named (both BIND 8.1.2 & 8.2.1) on one of our busier name servers has been
    ignoring requests for seconds to many minutes at a time on Linux servers
    running 2.0.38 and 2.2.5. After prolonged use of strace, I got the
    following sequence which shows what the process is doing before and after
    the problem (output of strace -T -ttt of named):

    937600279.547884 accept(25, {sin_family=AF_INET, sin_port=htons(2448), sin_addr=inet_addr("216.78.44.45")}, [16]) = 7 <0.000095>
    937600279.548260 getsockname(7, {sin_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("195.92.192.222")}, [16]) = 0 <0.000043>
    937600279.548579 setsockopt(7, SOL_SOCKET, SO_SNDBUF, [16384], 4) = 0 <0.000047>
    937600279.548856 setsockopt(7, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0 <0.000043>
    937600279.549089 fcntl(7, F_GETFL) = 0x2 (flags O_RDWR) <0.000042>
    937600279.549414 fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK) = 0 <0.000039>
    937600279.549663 getsockopt(7, IPPROTO_IP4, [775048], [0]) = 0 <0.000047>
    937600279.550180 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000038>
    937600279.558834 readv(7, [{"\0\212", 2}], 1) = 2 <0.000056>
    937600279.559140 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.559662 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.561094 readv(7, [{"o\240\0\0\0\1\0\1\0\0\0\0\016979"..., 138}], 1) = 138 <0.000060>
    937600279.561482 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.564056 write(7, "\0\fo\240\200\1\0\0\0\0\0\0\0\0", 14) = 14 <0.000116>
    937600279.564462 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.564715 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.768689 readv(7, [{"\0\212", 2}], 1) = 0 <0.000059>
    937600279.768999 fcntl(7, F_GETFL) = 0x4002 (flags O_RDWR|O_NONBLOCK) <0.000039>
    937600279.769524 close(7) = 0 <712.710003>
    937600992.479917 gettimeofday({937600992, 479996}, NULL) = 0 <0.000038>

    FD 7 has the NONBLOCK flag set but the close takes almost 12 minutes to
    return. This doesn't seem right and, of course, for these 12 minutes BIND
    isn't responding?

    Is this a BIND bug, a kernel bug or something else. All help or advice
    welcome,

    Steve Clarke


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:54    [W:0.021 / U:32.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site