Re: 2.6.25.3: su gets stuck for root

From: Joe Peterson
Date: Mon Jun 02 2008 - 01:55:22 EST


Willy Tarreau wrote:
> Guys, you should test if "kill -CONT $pid" wakes the process up.
> It might be possible that some obscure bug appeared in the tty
> code resulting in SIGTTOU sometimes being sent to the caller,
> although that seems rather strange :-/

Just tried this ("kill -CONT <pid>") - no luck.

BTW, it should be possible, I would think, for others to duplicate this
fairly easily. Just:

1) make a user, "foo", with login shell set to /bin/bash
2) create a .bashrc in foo's home dir with contents:

sleep 2
stty -ixany

3) cp .bashrc .bash_profile (only needed to test "su - foo" too)
4) become root
5) type "su foo" (or "su - foo")

Sometimes it takes a second try to get it to happen. If the su hangs,
check to see if the stty process is in state "T". Also, it may make a
difference if you are logged in already as foo or are using X. I first
noticed this with no users logged in (except root) and no X running (but
I can reproduce with X/xterm as well using this simple test case). It
seems timing is a factor, so it's worth trying various things.

-Joe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/