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

Re: OpenSSH: cause of random kex_exchange_identification errors?



On 2022-06-14 19:17:01 +0100, Tim Woodall wrote:
[MaxStartups limit]
> In the case where I hit it it was a cron job starting an ssh connection
> from multiple machines - 'out of hours' where 'convenience' was more
> valuable than 'performance'.

Note that I get the errors at random times of the day and night,
with periods where the error occurs quite often and other periods
where I cannot reproduce it.

> I don't have any more suggestions, sorry. Do you know how unset_nonblock
> can fail?

The source from misc.c is

int
unset_nonblock(int fd)
{
        int val;

        val = fcntl(fd, F_GETFL);
        if (val < 0) {
                error("fcntl(%d, F_GETFL): %s", fd, strerror(errno));
                return (-1);
        }
        if (!(val & O_NONBLOCK)) {
                debug3("fd %d is not O_NONBLOCK", fd);
                return (0);
        }
        debug("fd %d clearing O_NONBLOCK", fd);
        val &= ~O_NONBLOCK;
        if (fcntl(fd, F_SETFL, val) == -1) {
                debug("fcntl(%d, F_SETFL, ~O_NONBLOCK): %s",
                    fd, strerror(errno));
                return (-1);
        }
        return (0);
}

Well, one should get at least a debug message. I had already told
that to the admins last week. But no such debug message appears,
even when the connection succeeds! I'll try to have more information
from the admins, in particular which debug lines they claim to see.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: