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

Bug#3190: rlogin takes far too long when remote says Connection Refused



Ian Jackson wrote:
> Package: netstd
> Version: 2.03-1
>
> -chiark:~> time rlogin myrddin -l ijackson
> myrddin.chu.cam.ac.uk: Connection refused
> Command had non-zero exit status 1
> 0.03user 0.01system 0:31.06elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (80major+27minor)pagefaults 0swaps
> You have new mail in /usr/spool/mail/ian
> -chiark:junk> time telnet myrddin login
> Trying 131.111.131.23...
> telnet: Unable to connect to remote host: Connection refused
> Command had non-zero exit status 1
> 0.05user 0.01system 0:00.11elapsed 50%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (105major+37minor)pagefaults 0swaps
> -chiark:~>
>
> Using strace I can see that it appears to be retrying the call !

I'll reassign the bug to libc5. inet/rcmd.c from libc5 uses the
following code which is causing the delay:

if (errno == ECONNREFUSED && timo <= 16) {
        sleep(timo);
        timo *= 2;
        continue;
}

You'll see the same behaviour with every program that uses the rcmd
library function (telnet doesn't use rcmd).

BTW: This is probably more a feature than a bug.


Thanks,

Peter

--
 Peter Tobias                                EMail:
 Fachhochschule Ostfriesland                 tobias@et-inf.fho-emden.de
 Fachbereich Elektrotechnik und Informatik   tobias@debian.org
 Constantiaplatz 4, 26723 Emden, Germany


Reply to: