[CRIU] criu + threaded program + TCP_REPAIR

Sowmini Varadhan sowmini.varadhan at oracle.com
Mon Oct 20 06:51:50 PDT 2014


On (10/20/14 16:07), Pavel Emelyanov wrote:
> The criu binary should be in PATH.

yes, my bad. I fixed that after Ruslan pointed it out.

> If you're specifying the lxc as the 2nd argument, then 3rd should be
> the container name as lxc understands it.

Ok. 

> I don't know what ns_chil_exec does, but it's likely generating
> a new pid namespace for its child. Criu doesn't support more than
> one pidns at the moment.

yes ns_child_exec calls clone with CLONE_NEWPID, so the child (in
my case, this is bash) is in its own pidns. My understanding is that
you need to do this so that you can migrate the process over without
any pid conflicts. But I guess I'm not clear on what needs to
be migrated at that point (bash? or its child? or the parent of bash?)

My top-level objective is to migrate the child of bash, which is
iperf in my case.

> Yes. This means, that bash lives not in its own session, but the
> session leader is somewhere else. If you do want to dump this guy
> and (!) on restore re-attach it to another session, then the -j key
> is for you.
  :
> Can you show what /proc/pid/maps shows for the iperf process?

I assume you want the cat from the default pidns (cat from the 
child's pidns doesnt show anything). The output was a  bunch of stuff, see 
attachment

But as I wrote this up, started wondering,
perhaps all I want is to do the criu-restore in a separate pidns?
-------------- next part --------------
08048000-08057000 r-xp 00000000 fd:01 1051208                            /usr/bin/iperf
08057000-08058000 r--p 0000e000 fd:01 1051208                            /usr/bin/iperf
08058000-08059000 rw-p 0000f000 fd:01 1051208                            /usr/bin/iperf
08f02000-08f23000 rw-p 00000000 00:00 0                                  [heap]
f6200000-f6221000 rw-p 00000000 00:00 0 
f6221000-f6300000 ---p 00000000 00:00 0 
f63c6000-f63c7000 ---p 00000000 00:00 0 
f63c7000-f6bc7000 rw-p 00000000 00:00 0                                  [stack:29136]
f6bc7000-f6bc8000 ---p 00000000 00:00 0 
f6bc8000-f73cb000 rw-p 00000000 00:00 0                                  [stack:29135]
f73cb000-f740f000 r-xp 00000000 fd:01 926931                             /lib/i386-linux-gnu/libm-2.19.so
f740f000-f7410000 r--p 00043000 fd:01 926931                             /lib/i386-linux-gnu/libm-2.19.so
f7410000-f7411000 rw-p 00044000 fd:01 926931                             /lib/i386-linux-gnu/libm-2.19.so
f7411000-f75ba000 r-xp 00000000 fd:01 926936                             /lib/i386-linux-gnu/libc-2.19.so
f75ba000-f75bb000 ---p 001a9000 fd:01 926936                             /lib/i386-linux-gnu/libc-2.19.so
f75bb000-f75bd000 r--p 001a9000 fd:01 926936                             /lib/i386-linux-gnu/libc-2.19.so
f75bd000-f75be000 rw-p 001ab000 fd:01 926936                             /lib/i386-linux-gnu/libc-2.19.so
f75be000-f75c1000 rw-p 00000000 00:00 0 
f75c1000-f75d9000 r-xp 00000000 fd:01 926944                             /lib/i386-linux-gnu/libpthread-2.19.so
f75d9000-f75da000 r--p 00017000 fd:01 926944                             /lib/i386-linux-gnu/libpthread-2.19.so
f75da000-f75db000 rw-p 00018000 fd:01 926944                             /lib/i386-linux-gnu/libpthread-2.19.so
f75db000-f75de000 rw-p 00000000 00:00 0 
f75de000-f75fa000 r-xp 00000000 fd:01 921896                             /lib/i386-linux-gnu/libgcc_s.so.1
f75fa000-f75fb000 rw-p 0001b000 fd:01 921896                             /lib/i386-linux-gnu/libgcc_s.so.1
f75fb000-f76d7000 r-xp 00000000 fd:01 1081662                            /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
f76d7000-f76d8000 ---p 000dc000 fd:01 1081662                            /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
f76d8000-f76dc000 r--p 000dc000 fd:01 1081662                            /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
f76dc000-f76dd000 rw-p 000e0000 fd:01 1081662                            /usr/lib/i386-linux-gnu/libstdc++.so.6.0.19
f76dd000-f76e4000 rw-p 00000000 00:00 0 
f76f8000-f76fb000 rw-p 00000000 00:00 0 
f76fb000-f76fd000 r--p 00000000 00:00 0 
f76fd000-f76fe000 r-xp 00000000 00:00 0                                  [vdso]
f76fe000-f771e000 r-xp 00000000 fd:01 926945                             /lib/i386-linux-gnu/ld-2.19.so
f771e000-f771f000 r--p 0001f000 fd:01 926945                             /lib/i386-linux-gnu/ld-2.19.so
f771f000-f7720000 rw-p 00020000 fd:01 926945                             /lib/i386-linux-gnu/ld-2.19.so
ffc46000-ffc67000 rw-p 00000000 00:00 0                                  [stack]


More information about the CRIU mailing list