Re: 2.6.25.3: su gets stuck for root

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Harald Dunkel
Date: Sunday, May 18, 2008 - 10:56 am

Alan Cox wrote:

Attaching to the running stty failed:

# gdb stty 26465
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
Attaching to program: /var/tmp/coreutils-6.10/coreutils-6.10/src/stty, process 26465
/tmp/buildd/gdb-6.8/gdb/linux-nat.c:988: internal-error: linux_nat_attach: Assertion `pid == GET_PID (inferior_ptid) && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
:


I can kill it with -9, but INTR, SEGV, BUS, etc. don't interrupt
it. And if I run stty inside of the debugger (or on the command
line), then it doesn't get stuck.

I have changed stty.c to do some print statements, and changed
root's .bashrc to use it for "stty intr ^C": It gets stuck
inside tcsetattr():

       printf("here we are\n");
       if (tcsetattr (STDIN_FILENO, TCSADRAIN, &mode))
	error (EXIT_FAILURE, errno, "%s", device_name);
       printf("born to be kings\n");

The previous tcgetattr() to read the old terminal settings shows
no problem (AFAICS).

Replacing TCSADRAIN by 0 doesn't help.



Regards

Harri
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.25.3: su gets stuck for root, Harald Dunkel, (Mon May 12, 11:17 pm)
Re: 2.6.25.3: su gets stuck for root, Vegard Nossum, (Mon May 12, 11:47 pm)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Tue May 13, 10:43 am)
Re: 2.6.25.3: su gets stuck for root, Willy Tarreau, (Tue May 13, 12:46 pm)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Tue May 13, 9:55 pm)
Re: 2.6.25.3: su gets stuck for root, Willy Tarreau, (Tue May 13, 10:46 pm)
Re: 2.6.25.3: su gets stuck for root, Vegard Nossum, (Wed May 14, 12:34 am)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Wed May 14, 10:05 am)
Re: 2.6.25.3: su gets stuck for root, Vegard Nossum, (Wed May 14, 10:17 am)
Re: 2.6.25.3: su gets stuck for root, Alan Cox, (Wed May 14, 10:35 am)
Re: 2.6.25.3: su gets stuck for root, Alan Cox, (Sun May 18, 10:51 am)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Sun May 18, 10:56 am)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Tue May 20, 12:01 pm)
Re: 2.6.25.3: su gets stuck for root, david, (Tue May 20, 12:12 pm)
Re: 2.6.25.3: su gets stuck for root, Harald Dunkel, (Tue May 20, 1:26 pm)
Re: 2.6.25.3: su gets stuck for root, Willy Tarreau, (Tue May 20, 1:38 pm)