Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Randomly can't su or logout? help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fryguy
n00b
n00b


Joined: 25 Apr 2003
Posts: 32

PostPosted: Mon May 26, 2003 8:06 pm    Post subject: Randomly can't su or logout? help Reply with quote

Well I've got a pretty basic gentoo install, gaming-sources with nvidia. X 4.3, etc etc.

Sometimes (seems to happen pretty randomly), I won't be able to su, I'll type su and then the password, and it'll just hang. I can ctrl-c back, but I can't get a root shell (really kick me in the butt once because I had no root shells anywhere and basically had to restart.)

Today it happened to me again (after gaming with counter-strike), and I also noticed that I couldn't logout (I was trying to clear out my running programs list to see if there were any programs that could be causing this. I suspected pam, so I re-emerged it, but no luck. I'd actually prefer that pam not be installed, since I dont' really have a use for it, but ehh.

I'm about to add -pam to my USE variable and "emerge -e world" and just rebuild my system.

Any thoughts?
Back to top
View user's profile Send private message
xi
n00b
n00b


Joined: 26 Jan 2003
Posts: 37

PostPosted: Wed May 28, 2003 3:35 pm    Post subject: Reply with quote

if you use metalog try to disable the buffer.
(METALOG_OPTS="-B -s" in /etc/conf.d/metalog)
Back to top
View user's profile Send private message
dmmgentoo
n00b
n00b


Joined: 16 Jun 2002
Posts: 38

PostPosted: Mon Feb 16, 2004 4:07 pm    Post subject: Re: Randomly can't su or logout? help Reply with quote

Fryguy wrote:
Well I've got a pretty basic gentoo install, gaming-sources with nvidia. X 4.3, etc etc.

Sometimes (seems to happen pretty randomly), I won't be able to su, I'll type su and then the password, and it'll just hang. I can ctrl-c back, but I can't get a root shell (really kick me in the butt once because I had no root shells anywhere and basically had to restart.)

Today it happened to me again (after gaming with counter-strike), and I also noticed that I couldn't logout (I was trying to clear out my running programs list to see if there were any programs that could be causing this. I suspected pam, so I re-emerged it, but no luck. I'd actually prefer that pam not be installed, since I dont' really have a use for it, but ehh.

I'm about to add -pam to my USE variable and "emerge -e world" and just rebuild my system.

Any thoughts?


Well, I've been seeing the exact behavior when using metalog, but not only with su. I've been trying to figure out what in the heck was causing this, when someone suggested metalog/buffering. My guesses were pam or agetty. I was almost sure agetty was causing the problems. Basically, when I tried to logout, I'd get the hang. Or, when logging in as ANY user, after entering username/passwd, there'd be the infinite hang. Also, ssh was affected as well... I'd try ssh'ing to my Gentoo box, and I'd get the infinite hang after entering my username/password. ssh -T "command" would hang as well. Thanks to "xi" for the suggestion on disabling metalog's buffering.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Mon Feb 16, 2004 5:12 pm    Post subject: Reply with quote

What kind of hang happens? If you mean that just the terminal window isn't doing anything after you type "su" and enter your password to password prompt, then something could have messed up your terminal. Command "reset" resets your terminal window settings and after that su should work. Same for logout.

If I understood you wrong and things actually freeze and not just pretend to do so, please check that you don't have a daemon called nscd (Name Service Cache Daemon) hanging around. Usually it's all stable and nice, but if it decides to get nasty, unsuccessful, indefinitely hanging logins are expected to happen. Removing /var/run/.nscd_socket and /var/run/nscd.pid makes everything working in case of borked nscd.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
dmmgentoo
n00b
n00b


Joined: 16 Jun 2002
Posts: 38

PostPosted: Mon Feb 16, 2004 5:25 pm    Post subject: Reply with quote

Janne Pikkarainen wrote:
What kind of hang happens? If you mean that just the terminal window isn't doing anything after you type "su" and enter your password to password prompt, then something could have messed up your terminal. Command "reset" resets your terminal window settings and after that su should work. Same for logout.

If I understood you wrong and things actually freeze and not just pretend to do so, please check that you don't have a daemon called nscd (Name Service Cache Daemon) hanging around. Usually it's all stable and nice, but if it decides to get nasty, unsuccessful, indefinitely hanging logins are expected to happen. Removing /var/run/.nscd_socket and /var/run/nscd.pid makes everything working in case of borked nscd.


I just disabled buffering in metalog, and all is back to normal. When I left buffering on in metalog, and I started any name service daemon, be it dnsmasq or named (from BIND), I experienced the login hangs I wrote about. So, it was a nasty interaction of metalog buffering, pam, and [insert name service daemon here]. By disabling metalog buffering, I seem to have removed the catalyst for the hangs.
Back to top
View user's profile Send private message
dmmgentoo
n00b
n00b


Joined: 16 Jun 2002
Posts: 38

PostPosted: Mon Feb 16, 2004 5:44 pm    Post subject: Reply with quote

Update: Still getting the su/login hangs. For example, recently I did:

$ su
password:
[hang]

After I killed metalog, the hang stopped, and I saw

root@daemonstar /home/dmmiller #

Weird. I suppose it's OK to do without any syslog daemon? I'm going to unmerge metalog, and try another.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Mon Feb 16, 2004 5:45 pm    Post subject: Reply with quote

Yeah, your Linux can happily live without a syslog daemon if you don't need logs. :) Go ahead and switch to another syslogd.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
HomerSimpson
l33t
l33t


Joined: 25 Jan 2003
Posts: 869
Location: Ohio, USA

PostPosted: Tue Feb 17, 2004 12:28 am    Post subject: Reply with quote

xi wrote:
if you use metalog try to disable the buffer.
(METALOG_OPTS="-B -s" in /etc/conf.d/metalog)


This is what it says in my /etc/conf.d/metalog:
Quote:
# If you are using metalog 0.6, buffering is on by default.
# Add '-s' if you dont want buffering. (See things realtime)

# If you are using metalog 0.7+, buffering is now off by default.
# Add '-a' if you want buffering.


Code:
emerge -p metalog
 
These are the packages that I would merge, in order:
 
Calculating dependencies ...done!
[ebuild   R   ] app-admin/metalog-0.7-r1


So mine is already off by default? I have had this same problem as the others but it always happened when I had an shfs mount. I stopped using shfs and the problem went away. After reading this thread I added the -s to my options and resatarted metalog. Within a few hours the problem occurred but this time without having an shfs mount. This is strange since comments in the metalog conf file indicate that the -s is redundant but now it still happens. I think it is time to switch loggers.


One last question... How does a logger render the system useless? I really like using GNU/Linux but that is not good.

I am thankful to dmmgentoo for pointing me to this thread and thanks xi for the good information.
_________________
The strong must protect the Sweet.
Back to top
View user's profile Send private message
dmmgentoo
n00b
n00b


Joined: 16 Jun 2002
Posts: 38

PostPosted: Tue Feb 17, 2004 1:47 am    Post subject: Reply with quote

HomerSimpson wrote:

One last question... How does a logger render the system useless? I really like using GNU/Linux but that is not good.

I am thankful to dmmgentoo for pointing me to this thread and thanks xi for the good information.


Well, I think that metalog and perhaps a few other daemons probably aggravate a bug in the 2.6.1 kernel. It probably has something to do with race conditions. I switched to sysklogd in the meantime. I'll see how that works out. I should point out that I'm using the 2.6.1 kernel.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum