Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
su-: cant set terminal proces grp (-1): Inappropriate ioctl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
till
n00b
n00b


Joined: 19 Sep 2007
Posts: 22

PostPosted: Tue Jul 09, 2013 10:33 am    Post subject: su-: cant set terminal proces grp (-1): Inappropriate ioctl Reply with quote

Hi,
i have a similar error than this guy:
https://forums.gentoo.org/viewtopic-t-913776-start-0.html

when running "su -" i get the following error

Code:

$ su -
Password:
-su: cannot set terminal process group (-1): Inappropriate ioctl for device
-su: no job control in this shell


however if i login directly as root on the terminal or using "su" without the "-" the problem does not exist.

i also tried to delete the content of the /root directory in case i have modified some settings for root, but it did not help. This is consistent with my later observation that "su <username> -" causes the same error for any user (not only root).

i have absolutely no clue what is causing this error. can anybody give some hint how to get this working again?
_________________
Greetings Till
Back to top
View user's profile Send private message
till
n00b
n00b


Joined: 19 Sep 2007
Posts: 22

PostPosted: Tue Jul 09, 2013 11:51 am    Post subject: Reply with quote

an ftrace revealed the following:

Code:
...
[pid 14857] setuid(1000)                = 0
[pid 14857] setsid()                    = 14857
[pid 14857] close(3)                    = 0
[pid 14857] execve("/bin/bash", ["bash", "-"], [/* 49 vars */]) = 0
[pid 14857] brk(0)                      = 0x1176000
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933ee7000
[pid 14857] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 14857] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] fstat(3, {st_mode=S_IFREG|0644, st_size=237116, ...}) = 0
[pid 14857] mmap(NULL, 237116, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2933ead000
[pid 14857] close(3)                    = 0
[pid 14857] open("/lib64/libreadline.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300o\1\0\0\0\0\0"..., 832) = 832
[pid 14857] fstat(3, {st_mode=S_IFREG|0555, st_size=284000, ...}) = 0
[pid 14857] mmap(NULL, 2384872, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2933a80000
[pid 14857] mprotect(0x7f2933abe000, 2093056, PROT_NONE) = 0
[pid 14857] mmap(0x7f2933cbd000, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3d000) = 0x7f2933cbd000
[pid 14857] mmap(0x7f2933cc5000, 5096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2933cc5000
[pid 14857] close(3)                    = 0
[pid 14857] open("/lib64/libncurses.so.5", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0PT\1\0\0\0\0\0"..., 832) = 832
[pid 14857] fstat(3, {st_mode=S_IFREG|0755, st_size=341688, ...}) = 0
[pid 14857] mmap(NULL, 2439272, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f293382c000
[pid 14857] mprotect(0x7f293387b000, 2093056, PROT_NONE) = 0
[pid 14857] mmap(0x7f2933a7a000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4e000) = 0x7f2933a7a000
[pid 14857] mmap(0x7f2933a7f000, 2152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2933a7f000
[pid 14857] close(3)                    = 0
[pid 14857] open("/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\17\0\0\0\0\0\0"..., 832) = 832
[pid 14857] fstat(3, {st_mode=S_IFREG|0755, st_size=14688, ...}) = 0
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933eac000
[pid 14857] mmap(NULL, 2109688, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2933628000
[pid 14857] mprotect(0x7f293362a000, 2097152, PROT_NONE) = 0
[pid 14857] mmap(0x7f293382a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f293382a000
[pid 14857] close(3)                    = 0
[pid 14857] open("/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 G\2\0\0\0\0\0"..., 832) = 832
[pid 14857] fstat(3, {st_mode=S_IFREG|0755, st_size=1720640, ...}) = 0
[pid 14857] mmap(NULL, 3832928, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f2933280000
[pid 14857] mprotect(0x7f293341f000, 2093056, PROT_NONE) = 0
[pid 14857] mmap(0x7f293361e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19e000) = 0x7f293361e000
[pid 14857] mmap(0x7f2933624000, 15456, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f2933624000
[pid 14857] close(3)                    = 0
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933eab000
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933eaa000
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933ea9000
[pid 14857] arch_prctl(ARCH_SET_FS, 0x7f2933eaa700) = 0
[pid 14857] mprotect(0x7f293361e000, 16384, PROT_READ) = 0
[pid 14857] mprotect(0x7f293382a000, 4096, PROT_READ) = 0
[pid 14857] mprotect(0x7f2933a7a000, 16384, PROT_READ) = 0
[pid 14857] mprotect(0x7f2933cbd000, 8192, PROT_READ) = 0
[pid 14857] mprotect(0x6b0000, 4096, PROT_READ) = 0
[pid 14857] mprotect(0x7f2933ee8000, 4096, PROT_READ) = 0
[pid 14857] munmap(0x7f2933ead000, 237116) = 0
[pid 14857] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 14857] open("/dev/tty", O_RDWR|O_NONBLOCK) = -1 ENXIO (No such device or address)
[pid 14857] ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 14857] fstat(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 5), ...}) = 0
[pid 14857] brk(0)                      = 0x1176000
[pid 14857] brk(0x1198000)              = 0x1198000
[pid 14857] readlink("/proc/self/fd/0", "/dev/pts/5", 4095) = 10
[pid 14857] stat("/dev/pts/5", {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 5), ...}) = 0
[pid 14857] open("/dev/pts/5", O_RDWR|O_NONBLOCK) = 3
[pid 14857] close(3)                    = 0
[pid 14857] open("/usr/lib64/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] fstat(3, {st_mode=S_IFREG|0644, st_size=3116496, ...}) = 0
[pid 14857] mmap(NULL, 3116496, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2932f87000
[pid 14857] close(3)                    = 0
[pid 14857] getuid()                    = 1000
[pid 14857] getgid()                    = 1000
[pid 14857] geteuid()                   = 1000
[pid 14857] getegid()                   = 1000
[pid 14857] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 14857] ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
[pid 14857] ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff3c3bdb68) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 14857] open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 3
[pid 14857] fcntl(3, F_GETFD)           = 0x1 (flags FD_CLOEXEC)
[pid 14857] fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[pid 14857] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f2933ee6000
[pid 14857] read(3, "MemTotal:        8179424 kB\nMemF"..., 1024) = 1024
[pid 14857] close(3)                    = 0
[pid 14857] munmap(0x7f2933ee6000, 4096) = 0
[pid 14857] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f29332b7c50}, {SIG_DFL, [], 0}, 8) = 0
[pid 14857] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f29332b7c50}, {SIG_DFL, [], SA_RESTORER|SA_RESTART, 0x7f29332b7c50}, 8) = 0
[pid 14857] rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, {SIG_DFL, [], 0}, 8) = 0
[pid 14857] rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, 8) = 0
[pid 14857] rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, {SIG_DFL, [], 0}, 8) = 0
[pid 14857] rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, 8) = 0
[pid 14857] rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
[pid 14857] rt_sigaction(SIGQUIT, {SIG_IGN, [], SA_RESTORER, 0x7f29332b7c50}, {SIG_DFL, [], SA_RESTORER, 0x7f29332b7c50}, 8) = 0
....



the following line sems to be the error, but i cant see where fd 2 is opened.
Code:
[pid 14857] ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fff3c3bdb68) = -1 ENOTTY (Inappropriate ioctl for device)


Maybe that is the failed /dev/tty opening. However i do not know why it cannot open /dev/tty as it is there:
Code:
# l /dev/tty                                                                                                                 
crw-rw-rw- 1 root tty 5, 0  9. Jul 12:10 /dev/tty

_________________
Greetings Till
Back to top
View user's profile Send private message
till
n00b
n00b


Joined: 19 Sep 2007
Posts: 22

PostPosted: Mon Jul 22, 2013 8:46 pm    Post subject: Reply with quote

seems that there is a open bug for that problem: https://bugs.gentoo.org/show_bug.cgi?id=405679
_________________
Greetings Till
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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