- 09 Dec, 2011 5 commits
-
-
Cyrill Gorcunov authored
Stage structures in one place. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Even u64 address might consume not greater than 20 bytes of string so 128 is enough and safe here. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
If a process continue to run, it may change a state of filesystem. @gorcunov: - Drop -k option, it's not needed anymore. - Allow -c option (continue execution of a process after being dumped) in dumping procedure. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
If you execute this script without arguments, it will execute all test cases, which should pass. Or the first argument may be a path to the test case. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 08 Dec, 2011 4 commits
-
-
Cyrill Gorcunov authored
Since we use pure syscalls there is no need to keep intermediate layer for signals. Moreover mask entry moved at the end of the structure so we will easily expand it if it'll be ever needed. Note it breaks backward compatibility with older image but since it's development stage it should be safe. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Probably all of you know about "lock inversion". There was a similar problem on restoring pipes. One process try to restore pipe1 and waits when another process attached to it. In this time another process restores pipe2 and waits too. I know two solves. 1. Open all pipes -> attach to them -> close unnecessary ends. This method has a problem, if only one end belongs to the process. In this cases another end occupies a descriptor, which may be needed to another pipe. 2. Restore pipes in the same order. This patch does that. A sorted list of pipe entries are constructed. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
This patch removed stange logic about minusers. Now we calculate foreign users only. The main idea of this patch, that we bind a pipe ends to correct descriptos immediately. When a process X creates a pipe, we have two cases: 1. Both ends belongs to this process. It's simple, we bind both ends to their descriptors and we go further. 2. Only one end of a pipe belongs to this process. In this case we are waiting all foreign users and we go futher. In second case we should wait, because a end which doesn't belong to this process occupies a file descriptor, which may be used by another pipe. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelianov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 07 Dec, 2011 2 commits
-
-
Andrey Vagin authored
CWD is saved as file descriptor with number -1. v2: use dump_regular_file Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Now I try to restore CWD and a relative path will be invalid. Add new options -D to set image files directory. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 06 Dec, 2011 1 commit
-
-
Andrey Vagin authored
Probably all of you know about "lock inversion". We have a similar problem on restoring pipes. This test case creates two process and two pipes. process 1: 11: pipe1 (w) 12: pipe2 (r) process 2: 11: pipe2 (r) 12: pipe1 (w) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 05 Dec, 2011 8 commits
-
-
Cyrill Gorcunov authored
There is no such file at all and it forced build process to re-build every make command passed. Reported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
It's already in OBJS Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
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 | Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
The standard descriptors may be redirected. crtool dumplicates stderr in rlimit.maxfileno-1 and this descriptor is inherited by all children and will be closed before sigreturn. Known issues: - The logging descriptor may be used by a target process and a resume will fail. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
Many programs use stdout for transferring data. v2: remove debug code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 03 Dec, 2011 1 commit
-
-
Cyrill Gorcunov authored
Since we operate with syscalls directly we are to convert signal's structures between image and kernel formats, without intermediate glibc layer. Note this involves chaging sa_entry::flags to u64 (since it's long int value in kernel). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 02 Dec, 2011 14 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's needed to keep singnal handlers on disk with predefined format. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
After all the child/threads stuff is moved to helpers it is possible to remove some unneeded code paths and local variables. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Move all the parsing of /proc/pid/children into a helper to be symmetrical with the threads parsing. Error from xrealloc is ignored as well. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
Move the whole code dealing with parsing threads at collect_pstree stage into one function. The nr_threads calculation is performed inside it based on the amount of directories in /proc/pid/task, not the Threads: count in status. Error from xrealloc is ignored by now. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
If a task is sleep in syscall, it should be restared. This logic is moved from kernel do_signal(). Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
This test suite contains many small test cases for different subsystems. Example of execution: # make busyloop00.pid # ../../../../crtools -d -t `cat busyloop00.pid` # kill -9 `cat busyloop00.pid` # ../../../../crtools -r -t `cat busyloop00.pid` # cat busyloop00.out PASS Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
sigactions are restored before memory and if a parent get a signal which has a handler, it will get segmentation fault. This problem will disappear, when we add a freezer, because all processes will be resumed after restoring. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Andrey Vagin authored
A file destriptor is opened for read-only and mmap with PROT_WRITE fails. We don't need PROT_WRITE for this case, because a file contains up to date data. lr-x------ 1 root root 64 Dec 1 19:10 20 -> /usr/lib64/gconv/gconv-modules.cache pos: 0 flags: 0100000 41155 mmap(0x7f2c3d6cf000, 28672, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 20, 0 <unfinished ...> 41155 <... mmap resumed> ) = -1 EACCES (Permission denied) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
v2: - Pavel reported there is no need to lock/unlock last-pid file in cycle, just lock it once before threads creation and unlock at the end. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
- 01 Dec, 2011 5 commits
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Cyrill Gorcunov authored
This also depends on kernel's inteface being changed, so kernel/ is updated as well. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-