[Devel] pid namespace bug ?

Daniel Lezcano daniel.lezcano at free.fr
Thu May 6 13:13:37 PDT 2010


Ferenc Wagner wrote:

> I noticed something strange:
>
> # lxc-start -n jail -s lxc.mount.entry="/ /tmp/jail none bind 0 0" -s lxc.rootfs=/tmp/jail -s lxc.pivotdir=/mnt /bin/sleep 1000
> (in another terminal)
> # lxc-ps --lxc
> CONTAINER    PID TTY          TIME CMD
> jail        4173 pts/1    00:00:00 sleep
> # kill 4173
> (this does not kill the sleep!)
> # strace -p 4173
> Process 4173 attached - interrupt to quit
> restart_syscall(<... resuming interrupted call ...> = ? ERESTART_RESTARTBLOCK (To be restarted)
> --- SIGTERM (Terminated) @ 0 (0) ---
> Process 4173 detached
> # lxc-ps --lxc
> CONTAINER    PID TTY          TIME CMD
> jail        4173 pts/1    00:00:00 sleep
> # fgrep -i sig /proc/4173/status 
> SigQ:	1/16382
> SigPnd:	0000000000000000
> SigBlk:	0000000000000000
> SigIgn:	0000000000000000
> SigCgt:	0000000000000000
> # kill -9 4173
>
> That is, the jailed sleep process could be killed by SIGKILL only, even
> though (according to strace) SIGTERM was delivered and it isn't handled
> specially.  Why does this happen?
>   

Whow weird !

I tried with lxc-unshare -s PID sleep 3600, which does nothing more than 
unsharing a new pid namespace and I noticed the same.

I know the process 1 has some properties concerning the signals, it is 
immune against signals coming from the container maybe there is a 
problem in this area in the kernel.

Suka, does this behavior sound familiar to you ?

Happens on 2.6.31-20-generic (ubuntu) and 2.6.33 vanilla kernel.

Thanks
  -- Daniel
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list