- 12 Dec, 2017 16 commits
-
-
Andrei Vagin authored
CRIU doesn't handle correctly pipes with sizes which are bigger than a default one. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
a) As we shmalloced rpath it can not be xfreed. b) As we shmalloc variables in collect_remap_ghost() far away from open_remap_ghost() where we want to free them, there is no guaranty that our shmalloc was last and we can't use shfree_last(). fixes commit 0c675a5e ("files: remove link_remaps when everything has been restored") When create_ghost() fails for some reason that produces a segfault for me. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Reading and writing large buffers may result in short read/write. In cases we expect the entire buffer to be transferred use {read,write}_data rather than plain read/write syscalls. Reported-by: Mr Jenkins Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Some tests expect that all the data will be handled in a single invocation of read/write system call. But it possible to have short read/write on a loaded system and this is not an error. Add helper functions that will reliably read/write the entire buffer. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
If we start backroung memory fetch before restore is completely finished, we may try to write to the memory areas which were not yet remapped to proper place and are not registered with userfaultfd. Add synchronization between restore and the lazy-pages so that lazy-pages will only handle #PFs before all the tasks are restored. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
The remote page read has nothing to do if the page-server on the source has closed the connection. Just report an error and abort. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Currently when we poll a file descriptor, we only process EPOLLIN events and if a connection is closed the receiving side has no means to deal with it. Add a callback for EPOLL{RD}HUP events and the default implementation for these events that removes the file descriptor from epoll and closes it. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
A bit more readable and will be easy to distinguish from upcoming hevent^Whangup_event. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
The generic epoll_wait wrapper should not do any assumptions about timeout. It's it up to lazy-pages daemon to make (future) policy decisions. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
If we receive only part of the IOV from the page-server we recalculate the IOV so it will point to the area we still have to fetch. During the split, the IOV covering the remaining area may remain marked as 'queued' and we'll never retry fetching it. Marking the IOV as not queued will ensure its pages will be requested again. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Since commit e609267f681062b4370e528a50f635222e0c2330 ("page-pipe: allow to share pipes between page pipe buffers") the assumption that we will receive the exact amount of pages we've requested with PS_IOV_GET does not always hold. In the case we serve pages data from the images using 'page-server --lazy-page' the IOVs seen by the pagemap may cross page-pipe buffer boundaries and read_page_pipe will clamp the pages in the response to those boundaries. Adjust page_server_read so it will not try to receive more pages than page-server is going to send. Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Now criu create a new pipe buffer, if a previous one has another set of flags. In this case, a pipe is not full and we can use it for the next page buffer. We need 88 pipes to pre-dump the zdtm/static/fork test without this patch, and we need only 17 pipes with this patch. Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
v2: and move it upper, because it is going to be used in ppb_alloc() Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
vmsplice can't splice more than UIO_MAXIOV, but we can call it a few times from a parasite. v2: s/nr/nr_segs/ Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 29 Nov, 2017 3 commits
-
-
Adrian Reber authored
In addition to writing the CRIU version to the log file this adds the current kernel version to the log file: (00.000008) Version: 3.5 (gitid v3.5-511-ga8cc6cf) (00.000303) Running on node01 Linux 3.10.0-513.el7.x86_64 #1 SMP Tue Feb 29 06:78:90 EST 2017 x86_64 v2: - small changes as suggested by Dmitry (thanks) Signed-off-by:
Adrian Reber <areber@redhat.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
If ipv6 socket has an IPv4-mapped address, it is used to handle ipv4 connection, so we have to use ipv4 iptables rules to block this connection. Reported-by: Mr Jenkins Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Currently we use the "map_files/%p-%p" format, but actually it should be "map_files/%lx-%lx". The kernel could handle both formats, but recently Alexey Dobriyan fixed the kernel and it accept only the second format. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
- 23 Nov, 2017 21 commits
-
-
Andrei Vagin authored
We always ask users what version of criu they use to investigate a problem, so it better to have it in a log. Signed-off-by:
Andrei Vagin <avagin@openvz.org> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
criu and soccr has different values for log levels, so someone has to remap them. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Reported-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
root authored
This can help to investigate logs from Mr Jenkins. Cc: Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
When inotify is laying on uovermounted fs we should walk over all mountpoints with same s_dev to find openable path. Note on restore the path is usually already allocated during dump stage so get_mark_path won't call for open_handle(), in turn on dump stage the positive return from open_handle() will cause fsnotify engine to find openable path, thus there is kind of double work to be optimized in future. For example we got a container where systemd-udevd inside opens inotify for /dev/X entry then overmount ./dev path with slave option and in result irmap engine on predump can't figure out where the inotify is sitting causing migrtion to abort. Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Dmitry Safonov authored
config.h is a generated file with "build-features" defines. We use it for several purposes: o to check that compiler can do it's job o to complement user-visible API between distributions o to add compile-time options from .config global file It's used in criu and soccr, but compel also needs such thing. Previously, soccr has a link to config.h in criu includes, but it would be much cleaner to move it to other headers, that are shared between sub-projects into include/common. Reported-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Tested-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Dmitry Safonov authored
Distributions starts to supply GCC that is configured to compile -pie and -fPIC code by default due to security reasons. CONFIG_COMPAT was unfriendy to -pie by the reason of R_X86_64_32S relocation in call32.S helper: LINK criu/criu /usr/bin/ld: criu/arch/x86/crtools.built-in.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make[1]: *** [criu/Makefile:92: criu/criu] Error 1 make: *** [Makefile:225: criu] Error 2 Use %rip-relative addressing to avoid ld errors for shared binary linking. Puff, all needs to be done with bare hands! Now CONFIG_COMPAT can be used with -pie binaries and all should also work for debian toolchain (#315). Signed-off-by:
Dmitry Safonov <dsafonov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
v2: typo fix v3: run criu pre-dump via rpc v4: don't use status-fd for rpc Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
In this case we can wait it and get an exit code. For example, it will be useful for p.haul where one connection is used several times, so we need a way how to understand that page-server exited unexpectedly. v2: don't write ps_info if a start descriptor isn't set Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
So they can be reused. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Avindra Goolcharan authored
This file is not executable directly, so it should not have the shebang. Signed-off-by:
Avindra Goolcharan <aavindraa@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Begunkov authored
warning: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. if (major(st.st_rdev) != major(st_rtc.st_rdev) || Signed-off-by:
Pavel Begunkov <asml.silence@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
aio_context_t is 8 byte long so on 32 bit mode it might be strippped off when unsigned long used instead. Fix this typo. Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
v2: defining crit_bin and using it for Popen() // Mike Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The number of pipes are limited in a system, so it is better to know how many we use. Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
A server socket is created with AF_INET6, but a client socket is create with AF_INET. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
IPv6 listening sockets can accept both ipv4 and ipv6 connections, in both cases a family of an accepted socket will be AF_INET6. But we have to send tcp packets accoding with a connection type. ------------------------ grep Error ------------------------ (00.002320) 53: Debug: Will set rcv_wscale to 7 (00.002325) 53: Debug: Will turn timestamps on (00.002331) 53: Debug: Will set mss clamp to 65495 (00.002338) 53: Debug: Restoring TCP 1 queue data 2 bytes (00.002403) 53: Error (soccr/soccr.c:673): Unable to send a fin packet: libnet_write_raw_ipv6(): -1 bytes written (Network is unreachable) (00.002434) 53: Error (criu/files.c:1191): Unable to open fd=3 id=0x6 (00.002506) Error (criu/cr-restore.c:2171): Restoring FAILED. ------------------------ ERROR OVER ------------------------ Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The SO_REUSEPORT option allows multiple sockets on the same host to bind to the same port. This option has to ve restored when all sockets are bound to a port. The same logic is already used to restore SO_REUSEADDR. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
SO_REUSEPORT allows multiple sockets on the same host to bind to the same port. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-