[Users] -bash: child setpgid (7091 to 8093): Operation not permitted

Vincent van Gelder vincent at dauphin-mm.nl
Fri Aug 11 09:27:30 EDT 2006


Hi,

Sometimes when I login at a openvz virtual private server using ssh, I
get this message:
Have a lot of fun...
-bash: child setpgid (10836 to 11837): Operation not permitted

Now when I use a command like `ls` (a non bash built-in command), bash
terminates.
When I use a bash built-in command like `echo 'foobar'` I get the same
message again:
$ echo foobar
foobar
-bash: child setpgid (10836 to 11837): Operation not permitted

When I start a new bash shell, inside this shell I'm getting the
hostname from the physical machine instead of the virtual machine and
also getting the ip address from the physical machine. The process list
however is from the virtual machine.

this is a piece from ps on the physical machine
# ps -eo pid,ppid,pgid,user,lstart,args f
  PID  PPID  PGID USER                      STARTED COMMAND
15258     1 15258 root     Wed Aug  9 14:38:49 2006 init [3]
 8232 15258  8232 root     Fri Aug 11 13:40:26 2006  \_ /usr/sbin/sshd
-o PidFile=/var/run/sshd.init.pid
10810  8232 10810 root     Fri Aug 11 14:09:12 2006      \_ sshd:
vincent [priv]                              
10812 10810 10810 vincent  Fri Aug 11 14:09:13 2006          \_ sshd:
vincent at pts/0                               
10813 10812 10813 vincent  Fri Aug 11 14:09:13 2006              \_ -bash
10868 10813 10868 vincent  Fri Aug 11 14:10:53 2006                  \_ bash


this the complete ps on the virtual machine:
$ ps -eo pid,ppid,pgid,user,lstart,args f
  PID  PPID  PGID USER                      STARTED COMMAND
10813 10812 10813 vincent  Fri Aug 11 16:09:13 2006 -bash
10868 10813 10868 vincent  Fri Aug 11 16:10:53 2006  \_ bash
10985 10868 10985 vincent  Fri Aug 11 16:24:15 2006      \_ ps -eo
pid,ppid,pgid,user,lstart,args f
15258     1 15258 root     Wed Aug  9 16:38:49 2006 init [3]     
16622 15258 16622 root     Wed Aug  9 16:38:52 2006  \_ /sbin/syslog-ng
16625 15258 16625 root     Wed Aug  9 16:38:52 2006  \_ /sbin/klogd -c 1
-x -x
16631 15258 16631 nobody   Wed Aug  9 16:38:52 2006  \_ /sbin/portmap
 4645 15258  4597 root     Thu Aug 10 14:13:33 2006  \_ /bin/sh
/usr/bin/mysqld_safe --datadir=/var/lib/
 4678  4645  4597 mysql    Thu Aug 10 14:13:33 2006  |   \_
/usr/sbin/mysqld --basedir=/ --datadir=/var/
 8232 15258  8232 root     Fri Aug 11 15:40:26 2006  \_ /usr/sbin/sshd
-o PidFile=/var/run/sshd.init.pid
10810  8232 10810 root     Fri Aug 11 16:09:12 2006      \_ sshd:
vincent [priv]   

It seems like the ssh process with pid 10812 is missing here.

I did a strace on the physical machine on pid 10813 and then I exited
process 10868 on the virtual machine.
$ exit
-bash: child setpgid (11022 to 11837): Operation not permitted
16:27:23 vincent at testvz ~ :)
$ logout



I have attached the strace file.

kernel: Linux pc-094 2.6.16.13-026test012-2-default #1 Wed May 3
08:53:23 MSD 2006 i686 i686 i386 GNU/Linux
distro: opensuse10


-- 
Met vriendelijk groeten,
Vincent van Gelder

Dauphin MultiMedia - http://www.dauphin-mm.nl/ 

