1. 05 Aug, 2014 2 commits
    • Andrey Vagin's avatar
      mount: execute collect shared for all mounts · 8d446a7a
      Andrey Vagin authored
      Currently collect_shared is executed for each mount namespace separately,
      so we miss the dependencies between namespaces.
      
      For example, we have two namespaces, the first one contains a tmpfs mount
      and the second one contains a non-root bind-mount of this tmpfs. Without
      this patch this example can't be dumped.
      
      On restore mnt_build_tree() is called for all namespaces at once, thus
      this bug doesn't exist there.
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      8d446a7a
    • Andrey Vagin's avatar
      zdtm: rollback cwd only if a test case is executed in namespaces · 896fae70
      Andrey Vagin authored
      $ bash test/zdtm.sh -i 0 '\(ns/static/env00\|static/pty03\|static/mountpoints\)'
      ...
      ==================================== ERROR ====================================
      Test: zdtm/live/static/mountpoints, Namespace:
      Output file: /root/git/1/criu/test/zdtm/live/static/mountpoints.out
      ------------------------------------------------------------------------------
      00:53:03.267: 26935: FAIL: mountpoints.c:139: Can't umount all the filesystems (errno = 16 (Device or resource busy))
      ------------------------------------- END -------------------------------------
      ================================= ERROR OVER =================================
      
      Fixes: 0198590c (zdtm: Factor out starting the test via Makefule)
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      896fae70
  2. 04 Aug, 2014 18 commits
  3. 17 Jul, 2014 3 commits
  4. 16 Jul, 2014 2 commits
    • Andrew Vagin's avatar
      cgroup: don't look up existing mount point · dda742ec
      Andrew Vagin authored
      A mount point, which is mounted by someone else, may be umounted in
      any moment.
      
      For example the test system executes tests concurrently and sometimes
      one test looks up a mount point, which has been mounted by another test.
      
      ==================================== ERROR ====================================
      Test: zdtm/live/static/inotify00, Namespace: 1
      Dump log   : /var/lib/jenkins/jobs/CRIU-dump/workspace/test/dump/inotify00/15535/1/dump.log
      --------------------------------- grep Error ---------------------------------
      (00.021951) Error (cgroup.c:409): cg: failed walking /var/lib/jenkins/jobs/CRIU-dump/workspace/test/dump/signalfd00/15538/1/.criu.cgmounts.UGj28v/ for empty cgroups
      (00.021967) Error (cr-dump.c:1601): Dump core (pid: 15535) failed with -1
      (00.025509) Error (cr-dump.c:1914): Dumping FAILED.
      ------------------------------------- END -------------------------------------
      ================================= ERROR OVER =================================
      
      In the previous patch I suggested to open a mount point, but it brought
      other problems. We may open a directory where a cgroup mount has been
      umounted and an owner will get EBUSY on attempt to remove this
      directory.
      
      Reported-by: Jenkins Criuovich
      Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      dda742ec
    • Pavel Emelyanov's avatar
      cg: Don't walk cgroup tree when it's not required · 97f7d179
      Pavel Emelyanov authored
      We have two bugs actually.
      
      First, the check for 'item == root_item' in dump_task_cgroup fires
      twice: first when we rite inventory (item == NULL as argument and
      root_item == NULL because we haven't yet collected tasks) and the
      2nd time when we dump the root task itself.
      
      The 2nd issue sits in dump_cgroups() -- if root_cgset == criu_cgset
      we don't write cgroups information at all (checking that we don't
      have them with list_is_singular() inside that if). That said, we
      don't need to read the cgroups tree if we're not going to dump it.
      
      This patch fixes both.
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
      Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      97f7d179
  5. 15 Jul, 2014 4 commits
  6. 14 Jul, 2014 6 commits
  7. 11 Jul, 2014 5 commits