[CRIU] Re: [PATCH cr 0/9] Dump zombies from another PID namespace

Pavel Emelyanov xemul at parallels.com
Fri Sep 7 04:30:13 EDT 2012


On 09/04/2012 05:10 PM, Andrey Vagin wrote:
> The problem is to get a virtual pid for zombies.
> This code gets two list of children from current and target pidns.

It does so by getting a target's proc via parasite. Wouldn't it be
easier to ask for the target to read the children himself and report
back?

> Then it removes alive task from the second list and dumps remaining zombies.
> 
> A procfs from a target pidns is needed for dumping zombies,
> crtools gets it from parasite code.
> 
> Andrey Vagin (9):
>   dump: get children by pid instead of pstree_item
>   parasite: get a file descriptor for procfs from a target pidns
>   util: add ability to change a file descriptor on procfs
>   crtools: use pit_t for PIDs
>   dump: use a virtual pid in names of zombie's core files
>   dump: get a file descriptor on procfs from parasite
>   dump: avoid extra jumps dump_one_task
>   dump: dump zombies from another PID namespace
>   restore: prevent killing of nonpositive PIDs
> 
>  cr-dump.c                  |  162 +++++++++++++++++++++++++++++++++++---------
>  cr-restore.c               |    3 +-
>  include/crtools.h          |    4 +-
>  include/parasite-syscall.h |    3 +-
>  include/parasite.h         |    1 +
>  include/syscall-x86-64.def |    4 +
>  include/util.h             |    2 +
>  parasite-syscall.c         |   21 ++++++-
>  parasite.c                 |   42 +++++++++++
>  test/zdtm.sh               |    4 +-
>  util.c                     |   29 ++++++++
>  11 files changed, 236 insertions(+), 39 deletions(-)



More information about the CRIU mailing list