-------------- next part --------------
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WSTOPPED) = 10868
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0
ioctl(255, TIOCSPGRP, [11837])          = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
ioctl(255, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(255, TIOCGWINSZ, {ws_row=73, ws_col=212, ws_xpixel=1280, ws_ypixel=954}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, 0xbfff0448, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGINT, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, 8) = 0
time(NULL)                              = 1155299243
stat64("/var/mail/vincent", 0xbfff024c) = -1 ENOENT (No such file or directory)
time(NULL)                              = 1155299243
time([1155299243])                      = 1155299243
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=815, ...}) = 0
pipe([3, 5])                            = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x401bd708) = 11022
setpgid(11022, 11837)                   = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 11022
waitpid(-1, 0xbffeeaf8, WNOHANG|WSTOPPED) = -1 ECHILD (No child processes)
sigreturn()                             = ? (mask now [])
rt_sigaction(SIGCHLD, {0x80741c0, [], SA_RESTORER, 0x400c55e8}, {0x80741c0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
close(5)                                = 0
read(3, ":)\n", 128)                    = 3
read(3, "", 128)                        = 0
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [CHLD], 8) = 0
ioctl(255, TIOCSPGRP, [11837])          = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_SETMASK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0
ioctl(255, TIOCSPGRP, [11837])          = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
ioctl(0, TIOCGWINSZ, {ws_row=73, ws_col=212, ws_xpixel=1280, ws_ypixel=954}) = 0
ioctl(0, TIOCSWINSZ, {ws_row=73, ws_col=212, ws_xpixel=1280, ws_ypixel=954}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig -icanon -echo ...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTERM, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGQUIT, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGALRM, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {0x8083139, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTSTP, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTSTP, {SIG_IGN}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTTOU, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTTIN, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTTIN, {SIG_IGN}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGWINCH, {0x40037c80, [], SA_RESTORER|SA_RESTART, 0x400c55e8}, {0x8072b6b, [], SA_RESTORER, 0x400c55e8}, 8) = 0
write(2, "\33[0;33m16:27:23 vincent at testvz ~"..., 41) = 41
write(2, "$ ", 2)                       = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
read(0, 0xbffefffb, 1)                  = -1 EIO (Input/output error)
rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0
ioctl(0, SNDCTL_TMR_STOP or TCSETSW, {B38400 opost isig icanon echo ...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGALRM, {0x8083139, [HUP INT ILL TRAP ABRT BUS FPE USR1 SEGV USR2 PIPE ALRM TERM XCPU XFSZ VTALRM SYS], SA_RESTORER, 0x400c55e8}, {0x400381e0, [], SA_RESTORER, 0x400c55e8}, 8) = 0
rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGTTIN, {SIG_IGN}, {SIG_IGN}, 8) = 0
rt_sigaction(SIGWINCH, {0x8072b6b, [], SA_RESTORER, 0x400c55e8}, {0x40037c80, [], SA_RESTORER|SA_RESTART, 0x400c55e8}, 8) = 0
rt_sigaction(SIGINT, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, 8) = 0
write(2, "logout\n", 7)                 = 7
open("/data/home/vincent/.bash_logout", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=25, ...}) = 0
read(3, "# ~/.bash_logout\n\n#clear\n", 25) = 25
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/etc/bash.bash_logout", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigaction(SIGINT, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, {0x80831d7, [], SA_RESTORER, 0x400c55e8}, 8) = 0
stat64("/data/home/vincent/.bash_history", {st_mode=S_IFREG|0600, st_size=11604, ...}) = 0
open("/data/home/vincent/.bash_history", O_WRONLY|O_APPEND) = 3
write(3, "echo foobar\nbash\n", 17)     = 17
close(3)                                = 0
open("/data/home/vincent/.bash_history", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0600, st_size=11621, ...}) = 0
read(3, "rm -rf tk.eclipse.plugin.htmledi"..., 11621) = 11621
close(3)                                = 0
rt_sigprocmask(SIG_BLOCK, [CHLD TSTP TTIN TTOU], [], 8) = 0
ioctl(255, TIOCSPGRP, [11837])          = -1 EPERM (Operation not permitted)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
setpgid(0, 11837)                       = -1 ESRCH (No such process)
munmap(0x402d4000, 4096)                = 0
munmap(0x402d5000, 4096)                = 0
exit_group(0)                           = ?


More information about the Users mailing list