From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020826 Description of problem: When exiting the telnet session (by closing the terminal and NOT typing exit) if there are any child processes running in the background, they become session zombies and eat up 100% of the processor. If exit is typed, this does not occur, if SSH is used, this does not occur. This occurs on a RH8 server as well. Cannot use SSH, customer base too large to retrain to type exit. Tried freshen install of telnet-server, got latest util-linux, did up2date on all packages and problem still exists. Version-Release number of selected component (if applicable): default version of telnet-server, updated util-linux-2.11z How reproducible: Always Steps to Reproduce: 1.open telnet to a RH7.2 server 2.start jobs/processes 3.close terminal by closing terminal, not exit 4.run top to see CPU get eaten up Actual Results: CPU goes to 100% within a few minutes. Expected Results: Child processes get SIGHUP and die a graceful death. Additional info:
ok, here is the problem: - telnetd exits - kernel sends SIGHUP to terminal sessions leader - login has forked itsself because of PAM - the parent login process ignores SIGHUP - the child login (now bash) does not get SIGHUP --> login and bash stay alive after telnetd exists problem is in util-linux-2.11n-5 login.c(1135): } else if (childPid) { /* parent - wait for child to finish, then cleanup session */ /* ioctl(0, TIOCNOTTY, NULL); */ signal(SIGHUP, SIG_IGN); signal(SIGINT, SIG_IGN); signal(SIGQUIT, SIG_IGN); signal(SIGTERM, SIG_IGN); wait(NULL); PAM_END; exit(0); } solution: - catch the signal and kill(childPid, SIGHUP) - or make the child the session leader (setsid()) As per #54741, this is fixed in util-linux-2.11n-8 *** This bug has been marked as a duplicate of 59029 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.