This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 59438 - telnet client hangs if it inherits open file descriptors
telnet client hangs if it inherits open file descriptors
Status: CLOSED CANTFIX
Product: Red Hat Linux
Classification: Retired
Component: krb5 (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-07 18:16 EST by Eric Seppanen
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-10-18 13:32:08 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eric Seppanen 2002-02-07 18:16:49 EST
Description of Problem:
The kerberos-aware telnet client hangs just after connecting, if for some reason
it inherited a bunch of file descriptors from parent processes.

Version-Release number of selected component (if applicable):
krb5-workstation-1.2.2-13 (RH7.2, and earlier; reproduced on RH6.2)

How Reproducible:
Fairly easy to reproduce, but since this depends on parent processes leaking
file descriptors (a bug in itself), it's not terribly likely unless you get bit
by bug 59437 (nss_ldap leaks file descriptors).

Steps to Reproduce:
Method A: run nss_ldap as documented in bug 59437, then spawn enough shells that
you've leaked 15 or so file descriptors, then try to telnet to anything.
Method B: run this fd-leaking program, and then from the shell spawned, try to
telnet to anything.

***** fdopen.c : fd-leaking test program *****
/* usage: fdopen /bin/bash */
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>

char* dummy[]= { NULL };

int main(int argc, char* argv[])
{
  int ii;
  for (ii=0;ii<20;ii++) {
    open("/dev/null", O_RDWR);
  }
  if (argc == 2)
    execl(argv[1], argv[1], NULL);
  return 0;
}

***** end program *****
Actual Results:
[user@host user]$ telnet foo
Trying 138.141.50.43...
Connected to foo.example.com (138.141.50.43).
Escape character is '^]'.
*just hangs here*

Expected Results:
successful telnet session begins.

Additional Information:

Using strace, I can see that when telnet hangs it's because it's calling select
to wait for user input or socket i/o, but it neglects to place the file
descriptor for the freshly-opened socket in the fd set passed to "select".

I wish there was a prize for most effort tracking down the most obscure bug.
Comment 1 Bill Nottingham 2006-08-07 16:09:20 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Red Hat apologizes that these issues have not been resolved yet. We do
want to make sure that no important bugs slip through the cracks.
Please check if this issue is still present in a current Fedora Core
release. If so, please change the product and version to match, and
check the box indicating that the requested information has been
provided. Note that any bug still open against Red Hat Linux on will be
closed as 'CANTFIX' on September 30, 2006. Thanks again for your help.
Comment 2 Bill Nottingham 2006-10-18 13:32:08 EDT
Red Hat Linux is no longer supported by Red Hat, Inc. If you are still
running Red Hat Linux, you are strongly advised to upgrade to a
current Fedora Core release or Red Hat Enterprise Linux or comparable.
Some information on which option may be right for you is available at
http://www.redhat.com/rhel/migrate/redhatlinux/.

Closing as CANTFIX.

Note You need to log in before you can comment on or make changes to this bug.