- 01 Jun, 2016 3 commits
-
-
Dengguangxing authored
Signed-off-by:
Deng Guangxing <dengguangxing@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dengguangxing authored
Signed-off-by:
Deng Guangxing <dengguangxing@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dengguangxing authored
this patch add join-ns option to criu CLI and RPC. This opt can be used in this fomat: --join-ns NS:PID|NS_FILE for example --join-ns net:12345 or --join-ns net:/foo/bar. pid namespaces is not supported yet. As fork() is needed to make new pid-namespace work. That makes it hard for criu to track the child-process through pid because another child process has been created after fork(). Signed-off-by:
Deng Guangxing <dengguangxing@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 31 May, 2016 9 commits
-
-
Pavel Emelyanov authored
The restore_bootstrap_len is restorer, args and rst-mem lenghts. Restorer is pie_size() from restorer, which is page-size aligned. Args len is aligned to page-size few lines above. The remapable rst-mem grows page by page and is aligned too. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrew Vagin authored
Currently all test mounts are mounted in the host mount namespace, so on restore we get root with some mounts. Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Now we don't detect extra mounts, if they have peers with the same root and target paths. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Jenkins sends this files as a message body if something failed. Cc: Sergey Bronnikov <sergeyb@openvz.org> Fixes: 474f2dfc ("zdtm.py: add option --keep-going") Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Reported-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Cc: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
We were luckely on built-in tests, because always AIO pages were present, and, thus, they are dumped. But AIO pages are not guaranteed to be present in common case. This patch makes AIO pages are dumped certanly. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
nr_req always depends on ring size and we even check for that. Kill parasite_aio::max_reqs,vma_nr_reqs and vma_area::aio_nr_req, because they are not need and excess. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
The first is a preparation to kill aio_nr_req. The second and the third are to have more debug info at restore. v2: Print mmap err code Signed-off-by:
Kirill Tkhai <ktkhai@vituozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 30 May, 2016 9 commits
-
-
Dmitry Safonov authored
This should fix errors on build envs, where git tags haven't been fetched. I.e, Travis-ci does not fetch tags before building a project, wich results in: ---> Running in 0d63a3d28a7a fatal: No names found, cannot describe anything. fatal: No names found, cannot describe anything. make[1]: Entering directory '/criu' The other way is to fetch tags on `git describe` failure, but it that way has two cons: - it will change user's git (and I'm not sure it's right); - we need not only fetch tags in that case, but also remotes, as otherwise it will fail with "fatal: No tags can describe <hash>": https://travis-ci.org/0x7f454c46/criu/jobs/133362045#L1748 Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
to fix error: ./crit/crit decode -i test/dump/zdtm/static/maps04/118/1/stats-dump Traceback (most recent call last): File "./crit/crit", line 276, in <module> main() File "./crit/crit", line 273, in main opts["func"](opts) File "./crit/crit", line 28, in decode img = pycriu.images.load(inf(opts), opts['pretty'], opts['nopl']) KeyError: 'nopl' Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
In some images there can be quite a long "payload" -- some raw data that is represented by base64 encoding. If we want to explore huge images reading tons of base64 symbols can be quite time consuming :) E.g. I a 1.5 gigs image with sysv shmem was sent to me some time ago for investigation %) So here is the --nopl argument for show action (decode should produce encode-able image, so payload there is needed) that just shows the amount of bytes in payload (if any). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
This seems to be known problem in util-vdso.c on aarch64 [1]. Now restorer segfaults with the following log: [ 8107.384817] criu[5135]: unhandled level 3 translation fault (11) at 0x00005b98, esr 0x90000007 [ 8107.385538] pgd = ffffffc038dbc000 [ 8107.386046] [00005b98] *pgd=0000000078d6c003, *pud=0000000078d6c003, *pmd=0000000073c31003, *pte=0000000000000000 [ 8107.391920] [ 8107.392521] CPU: 0 PID: 5135 Comm: criu Not tainted 4.5.0 #29 [ 8107.392805] Hardware name: linux,dummy-virt (DT) [ 8107.393140] task: ffffffc039a2a400 ti: ffffffc033c34000 task.ti: ffffffc033c34000 [ 8107.393782] PC is at 0x13514 [ 8107.406332] LR is at 0x1342c [ 8107.406550] pc : [<0000000000013514>] lr : [<000000000001342c>] pstate: a0000000 This is because gcc for aarch64 adds vdso_symbols array to symbols table and by that reason, it needs run-time relocations in place. How it goes (with cut not interesting assembly): 0x14104: adrp x7, 0x14000 ; adrp+add loading of 0x14114: add x0, x7, #0x928 ; symbol table's address, 0x14134: ldp x2, x3, [x0] ; loading address of symbol from ; symbol table 0x1414c: stp x2, x3, [x29,#112] ; saving it on stack on ; function's begin 0x14188: ldr x2, [x29,#112] ; using symbol's address in code The symbol for this in symbol table is: [root@alarm cr]# readelf -s criu/pie/restorer.built-in.bin.o | grep 5b98 248: 0000000000005b98 0 NOTYPE LOCAL DEFAULT 1 $d And also may be visible this way: objdump -dS criu/pie/restorer.built-in.bin.o | less ... 0000000000004924 <cur_loglevel>: 4924: 00000002 00005b98 00000000 00005ed0 .....[.......^.. 4934: 00000000 00005ee8 00000000 00005f00 .....^......._.. So, in a symbol table lies not relocated address of symbol. The real address may be visible with added printing of vdso_symbols[0]: pie: vdso: vdso_symbols[0] 0x15b98 (this way gcc by some reason does access symbol through local adrp+add calculations, than through stack-saved pointer of a symbol from symbol table). While we don't handling properly relocs here, I suggest this ugly workaround. Temporary fix for: #150 [1]: https://lists.openvz.org/pipermail/criu/2015-October/022453.html Cc: Wang Long <long.wanglong@huawei.com> Cc: Christopher Covington <cov@codeaurora.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Tested-by:
long.wanglong <long.wanglong@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
As for compatible 32-bit pie size of uint64_t is bigger than size of unsigned long type, add proper casts, so we could build compatible pie. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We are going to build everything from toplevel for convenience (just like it was before criu 2) so move one more snippet on top. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
They are already defined and exported. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We use in our PCS7 packaging and I think it's suitable for everything else as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reviewed-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 27 May, 2016 19 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
$ git log v4.4-rc1-465-gd6df198 commit d6df198d924775e4751561cf60ef0294e95f74df Author: Phil Sutter <phil@nwl.cc> Date: Tue Dec 1 22:45:15 2015 +0100 net: ipv6: restrict hop_limit sysctl setting to range [1; 255] Setting a value bigger than 255 resulted in using only the lower eight bits of that value as it is assigned to the u8 header field. To avoid this unexpected result, reject such values. https://github.com/xemul/criu/issues/164Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
shmem.c:290:4: note: in expansion of macro 'pr_err' pr_err("Shmem %lx already collected as SYSVIPC\n", vi->shmid); ^ v2: fix one more place Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
====================== Run zdtm/static/mnt_tracefs in uns ====================== Start test ./mnt_tracefs --pidfile=mnt_tracefs.pid --outfile=mnt_tracefs.out --dirname=mnt_tracefs.test Run criu dump Wait for zdtm/static/mnt_tracefs to die for 0.100000 Run criu restore Run criu dump Run criu restore Run criu dump Run criu restore 1: Old mounts lost: set([]) 1: New mounts appeared: set([('/', '/debugfs/tracing')]) Wait for zdtm/static/mnt_tracefs to die for 0.100000 Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
All the dumping code sits in there, so it's time to move the restoring one there too :) Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
We have 3 structures and 2 ways to keep them while doing C/R. Let's unify the vma_area is -- one struct with union and a hash table. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
We now have two places where we if/elseif/elseif/else a vma and take actions -- the prepare_mm_pid and open_vmas. I propose to make this if/... onlce once (while preparing) and set up a callback on vma to be called later (while opening). This requires my patch that doesn't set -1 in alloc_vma or Andrey's patch that does the same. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Image a process has done shmget(2 pages), then shmat() then mprotect(1 page, ro). In this case criu will dump 1 shmem segment 2 pages long and 2 vmas 1 page each. But on restore time we'll call shmat() for _each_ vma and the very first one will occupy the whole 2 pages space in vm (there's no size argument for shmat, only for shmget) thus blocking the 2nd vma from shmat()-in again. The solution is: 1. check that each shmem segment is attached by the sequence of vmas that cover one w/o holes 2. shmat() only the first one 3. mprotect() all of them if needed (there's no hunks for this step in this path, mprotect is already called in pie/restorer.c and does things well) v2: * List can contain anon shmems (caught by zdtm) * There can be many attachments of a segment (caught by transition/ipc) Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-