NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Finding bottlenecks on a proxy server



    Date:        Mon, 4 Mar 2019 15:42:05 +0000 (GMT)
    From:        Stephen Borrill <netbsd%precedence.co.uk@localhost>
    Message-ID:  <Pine.NEB.4.64.1903041429130.3448@ugly>

I would be looking into this:

  | dansguardian[11094]: Error 9 (Bad file descriptor) connecting to proxy 
  | 127.0.0.1:8123 by client 10.4.4.2

before anything else.   EBADF only ever results from bugs in the code
which is doing the operation - it indicates that the fd being passed to
some sys call (probably connect in this case) is invalid (which could mean
that it received -1 from socket() and did not check it, in which case
perhaps the system is running out of mbufs or something) or that it is
continuing to use a fd after it has been closed, or simply overwrote memory
somehow, and has a bad value where it thinks the fd is stored.

But EBADF never comes from anything some other process does - those can
cause EIO, SIGPIPE, all kinds of things, but not EBADF.

If you find out where the bad file descriptor is originating (that is,
not just the call which uses it - but where the invalid fd came from)
you might have a good clue as to the source of the overall problem.

kre



Home | Main Index | Thread Index | Old Index