LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-22-2005, 09:39 AM   #1
slice
LQ Newbie
 
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12

Rep: Reputation: 0
logout from console hangs


Hi, I have a server running RH9 (2.4.20-8smp). When I logout from console, I dont get the login prompt back.. I have used up all the alt login consoles

I can ssh to the machine, but I need to work from the console often. ps doesnt show any extra shell processes running, so its not the shell thats hanging.. Is there a way to get the login prompts back without rebooting?

Thanks in advance,
slice
 
Old 02-22-2005, 09:46 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

Do you have a .bash_logout in your homedir(s) which contains 'strange' things that could hang the logout process?
 
Old 02-22-2005, 09:58 AM   #3
slice
LQ Newbie
 
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12

Original Poster
Rep: Reputation: 0
Nope, all pretty standard stuff.. sourcing any of the *shrc files doesnt hang.. Plus I think if .bashrc was incorrect, exiting from ssh would have hung too, no? but ssh works fine.

slice
 
Old 02-22-2005, 10:08 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi again,

What do the inittab entries (the Xgetty lines) look like. Depending on which getty you use they should look something like this (using agetty):

1:2345:respawn:/sbin/agetty tty1 9600
.
.
6:2345:respawn:/sbin/agetty tty6 9600
 
Old 02-22-2005, 10:16 AM   #5
slice
LQ Newbie
 
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12

Original Poster
Rep: Reputation: 0
Hi druuna,

They look like

1:2345:respawn:/sbin/mingetty tty1
...
6:2345:respawn:/sbin/mingetty tty6

but there are no mingetty processes running.. Is it ok to manually respawn them??

slice
 
Old 02-22-2005, 10:30 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You only see these settings if nobody is logged in on the console (remote connections do not influence this). Here's an example with nobody on the console:

$ ps -ef | grep getty
root 217 1 0 11:53 tty1 00:00:00 /sbin/agetty tty1 9600
root 218 1 0 11:53 tty2 00:00:00 /sbin/agetty tty2 9600
root 219 1 0 11:53 tty3 00:00:00 /sbin/agetty tty3 9600
root 220 1 0 11:53 tty4 00:00:00 /sbin/agetty tty4 9600
root 221 1 0 11:53 tty5 00:00:00 /sbin/agetty tty5 9600
root 222 1 0 11:53 tty6 00:00:00 /sbin/agetty tty6 9600

Here's the same query with somebody at the console:

$ ps -ef | grep getty
root 218 1 0 11:53 tty2 00:00:00 /sbin/agetty tty2 9600
root 219 1 0 11:53 tty3 00:00:00 /sbin/agetty tty3 9600
root 220 1 0 11:53 tty4 00:00:00 /sbin/agetty tty4 9600
root 221 1 0 11:53 tty5 00:00:00 /sbin/agetty tty5 9600
root 222 1 0 11:53 tty6 00:00:00 /sbin/agetty tty6 9600

As you probably noticed, tty1 is 'missing'.

$ ps -ef | grep tty1
root 217 1 0 11:53 tty1 00:00:00 -bash

This is that entry, a bash shell is running on that tty.

If all of your tty's are active (although you tried to log off) you will not see any of the above mentioned 00:00:00 /sbin/agetty tty entries.

Maybe the following will give a clue about what is happening on your box:

$ ps -ef | grep tty[1-6]

You could end up with a (very) long list depending on what was started and how much was 'killed' during the log-off process. It should show you the proces(ses) that are hanging the respawn.

Also, try a init q, this will 'restart' init after it reads its 'config' (/etc/inittab).

Hope this gets you closer to a solution.
 
Old 02-22-2005, 11:09 AM   #7
slice
LQ Newbie
 
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12

Original Poster
Rep: Reputation: 0
Hi, Thanks for the explanation.. That clarifies things a lot.. But heres the deal.. I dont see any mingetty OR bash/tcsh processes running.. It probably means bash didnt exit correctly.. I tried "init q" too, doesnt seem to work..

[root@neumann ~]# ps -ef|grep tty
root 30865 30692 0 10:36 pts/4 00:00:00 grep tty

[root@neumann ~]# ps -ef | grep bash
root 32485 1 0 2004 ? 00:00:00 /bin/bash /etc/rc.d/rc 3


Any other ideas what I could try??

slice
 
Old 02-22-2005, 12:29 PM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

Still thinking about this one...... Interresting problem, although I wouldn't be surprised if the sollution will be found in some small thing.

Ok, I've got a few questions:

1) Do the logfiles show any related messages (mingetty and/or tty related and/or respawning to fast).

2) Can you start a tty by hand ($ /sbin/mingetty tty8) and log on to that tty? You should be able to log on once on that tty and get no prompt after logging out.
 
Old 02-22-2005, 02:07 PM   #9
slice
LQ Newbie
 
Registered: Aug 2004
Distribution: FC2, RH9, Suse, knoppix
Posts: 12

Original Poster
Rep: Reputation: 0
Hi, theres nothing strange in the logfiles either.. Cant start /sbin/mingetty tty8.. says operation not permitted in /var/log/messages.. I am at my wits end.. mebbe I shud just wait till the next scheduled reboot next month.. but its damn annoying not to have a shell on the console..

slice
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE hangs at logout patufet99 Linux - Newbie 3 12-04-2005 10:42 PM
Systems hangs on Logout from root. duffmckagan Debian 2 11-11-2005 05:31 AM
KDE hangs after logout (black sreen) Someone1977 Linux - Software 9 08-05-2005 09:10 AM
KDE 3.3.1 hangs on logout, only for root davidsrsb Slackware 10 12-08-2004 01:41 PM
Auto-logout on console switch cjpsparks Linux - General 2 11-20-2003 03:54 AM


All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration