-
Evgenii Shatokhin authored
It may happen that a process has completed but its files in /proc/PID/ are still open by another process (see remap_dead_pid test from zdtm suite, for example). If the PID number has been given to some newer thread since then, this can be problematic. If that thread is the main thread of some process, it seems to be handled OK on restore. However, if it is a secondary thread, restore fails with an error like: pie: Error (pie/restorer.c:439): Thread pid mismatch 4404/4403 This is because open_remap_dead_process() adds a helper with PID 4403 to restore /proc/4403/* and that clashes with the thread's PID. It seems reasonable to detect such things at the checkpoint stage and refuse to dump, rather than to fail during restore. v.3: * Loop over dead_pids[] first: the array is likely to be empty. Note that it is still needed to iterate over the threads explicitly because pstree contains no items for the threads at that point. v.2: * Check for conflicts after all tasks have been dumped. One cannot rely on any particular order of tasks being dumped. Signed-off-by:
Evgenii Shatokhin <eshatokhin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
c4cf5f0b
Name |
Last commit
|
Last update |
---|---|---|
Documentation | ||
contrib | ||
crit | ||
criu | ||
images | ||
lib | ||
scripts | ||
test | ||
.gitignore | ||
.mailmap | ||
.travis.yml | ||
COPYING | ||
CREDITS | ||
Makefile | ||
Makefile.install | ||
Makefile.versions | ||
README.md |