<div dir="ltr">Interesting, how would I then â€œrevive” it if I add the final == TASK_STOPPED to that line? (Will respond about logs in another email, longer answer).</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 3, 2015 at 5:48 PM, Ruslan Kuprieiev <span dir="ltr">&lt;<a href="mailto:kupruser@gmail.com" target="_blank">kupruser@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi, Francisco,<span class=""><br>
    <br>
    <div>On 04.09.15 02:05, Francisco Tolmasky
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">So I have been tracking a bug in tonic (related to
        this logging issue, and general â€œbreaking” of pipes/streams),
        and I have narrowed part of the problem to the fact that we
        restore multiple containers simultaneously from the same source
        run. We do this to have them â€œwarm” and ready in case the user
        wants to go back to a previous checkpoint. So something along
        these lines happens:
        <div><br>
        </div>
        <div>Program is running -&gt; Checkpoint -&gt; immediate restore
          IN PARALLEL to original program/restore from previous
          checkpoint IN PARALLEL as well.</div>
        <div><br>
        </div>
        <div>So, you can end up with up to 3 copies of the same program
          running. Eventually that original one will die and we will
          choose one of the two â€œwaiting” copies to pick up from.</div>
        <div><br>
        </div>
        <div>So, my first question is whether you would expect things to
          start breaking in this scenario (they seem to work a lot of
          times, again, we see occasional failures over time in the form
          of stream breakages possibly, or just getting â€œstuck” (I
          believe it gets stuck waiting on a pipe though)). </div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <br></span>
    Could you provide some logs, please?<span class=""><br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>My second question is, if this is in fact not expected to
          work well, would it be possible to â€œRestore” a container but
          not â€œstart” it. That is, load up the memory get everything
          ready but have it waiting for a signal to actually kick off
          and get going. That way we can get most the benefit of
          pre-warming these restores, without having them all actually
          running at once.</div>
        <div><br>
        </div>
      </div>
    </blockquote>
    <br></span>
    That&#39;s a great question. I&#39;ve been thinking about implementing
    --leave-stopped for restore, but never actually came to that. I&#39;ve
    tried just adding || opts.final_state == TASK_STOPPED to
    <a href="https://github.com/xemul/criu/blob/master/cr-restore.c#L1715" target="_blank">https://github.com/xemul/criu/blob/master/cr-restore.c#L1715</a> and it
    seems to work just fine with a test loop, though I&#39;m not sure that
    it will always work in more complicated scenarios.<br>
    <br>
    Also added this task to TODO list[1].<br>
    <br>
    [1] <a href="http://criu.org/Todo" target="_blank">http://criu.org/Todo</a><br>
    <br>
    <blockquote type="cite"><span class="">
      <div dir="ltr">
        <div>Thanks,</div>
        <div><br>
        </div>
        <div>Francisco<br clear="all">
          <div><br>
          </div>
          -- <br>
          <div>Francisco Tolmasky<br>
            <a href="http://www.tolmasky.com" target="_blank">www.tolmasky.com</a><br>
            <a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a></div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </span><pre>_______________________________________________
CRIU mailing list
<a href="mailto:CRIU@openvz.org" target="_blank">CRIU@openvz.org</a>
<a href="https://lists.openvz.org/mailman/listinfo/criu" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Francisco Tolmasky<br><a href="http://www.tolmasky.com" target="_blank">www.tolmasky.com</a><br><a href="mailto:tolmasky@gmail.com" target="_blank">tolmasky@gmail.com</a></div>
</div>