public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Peterson <joe@skyrush.com>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Alan Cox <alan@redhat.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	David Newall <davidn@davidnewall.com>, Willy Tarreau <w@1wt.eu>,
	Harald Dunkel <harald.dunkel@t-online.de>,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.25.3: su gets stuck for root
Date: Fri, 13 Jun 2008 19:49:57 -0600	[thread overview]
Message-ID: <485323C5.4030002@skyrush.com> (raw)
In-Reply-To: <19f34abd0806120452w433e9763v2ee92e2f278ae988@mail.gmail.com>

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

  reply	other threads:[~2008-06-14  1:50 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  1:31 2.6.25.3: su gets stuck for root Joe Peterson
2008-06-02  5:12 ` Harald Dunkel
2008-06-02  5:32   ` Willy Tarreau
2008-06-02  5:55     ` Joe Peterson
2008-06-02  8:10     ` Alan Cox
2008-06-02  9:01       ` David Newall
2008-06-02  9:20         ` Alan Cox
2008-06-02 10:16           ` Vegard Nossum
2008-06-02 10:39             ` Vegard Nossum
2008-06-02 10:52               ` Alan Cox
2008-06-02 10:57                 ` Vegard Nossum
2008-06-02 12:28                   ` Alan Cox
2008-06-02 14:31                     ` Vegard Nossum
2008-06-02 10:50             ` Alan Cox
2008-06-17 15:32               ` Joe Peterson
2008-06-02 15:26           ` Joe Peterson
2008-06-02 15:51             ` Alan Cox
2008-06-02 16:03               ` Joe Peterson
2008-06-04 14:43               ` Joe Peterson
2008-06-04 15:16                 ` Alan Cox
2008-06-04 16:52                   ` Joe Peterson
2008-06-04 17:10                     ` Alan Cox
2008-06-04 20:32                       ` Joe Peterson
2008-06-11 14:04                         ` Joe Peterson
2008-06-12 11:52                           ` Vegard Nossum
2008-06-14  1:49                             ` Joe Peterson [this message]
2008-06-14  7:45                               ` Vegard Nossum
2008-06-14 17:43                                 ` Joe Peterson
2008-06-14 20:34                                   ` Vegard Nossum
2008-06-14 20:52                                     ` Joe Peterson
2008-06-14 21:26                                       ` Vegard Nossum
2008-06-14 21:34                                         ` Joe Peterson
2008-07-02 18:03                                         ` tty session leader issue (was Re: 2.6.25.3: su gets stuck for root) Joe Peterson
2008-07-02 19:21                                           ` markus reichelt
2008-07-06 14:08                                           ` Tim Connors
2008-07-06 16:44                                             ` Alan Cox
2008-07-06 18:49                                             ` tty session leader issue [cause now known!] " Joe Peterson
2008-06-02  5:42   ` 2.6.25.3: su gets stuck for root Joe Peterson
  -- strict thread matches above, loose matches on Subject: below --
2008-05-13  6:17 Harald Dunkel
2008-05-13  6:47 ` Vegard Nossum
2008-05-13 17:43   ` Harald Dunkel
2008-05-13 19:46     ` Willy Tarreau
2008-05-14  4:55       ` Harald Dunkel
2008-05-14  5:46         ` Willy Tarreau
2008-05-14  7:34     ` Vegard Nossum
2008-05-14 17:05       ` Harald Dunkel
2008-05-14 17:17         ` Vegard Nossum
2008-05-14 17:35           ` Alan Cox
2008-05-18 17:56             ` Harald Dunkel
2008-05-18 17:51               ` Alan Cox
2008-05-20 19:01                 ` Harald Dunkel
2008-05-20 19:12                   ` david
2008-05-20 20:26                     ` Harald Dunkel
2008-05-20 20:38                       ` Willy Tarreau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=485323C5.4030002@skyrush.com \
    --to=joe@skyrush.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=alan@redhat.com \
    --cc=davidn@davidnewall.com \
    --cc=harald.dunkel@t-online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vegard.nossum@gmail.com \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox