lkml.org 
[lkml]   [2008]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.25.3: su gets stuck for root
Vegard Nossum wrote:
> I think knowing the pgrps of the above processes (there is possibly
> one more involved, stty?) would be useful; try:
>
> $ ps -eo pid,pgrp,tpgid,user,args

OK, I performed this test again (getting the su to hang), and here is
the info:

tty_check_change: current->signal->tty = f7879800
tty_check_change: tty = f7879800
tty_check_change: tty->pgrp = f78639c0
tty->pgrp->count = 5
tty->pgrp->level = 0
tty->pgrp->numbers[0].nr = 7036
tty_check_change: task_pgrp(current) = f7863f00
task_pgrp(current)->count = 1
task_pgrp(current)->level = 0
task_pgrp(current)->numbers[0].nr = 7037
tty_check_change: kill_pgrp called; returning -ERESTARTSYS
set_termios: error return value (-512) from tty_check_change

scorpius ~ # ps aux | grep 7036
foo 7036 0.0 0.1 2336 1100 tty1 S+ 19:30 0:00 su foo

scorpius ~ # ps aux | grep 7037
foo 7037 0.0 0.1 2988 1460 tty1 S 19:30 0:00 bash

scorpius ~ # ps -eo pid,pgrp,tpgid,user,args | grep 7036
6902 6902 7036 root /bin/login --
6922 6922 7036 root -bash
7036 7036 7036 foo su foo
7037 7037 7036 foo bash
7042 7037 7036 foo stty -ixany

scorpius ~ # ps -eo pid,pgrp,tpgid,user,args | grep 7037
7037 7037 7036 foo bash
7042 7037 7036 foo stty -ixany

scorpius ~ # ps aux | grep 7042
foo 7042 0.0 0.0 1608 376 tty1 T 19:30 0:00 stty -ixany

scorpius ~ # ps -eo pid,pgrp,tpgid,user,args | grep 7042
7042 7037 7036 foo stty -ixany

(I omitted, of course, when grep found itself, and I compressed some
white space to allow lines to fit nicely in the email)

> ..as this problem occurs because a process tries to change the
> terminal settings (and subsequently gets suspended because of that)
> while it's not the owner of the terminal.
>
> This can happen if you fork something off to the background, e.g. like
>
> $ stty 9600 &
>
> (which should immediately give you [1]+ Stopped stty 9600),
>
> so can you please look for anything like that in your login scripts or
> shell rc files?

I do use stty in my .bashrc (that's why this happens), but I do not put
it in the background.

Anyway, hope the additional info above is of help...

Thanks, Joe


\
 
 \ /
  Last update: 2008-06-14 03:53    [W:0.102 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site