tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SOLVED: SSH 3.0.1 on Tru64 4.0f eats 100% cpu time ...
@ 2001-10-31 13:08 Thomas Leitner
  0 siblings, 0 replies; only message in thread
From: Thomas Leitner @ 2001-10-31 13:08 UTC (permalink / raw)
  To: tru64-unix-managers


Hi,

I got a patch (see below) from Horst Dieter Lenk <lenk@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@mpi-muelheim.mpg.de>
To: Thomas Leitner <tom@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-31 13:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-31 13:08 SOLVED: SSH 3.0.1 on Tru64 4.0f eats 100% cpu time Thomas Leitner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox