- 28 Jun, 2016 10 commits
-
-
Ruslan Kuprieiev authored
Convert criu images to coredumps and check if they are readable by readelf. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Ruslan Kuprieiev authored
In automated tests we use test/crit-recode.py because of performance benefits(no need to launch python interpreter more than once), but manual test is still useful for manual testing, so lets make it work again. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Ruslan Kuprieiev authored
This patch introduces a new subproject called "criu-coredump". The name is pretty much self-explanatory, it allows generating coredumps from criu images. Coredumps are readable and usable by gdb. The structure is something in the middle of kernel-generated and gdb-generated core dumps. This is a first iteration of core-dump patch series. It introduces ability to generate gdb-operatable core dump only for x86_64 machines. To support other architectures there will be a set to introduce proper structures for notes section of the core dump. It is also worth noting, that we still leave some notes(SIGINFO primarily) not fullfilled, as I still need to figure out what to put in there in our case, where no signal is involved in triggering core dump generation and other caveats like zeroed vvar(we have problems with it withing CRIU itself as well as gdb has some difficalties with it) and vsyscall vmas. One can already use produced core dump with gdb, there is also a quick simple demo https://asciinema.org/a/18936 . Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
For example in containers case there might be a number of controllers mounted on the node which we should not carry inside image when container is migrated. So add ability to dump predefined controllers only specified via command line --cgroup-dump-controller option. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
| *** CID 161427: Memory - corruptions (USE_AFTER_FREE) | /criu/cgroup-props.c: 352 in cgp_parse_stream() | 346 | 347 ret = 0; | 348 out: | 349 return ret; | 350 | 351 err_parse: | >>> CID 161427: Memory - corruptions (USE_AFTER_FREE) | >>> Calling "cgp_free" frees pointer "cgp_entry" which has already been freed. | 352 cgp_free(cgp_entry); | 353 ret = -EINVAL; | 354 goto out; | 355 } | 356 | 357 static int cgp_parse_file(char *path) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
| *** CID 161426: Resource leaks (RESOURCE_LEAK) | /criu/cgroup-props.c: 318 in cgp_parse_stream() | 312 } | 313 | 314 if (xrealloc_safe(&cgp_entry->cgp.props, | 315 (cgp_entry->cgp.nr_props + 1) * sizeof(char *))) { | 316 pr_err("Can't allocate property for controller %s\n", | 317 cgp_entry->cgp.name); | >>> CID 161426: Resource leaks (RESOURCE_LEAK) | >>> Variable "cgp_entry" going out of scope leaks the storage it points to. | 318 return -1; | 319 } Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrey Vagin authored
280 xfree(p); >>> >>> CID 161428: Memory - illegal accesses (USE_AFTER_FREE) >>> >>> Passing freed pointer "p" as an argument to "print_on_level". 281 pr_err("Unknown strategy \"%s\" in controller's %s stream\n", 282 p, cgp_entry->cgp.name); Signed-off-by:
Andrey Vagin <avagin@openvz.org> 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> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
We have some common predefined properties such as "cpuset.cpus" and etc gathered in @cgp_predefined set, but there might be situation when only predefined ones are not enough, so add ability to specify properties via --cgroup-props and/or --cgroup-props-file options. For example one may pass file with content "cpu": - "strategy": "merge" - "properties": ["cpu.shares", "cpu.cfs_period_us"] to dump custom properties for cpu controller. The description is implemented in almost valid yaml, probably we will need to support the various forms, but oneline is enough for now. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 16 Jun, 2016 1 commit
-
-
Pavel Emelyanov authored
-
- 14 Jun, 2016 3 commits
-
-
Pavel Emelyanov authored
So, we have some nice new features, again aimed at better integration, also have massive restorer blob preparation rework and several nasty bugfixes in mounts code. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
I think we can improve error messages to distinguish task's kills from segfaults from ptrace failures & etc. Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
Test should not assume that page size is 4096. The test was failing on ppc64 where page size is usually 64K. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 01 Jun, 2016 26 commits
-
-
Pavel Emelyanov authored
It's possible to create sysvshmem segment with size not being multiple of page_size. And this very size will be reported everywhere in the interfaces. Support this type of segments too. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Dengguangxing authored
join user namespace is not fully tested yet. So it is not recommended to use this. add a warning message when user tries to use join-ns with user-namespace. Signed-off-by:
Deng Guangxing <dengguangxing@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Thread ones start after shared. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
An interference of sigreturn_restore rework patches and vm_open callback ones has lead to the situation when vme for restorer has already been copied to rst-mem, but sysv shmem vm_open tried to modify previously seen vmes. Fix this by copying vme-s to restorer late, but still before sigreturn_restore. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
The mremap() grow on anonymous shared memory doesn't produce usable segment, as the underlying kernel tmpfs file doesn't get truncated. So any access to new mem will result in sigbus. Disable this grow for now, we only need few of such memory. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
The RM_PRIVATE memory can move every time we call rst_mem_alloc, so it's impossible to have static pointer on it. Since task args is used actyvely, it will be easier to handle it manually. Reported-by:
Andrey Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
After all arrays remapping is reworked, the remap_array() can be dropped from code and in-place ptr fixup helper can appear. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
These two objects are actually needed at the very early stages of restore, much earlier than they are actually allocated. To make life nicer, let's allocate args from private rst mem, it will get remapped into restorer blob automatically. The new memory layout then is | restorer code | memzone (stacks and sigframes) | arguments | The last area is unmapped at the very end of restorer code. Also this gives the opportunity not to copy many bits betweek static variables and task-args, but put them directly into args. All the next patches are about it. Also the sigreturn_restore() is now stuffed with preparatory code and is quite big. When new "restoring" is added it's confusing at which place in the code it should be inserted. This patch makes a clear distinction -- the sigreturn_restore() is __only__ about remapping the memory into restorer blob and jumping into it. All the rest should go into restore_one_alive_task(). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Right now memzone (stack and sigframe) sit on thread args, which are allocated independently from rst-mem. In the next patches task and thread args will be moved on rst-mem and will get unmapped by restorer at the end. Since both stack and sigframe are required even after rst-mem unmap, memzon should live independelntly. The new restorer blob layout will be described in the next patch. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
When getting hint for restorer blob we scan the list of vmas in criu address space. Since these vmas are only required to find holes, we can merge vmas alltogether and make restorer_get_vma_hint's work easier. Reduces list of items in small zdtm tests from 71 to 9. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
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>
-
Andrew Vagin authored
In this case we can run more tests Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-