1. 18 Sep, 2014 1 commit
  2. 16 Sep, 2014 3 commits
  3. 15 Sep, 2014 1 commit
  4. 12 Sep, 2014 2 commits
  5. 10 Sep, 2014 5 commits
    • Andrey Vagin's avatar
      zdtm/mountpoints: add "unknown" options to reproduce the previous bug · 75768982
      Andrey Vagin authored
      tmpfs has the "size" option, which is not standard.
      
      Execute zdtm/live/static/mountpoints
      ./mountpoints --pidfile=mountpoints.pid --outfile=mountpoints.out
      Dump 2737
      WARNING: mountpoints returned 1 and left running for debug needs
      Test: zdtm/live/static/mountpoints, Result: FAIL
      ==================================== ERROR ====================================
      Test: zdtm/live/static/mountpoints, Namespace:
      Dump log   : /root/git/criu/test/dump/static/mountpoints/2737/1/dump.log
      --------------------------------- grep Error ---------------------------------
      (00.146444) Error (mount.c:399): Two shared mounts 50, 67 have different sets of children
      (00.146460) Error (mount.c:402): 67:./zdtm_mpts/dev/share-1 doesn't have a proper point for 54:./zdtm_mpts/dev/share-3/test.mnt.share
      (00.146820) Error (cr-dump.c:1921): Dumping FAILED.
      ------------------------------------- END -------------------------------------
      ================================= ERROR OVER =================================
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Tested-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      75768982
    • Andrey Vagin's avatar
      mount: strip options for all mounts · f88d72d0
      Andrey Vagin authored
      Currently we stript options only one of brothers, but
      mount_equal() thinks that two brothers should have the same options.
      
      Execute zdtm/live/static/mountpoints
      ./mountpoints --pidfile=mountpoints.pid --outfile=mountpoints.out
      Dump 2737
      WARNING: mountpoints returned 1 and left running for debug needs
      Test: zdtm/live/static/mountpoints, Result: FAIL
      ==================================== ERROR ====================================
      Test: zdtm/live/static/mountpoints, Namespace:
      Dump log   : /root/git/criu/test/dump/static/mountpoints/2737/1/dump.log
      --------------------------------- grep Error ---------------------------------
      (00.146444) Error (mount.c:399): Two shared mounts 50, 67 have different sets of children
      (00.146460) Error (mount.c:402): 67:./zdtm_mpts/dev/share-1 doesn't have a proper point for 54:./zdtm_mpts/dev/share-3/test.mnt.share
      (00.146820) Error (cr-dump.c:1921): Dumping FAILED.
      ------------------------------------- END -------------------------------------
      ================================= ERROR OVER =================================
      Reported-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Tested-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      f88d72d0
    • Andrey Vagin's avatar
      mount: don't skip checks in validate_mounts() · cb738520
      Andrey Vagin authored
      "continue" is called by mistake, so we skip a few checks for shared
      mounts without siblings.
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      cb738520
    • Pavel Emelyanov's avatar
      restore: Introduce the --restore-sibling option · 53957fad
      Pavel Emelyanov authored
      We have a slight mess with how criu restores root task.
      Right now we have the following options.
      
      1) CLI
      	a) Usually
      	task calling criu
      	 `- criu
      	     `- root restored task
      
      	b) when --restore-detached AND root has pdeath_sig
      
      	task calling criu
      	 `- criu
      	 `- root restored task
      
      2) Library/SWRK
      	task using lib/swrk
      	 `- criu
      	 `- root restored task
      
      3) Standalone service
      	a) Usually
      	service
      	 `- service sub task
      	     `- root restored task
      
      	b) when root has pdeath_sig
      	criu service
      	 `- criu sub task
      	 `- root restored task
      
      It would be better is CRIU always restored the root task as sibling,
      but we have 3 constraints:
      
      First, the case 1.a is kept for zdtm to run tests in pid namespaces
      on 3.11, which in turn doesn't allow CLONE_PARENT | CLONE_NEWPID.
      
      Second, CLI w/o --restore-detach waits for the restored task to die and
      this behavior can be "expected" already.
      
      Third, in case of standalone service tasks shouldn't become service's
      children.
      
      And I have one "plan". The p.haul project while live migrating tasks
      on destination node starts a service, which uses library/swrk mode. In
      this case the restored processes become p.haul service's kids which is
      also not great.
      
      That said, here's the option called --restore-child that pairs the
      --restore-detach like this:
      
      * detached AND child:
      
      task
       `- criu restore (exits at the end)
       `- root task
      
      The root task will become task's child.
      This will be default to library/swrk.
      This is what LXC needs.
      
      * detach AND !child
      
      task
       `- criu restore (exits at the end)
           `- root task
      
      The root task will get re-parented to init.
      This will be compatible with 1.3.
      This will be default to standalone service and
      to my wish with the p.haul case.
      
      * !detach AND child
      
      task
       `- criu restore (waits for root task to die)
       `- root task
      
      This should be deprecated, so that criu restore doesn't mess
       with task <-> root task signalling.
      
      * !detach AND !child
      
      task
       `- criu restore (waits for root task to die)
           `- root task
      
      This is how plain criu restore works now.
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      Acked-by: 's avatarAndrew Vagin <avagin@openvz.org>
      53957fad
    • Tycho Andersen's avatar
      restore: use root_as_sibling only after defining it · 1ff2500b
      Tycho Andersen authored
      root_as_sibling was used in criu_signals_setup(), but was only defined later
      (when forking the root task for the first time). This meant that the
      SA_NOCLDSTOP was never masked off, which meant SIGCHLD was never delivered
      after ptracing the root task. Thus, when the a child of the root task died
      (e.g. from cr_system), the root task sat in PTRACE_STOP, and the restore task
      never PTRACE_CONT'd, resulting in a deadlock.
      
      Instead, we only unmask SA_NOCLDSTOP right before we PTRACE_SEIZE, after the
      value is defined.
      
      v2: re-work the condition for CLONE_PARENT
      v3: move unmasking of SA_NOCLDSTOP to restore_root_task
      v4: keep all the comments in the original code
      Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      1ff2500b
  6. 09 Sep, 2014 2 commits
  7. 05 Sep, 2014 10 commits
  8. 04 Sep, 2014 2 commits
    • Andrey Vagin's avatar
      cgroups: allow to execute fini_cgroups a few times · 5c265707
      Andrey Vagin authored
      It is called from prepare_cgroup_sfd() and cr_restore_tasks().
      
      + criu restore --file-locks --tcp-established --evasive-devices --link-remap --root /var/lib/vz/root/101 --restore-detached --action-script /usr/local/libexec/vzctl/scripts/vps-rst-env -D /vz/dump/Dump.101 -o restore.log -vvvv --pidfile /var/lib/vzctl/vepid/101
      *** Error in `criu': double free or corruption (fasttop): 0x00000000006bcd40 ***
      
      Program terminated with signal 6, Aborted.
      Missing separate debuginfos, use: debuginfo-install glibc-2.17-20.fc19.x86_64 libgcc-4.8.3-1.fc19.x86_64 protobuf-c-0.15-7.fc19.x86_64
      (gdb) bt
       #0  0x00007ffff72179e9 in raise () from /lib64/libc.so.6
       #1  0x00007ffff72190f8 in abort () from /lib64/libc.so.6
       #2  0x00007ffff7257d17 in __libc_message () from /lib64/libc.so.6
       #3  0x00007ffff725f0b8 in _int_free () from /lib64/libc.so.6
       #4  0x0000000000426971 in cr_restore_tasks () at cr-restore.c:1833
       #5  0x0000000000418426 in main (argc=<optimized out>, argv=0x7fffffffeb38, envp=<optimized out>) at crtools.c:479
      Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      5c265707
    • Cyrill Gorcunov's avatar
      test: inotify00 -- Rework test, v2 · 68138cf3
      Cyrill Gorcunov authored
      To show which events are coming and flush events before dump as required by new fsnotify mode.
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
      Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      68138cf3
  9. 03 Sep, 2014 11 commits
  10. 02 Sep, 2014 3 commits