- 30 Oct, 2018 40 commits
-
-
Cyrill Gorcunov authored
Since we're using bintmaps for options don't exit early if --cpu-cap=ins specified because there might be a combination of options. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Since now validation is bit based there is no longer need to exit early if fpu matches, we rather need over all possible options where several capability modes can be set. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
To preserve backward compatibility because strict mode now lays under own block. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Current scheme of when to write and verify cpuinfo images is unclear: we define default mode to 'fpu' and this implies that no cpuinfo image get written on dump and read on restore. In turn if 'cpu' or 'ins' mode specified in command line we write and verify this image. This is all wrong -- we need to produce image if any mode ecxept 'none' is specified. The 'none' mode is designed exactly for skipping cpuinfo image production or verification. Because any non-default mode requires explicit --cpu-cap option to be passed we can use this and setup new CPU_CAP_IMAGE telling criu to write or read this image. Note the default mode doesn't break backward compatibility because by default we don't write or read the image at all. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
It should be there from the beginning but happen to escape. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
xsave sizes should sit in fpu capability block because instruction and strick mode checkig is a different thing. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Usually people simply leave cpu checkin in default mode (which is fpu level) but idea was to be able to compose a mixture of settings, for this sake CPU_CAP_ constants are bit shifts. Thus use bitwise operator for this. Same time define CPU_CAP_ as bit shifts explicitly and use explicit CPU_CAP_NONE compare where needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
No func changes. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Keep xsave sizes in image to be sure that on restore the application won't override memory out of xsave frame size if been calling xsave instruction directly. Here are some details: while been testing vz7 containers migration we've noticed that sometime applications do crash after restore, what is worse such execution abort may happen not immediately after the restore but after passing some time. After spending a lot of time we discovered that it is due to the fact that the migration is directed from an old cpu to a modern one which has extensions such as mpx. In result libc has cached small xsave size and then after restore any direct call to xsave instruction overwrite memory which is allocated with size less than needed. Thus we save xsave frame size in image and require it to match to prevent such situation. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmaill.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Before fix issubpath("./zdtm/static/mntns_shared_vs_private.test", "./") returned false, though should return true. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
colon operators are there obviously by mistake instead of semicolons Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
As mnt_roots always has a slash at the beginning we don't need another: (00.156035) 1: mnt: Move the root to //tmp/.criu.mntns.ZKVJHl/15-0000000000 Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
for i in $(find . -name "*.[ch]" -type f); do sed -i 's/\(pr_warn(".*[^n]\)\("[),]\)/\1\\n\2/' $i done Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
In RPC mode the log_level was always reset to the default log level of 2, if no configuration file was used. This saves the log level set via RPC in opts.log_level and a configuration file can overwrite it later, but if it is only set via RPC this value is not ignored now. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Kondo, Uchio authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
The -c and -f options were introduced on December 2011 with commit 485c4b50 show: Rework show procedure Added - ability to parse every single file crtools understands via magic number - dumped memory pages can be rendered in two modes -- as a simple set of pages' virtual addresses or in hexdummp fashion (via -c command line key). For example ./crtools -s -c -f pages-2557.img CR_FD_PAGES: pages-2557.img ---------------------------------------- 7fffb44ace20: 00 00 00 00 00 00 00 00 00 00 00 74 65 73 74 2f |. . . . . . . . . . . t e s t / | 7fffb44ace30: 74 65 73 74 2d 73 69 67 61 63 74 69 6f 6e 00 48 |t e s t - s i g a c t i o n . H | 7fffb44ace40: 4f 53 54 4e 41 4d 45 3d 6c 6f 63 61 6c 68 6f 73 |O S T N A M E = l o c a l h o s | 7fffb44ace50: 74 2e 6c 6f 63 61 6c 64 6f 6d 61 69 6e 00 54 45 |t . l o c a l d o m a i n . T E | The -p/--pid option was added on April 2013 with commit 73d7e283 show: Filter -D output with --pid option Show only image info relevant to given pid. Also reuse the introduced --pid argument for exec action. And the -F option was introduced on December 2013 with commit 7ab8a326 show: Implement simple images filtering The -F|--fields option specifies which fields (by name, comma separated) should be printed. For nested fields all names in path should be specified. All four options were used in combination with the deprecated --show command which has been decommissioned on February 2016 with commit a501b480 show: Remove deprecated code The 'show' action has been deprecated since 1.6, let's finally drop it. The print_data() routine is kept for yet another (to be deprecated too) feature called 'criu exec'. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
To handle message addresses and ucreds. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Fixes cov 191305 Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
It fails too often and nobody knows how to fix it. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
>>> CID 164715: (BUFFER_SIZE_WARNING) >>> Calling strncpy with a maximum size argument of 16 bytes on destination array "thread_args[i].comm" of size 16 bytes might leave the destination string unterminated. 3473 strncpy(thread_args[i].comm, core->tc->comm, TASK_COMM_LEN); Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
When zdtm.py is executed with `list` sub-command the 'criu_bin' option is not defined and criu.available() fails. $ python test/zdtm.py list Traceback (most recent call last): File "test/zdtm.py", line 2243, in <module> criu.available() File "test/zdtm.py", line 1185, in available if not os.access(opts['criu_bin'], os.X_OK): KeyError: u'criu_bin' However, we don't need to check the existence of criu_bin unless we use the `run` action. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Acked-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
It is especially important when accessing a hash -- there must be no negative indices ever. https://jira.sw.ru/browse/PSBM-82945Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
Most of the typos were found by codespell. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Radostin Stoyanov authored
There are no functional changes. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Adrian Reber authored
Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Alice Frosi authored
Signed-off-by:
Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
In commit 23b76949 ("dump: optimize dead_pid_conflict by searching in rbtree") we'd replaced for_each_pstree_item and thread walk search with pstree_pid_by_virt (rb-tree search). The latter already found us the thread with conflicting pid if it exists, the only thing left is to skip if the thread is also a main thread of the thread group (as it was before patch). But some leftover left which checks something wrong: we index ->threads array with "i", but "i" is not a number of the thread it is a number of current dead pid. Not sure if it helps with the initial bug and duplicates, but it might: https://jira.sw.ru/browse/PSBM-55217Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pawel Stradomski authored
This can happen when running in user namespace with auto-dedup enabled. Right now this means auto-dedup gets disabled. Signed-off-by:
Pawel Stradomski <pstradomski@google.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
call variables of type RemapFilePathEntry - "rpe" everywhere, similar as we already name them in oher places while on it remove unused second argument of open_remap_linked Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
./test//zdtm.py --set inhfd run --all --rpc Cc: Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
After running criu test, docker on the node becomes unusable, as it is confused by our leftover cgroups. Surely docker should be fixed to ignore custom cgroups (https://github.com/moby/moby/issues/37601), but we should not leave them after test also. v2: rmdir the holder only if it exists, remove racy wait and remove wrongly added cleanup method in class criu v3: bring back missed semicolon Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
When checkpointing applications with really big memory slab (like in our vz7 test with 920G of memory) the int type get cutted, we should use long int instead, just like we do in other code pieces. Otherwise get | pie: 756: Daemon waits for command | (01.193097) Wait for ack 12 on daemon socket | (01.193112) Fetched ack: 12 12 0 | (01.193164) 988065 fdinfo 0: pos: 0 flags: 100002/0 | (01.193201) fdinfo: type: 0xb flags: 0100002/0 pos: 0 fd: 0 | (01.193279) 988065 fdinfo 1: pos: 0 flags: 100002/0 | (01.193307) fdinfo: type: 0xb flags: 0100002/0 pos: 0 fd: 1 | (01.193341) 988065 fdinfo 2: pos: 0 flags: 100002/0 | (01.193365) fdinfo: type: 0xb flags: 0100002/0 pos: 0 fd: 2 | (01.193375) ---------------------------------------- | (01.193405) Error (criu/parasite-syscall.c:243): BUG at criu/parasite-syscall.c:243 | pie: 756: Error (criu/pie/parasite.c:676): Trimmed message received (1> Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
In case if pipe buffers are full the splicing may wakeup reader first with incomplete data transfer. Thus splice data in cycle. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
05:57:35.640: 1238: FAIL: fork.c:80: Task 16275 didn't exit (errno = 10 (No child processes)) There is no info about the killing signal in logs, add it. https://jira.sw.ru/browse/PSBM-87579Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-