Hello community,
here is the log from the commit of package criu for openSUSE:Factory checked in at 2014-09-19 13:56:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/criu (Old)
and /work/SRC/openSUSE:Factory/.criu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "criu"
Changes:
--------
--- /work/SRC/openSUSE:Factory/criu/criu.changes 2014-09-03 19:38:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.criu.new/criu.changes 2014-09-19 15:45:15.000000000 +0200
@@ -1,0 +2,11 @@
+Mon Sep 15 13:43:00 CEST 2014 - tiwai(a)suse.de
+
+- update to version 1.3.1, a stable releasing fixing below:
+ * Sibling restore mode didn't set up CRIU signals properly
+ * Unpredictable sibling/child root task restore. Fixed with
+ explicit CLI option
+ * Validation for leaf mount points was skipped
+ * Mount options were corrupted on dump, which resulted in errors
+ bind mounts detection
+
+-------------------------------------------------------------------
Old:
----
criu-1.3.tar.bz2
New:
----
criu-1.3.1.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ criu.spec ++++++
--- /var/tmp/diff_new_pack.S89hvT/_old 2014-09-19 15:45:16.000000000 +0200
+++ /var/tmp/diff_new_pack.S89hvT/_new 2014-09-19 15:45:16.000000000 +0200
@@ -16,9 +16,9 @@
#
-%define package_version 1.3
+%define package_version 1.3.1
Name: criu
-Version: 1.3
+Version: 1.3.1
Release: 0
Summary: Checkpoint/Restore In Userspace Tools
License: GPL-2.0
++++++ criu-1.3.tar.bz2 -> criu-1.3.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/Makefile new/criu-1.3.1/Makefile
--- old/criu-1.3/Makefile 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/Makefile 2014-09-12 10:14:39.000000000 +0200
@@ -1,6 +1,6 @@
VERSION_MAJOR := 1
VERSION_MINOR := 3
-VERSION_SUBLEVEL :=
+VERSION_SUBLEVEL := 1
VERSION_EXTRA :=
VERSION_NAME :=
VERSION_SO_MAJOR := 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/cr-restore.c new/criu-1.3.1/cr-restore.c
--- old/criu-1.3/cr-restore.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/cr-restore.c 2014-09-12 10:14:39.000000000 +0200
@@ -956,8 +956,13 @@
static void maybe_clone_parent(struct pstree_item *item,
struct cr_clone_arg *ca)
{
- if (opts.swrk_restore ||
- (opts.restore_detach && ca->core->thread_core->pdeath_sig)) {
+ /*
+ * zdtm runs in kernel 3.11, which has the problem described below. We
+ * avoid this by including the pdeath_sig test. Once users/zdtm migrate
+ * off of 3.11, this condition can be simplified to just test the
+ * options and not have the pdeath_sig test.
+ */
+ if (opts.restore_sibling) {
/*
* This means we're called from lib's criu_restore_child().
* In that case create the root task as the child one to+
@@ -978,6 +983,10 @@
if (item->rst->clone_flags & CLONE_NEWPID)
pr_warn("Set CLONE_PARENT | CLONE_NEWPID but it might cause restore problem,"
"because not all kernels support such clone flags combinations!\n");
+ } else if (opts.restore_detach) {
+ if (ca->core->thread_core->pdeath_sig)
+ pr_warn("Root task has pdeath_sig configured, so it will receive one _right_"
+ "after restore on CRIU exit\n");
}
}
@@ -1169,18 +1178,6 @@
}
act.sa_flags |= SA_NOCLDSTOP | SA_SIGINFO | SA_RESTART;
- if (root_as_sibling)
- /*
- * Root task will be our sibling. This means, that
- * we will not notice when (if) it dies in SIGCHLD
- * handler, but we should. To do this -- attach to
- * the guy with ptrace (below) and (!) make the kernel
- * deliver us the signal when it will get stopped.
- * It will in case of e.g. segfault before handling
- * the signal.
- */
- act.sa_flags &= ~SA_NOCLDSTOP;
-
act.sa_sigaction = sigchld_handler;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, SIGCHLD);
@@ -1668,6 +1665,20 @@
return -1;
if (root_as_sibling) {
+ struct sigaction act;
+ /*
+ * Root task will be our sibling. This means, that
+ * we will not notice when (if) it dies in SIGCHLD
+ * handler, but we should. To do this -- attach to
+ * the guy with ptrace (below) and (!) make the kernel
+ * deliver us the signal when it will get stopped.
+ * It will in case of e.g. segfault before handling
+ * the signal.
+ */
+ sigaction(SIGCHLD, NULL, &act);
+ act.sa_flags &= ~SA_NOCLDSTOP;
+ sigaction(SIGCHLD, &act, NULL);
+
if (ptrace(PTRACE_SEIZE, init->pid.real, 0, 0)) {
pr_perror("Can't attach to init");
goto out;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/cr-service.c new/criu-1.3.1/cr-service.c
--- old/criu-1.3/cr-service.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/cr-service.c 2014-09-12 10:14:39.000000000 +0200
@@ -244,6 +244,15 @@
if (req->root)
opts.root = req->root;
+ if (req->has_rst_sibling) {
+ if (!opts.swrk_restore) {
+ pr_err("rst_sibling is not allowed in standalone service\n");
+ return -1;
+ }
+
+ opts.restore_sibling = req->rst_sibling;
+ }
+
if (req->has_tcp_established)
opts.tcp_established_ok = req->tcp_established;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/crtools.c new/criu-1.3.1/crtools.c
--- old/criu-1.3/crtools.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/crtools.c 2014-09-12 10:14:39.000000000 +0200
@@ -129,13 +129,14 @@
int log_level = LOG_UNSET;
char *imgs_dir = ".";
char *work_dir = NULL;
- static const char short_opts[] = "dsRf:F:t:p:hcD:o:n:v::xVr:jlW:L:M:";
+ static const char short_opts[] = "dSsRf:F:t:p:hcD:o:n:v::xVr:jlW:L:M:";
static struct option long_opts[] = {
{ "tree", required_argument, 0, 't' },
{ "pid", required_argument, 0, 'p' },
{ "leave-stopped", no_argument, 0, 's' },
{ "leave-running", no_argument, 0, 'R' },
{ "restore-detached", no_argument, 0, 'd' },
+ { "restore-sibling", no_argument, 0, 'S' },
{ "daemon", no_argument, 0, 'd' },
{ "contents", no_argument, 0, 'c' },
{ "file", required_argument, 0, 'f' },
@@ -241,6 +242,9 @@
case 'd':
opts.restore_detach = true;
break;
+ case 'S':
+ opts.restore_sibling = true;
+ break;
case 'D':
imgs_dir = optarg;
break;
@@ -405,6 +409,11 @@
}
}
+ if (!opts.restore_detach && opts.restore_sibling) {
+ pr_msg("--restore-sibling only makes sense with --restore-detach\n");
+ return 1;
+ }
+
if (work_dir == NULL)
work_dir = imgs_dir;
@@ -541,6 +550,7 @@
"* Generic:\n"
" -t|--tree PID checkpoint a process tree identified by PID\n"
" -d|--restore-detached detach after restore\n"
+" -S|--restore-sibling restore root task as sibling\n"
" -s|--leave-stopped leave tasks in stopped state after checkpoint\n"
" -R|--leave-running leave tasks in running state after checkpoint\n"
" -D|--images-dir DIR directory for image files\n"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/include/cr_options.h new/criu-1.3.1/include/cr_options.h
--- old/criu-1.3/include/cr_options.h 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/include/cr_options.h 2014-09-12 10:14:39.000000000 +0200
@@ -32,6 +32,7 @@
bool check_ms_kernel;
bool show_pages_content;
bool restore_detach;
+ bool restore_sibling;
bool ext_unix_sk;
bool shell_job;
bool handle_file_locks;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/lib/criu.c new/criu-1.3.1/lib/criu.c
--- old/criu-1.3/lib/criu.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/lib/criu.c 2014-09-12 10:14:39.000000000 +0200
@@ -666,6 +666,9 @@
req.type = CRIU_REQ_TYPE__RESTORE;
req.opts = opts;
+ req.opts->has_rst_sibling = true;
+ req.opts->rst_sibling = true;
+
ret = send_req_and_recv_resp_sk(sks[0], &req, &resp);
close(sks[0]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/mount.c new/criu-1.3.1/mount.c
--- old/criu-1.3/mount.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/mount.c 2014-09-12 10:14:39.000000000 +0200
@@ -377,10 +377,9 @@
/* root mount can be any */
continue;
- if (m->parent->shared_id) {
+ if (m->parent->shared_id && !list_empty(&m->parent->mnt_share)) {
struct mount_info *ct;
- if (list_empty(&m->parent->mnt_share))
- continue;
+
t = list_first_entry(&m->parent->mnt_share, struct mount_info, mnt_share);
list_for_each_entry(ct, &t->children, siblings) {
@@ -902,19 +901,6 @@
return &fstypes[0];
}
-static char *strip(char *opt)
-{
- int len;
-
- len = strlen(opt);
- if (len > 1 && opt[len - 1] == ',')
- opt[len - 1] = '\0';
- if (opt[0] == ',')
- opt++;
-
- return opt;
-}
-
static int dump_one_mountpoint(struct mount_info *pm, int fd)
{
MntEntry me = MNT_ENTRY__INIT;
@@ -941,7 +927,7 @@
me.flags = pm->flags;
me.mountpoint = pm->mountpoint + 1;
me.source = pm->source;
- me.options = strip(pm->options);
+ me.options = pm->options;
me.shared_id = pm->shared_id;
me.has_shared_id = true;
me.master_id = pm->master_id;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/proc_parse.c new/criu-1.3.1/proc_parse.c
--- old/criu-1.3/proc_parse.c 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/proc_parse.c 2014-09-12 10:14:39.000000000 +0200
@@ -797,6 +797,7 @@
{
int i;
char *end;
+ size_t uoff = 0;
while (1) {
end = strchr(opt, ',');
@@ -815,15 +816,17 @@
return -1;
}
- strcpy(unknown, opt);
- unknown += strlen(opt);
- *unknown = ',';
- unknown++;
+ strcpy(unknown + uoff, opt);
+ uoff += strlen(opt);
+ unknown[uoff] = ',';
+ uoff++;
}
if (!end) {
+ if (uoff)
+ uoff--;
if (unknown)
- *unknown = '\0';
+ unknown[uoff] = '\0';
break;
} else
opt = end + 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.3/protobuf/rpc.proto new/criu-1.3.1/protobuf/rpc.proto
--- old/criu-1.3/protobuf/rpc.proto 2014-09-01 12:18:37.000000000 +0200
+++ new/criu-1.3.1/protobuf/rpc.proto 2014-09-12 10:14:39.000000000 +0200
@@ -52,6 +52,8 @@
repeated ext_mount_map ext_mnt = 23;
optional bool manage_cgroups = 24;
repeated cgroup_root cg_root = 25;
+
+ optional bool rst_sibling = 26; /* swrk only */
}
message criu_dump_resp {
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org