Hi,
I got a patch (see below) from Horst Dieter Lenk <lenk_at_mpi-muelheim.mpg.de>
which solves the problem. I've applied it and all is well now. No more CPU
time eating by sshd2.
So thanks to Horst Dieter for supplying the patch. I've also forwarded it
to the SSH folks and hope that this is included in the next version.
Tom
---------- Forwarded message ----------
Date: Wed, 31 Oct 2001 09:19:54 +0100 (MET)
From: Horst Dieter Lenk <lenk_at_mpi-muelheim.mpg.de>
To: Thomas Leitner <tom_at_radar.tu-graz.ac.at>
Subject: Re: SSH 3.0.1 on Tru64 4.0f eats 100% cpu time ..
Hi,
I had the same problem with Tru64 5.1.
I modified the file
ssh-3.0.1/lib/sshutil/ssheloop/sshunixeloop.c
If found that the timeout value is always 0 so the
loop never sleeps to wait for a timeout.
at line 909:
Boolean done_something;
fd_set readfds, writefds;
int nhdl = 0; /* HDL */
#ifdef HAVE_SIGNAL
sigset_t old_set;
#endif /* HAVE_SIGNAL */
and at line 1044
else
usec = usec - current_time.tv_usec;
}
if (sec == 0 && usec == 0) { /* HDL */
nhdl++;
if (nhdl >= 10) sec = 1;
}
else {
nhdl = 0;
} /* HDL */
select_timeout.tv_sec = sec;
select_timeout.tv_usec = usec;
ssh_eloop_event_rec.select_timeout_ptr = &select_timeout;
SSH_DEBUG(8, ("Select timeout: %ld seconds, %ld usec.",
ssh_eloop_event_rec.select_timeout_ptr->tv_sec,
ssh_eloop_event_rec.select_timeout_ptr->tv_usec));
}
}
/* Choose the file descriptors to be selected. */
FD_ZERO(&readfds);
This solution solves the endless loop. I have not searched in the code
to find why the timeout values are always zero.
Regards
Received on Wed Oct 31 2001 - 13:09:25 NZDT