Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <michsnyd@cisco.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFC] a prototype checkpoint-restart using core files
Date: Mon, 07 Nov 2005 20:56:00 -0000	[thread overview]
Message-ID: <436FB00E.40306@cisco.com> (raw)
In-Reply-To: <20051107190724.GA19531@nevyn.them.org>

Daniel Jacobowitz wrote:
> On Mon, Nov 07, 2005 at 07:57:25PM +0100, Mark Kettenis wrote:
> 
>>Heh, I'd expected Eli to ask for documentation ;-)
>>
>>Anyway, in this cause I think that's important since I expect a lot of
>>users won't understand its limitations.
>>
>>If I read the code correctly, there is one rather serious limitation
>>though: restoring mmapped area's will fail if the same area isn't
>>mapped in the target process.  Especially on systems that randomize
>>the location of mmapped memory this will make the usefullness of this
>>feature pretty limited :(.
> 
> 
> Why should it?  The expected use is to restore these dumps into the
> same running session - just after stepping a bit.  So unless you step
> across a very large free(), it should be fine.
> 
> I admit the general-purpose rcore command has a lot of limitations, but
> not as part of a checkpoint-restart system.

Yes, the next interesting task (before publication, I should think)
is to characterize and refine those limitations.  Experimentally,
I have found that I can jump backward across many system calls,
but not all.  I'd like to work on some idea of which ones are
always ok, which ones are sometimes ok, and which ones will never
be ok.

For instance, I wrote a simple test program that copies stdin
to stdout, one byte at a time, in a loop.  I ran it with input
and output redirected (so that it copies a file).  I checkpointed
it near the beginning, let it run thru 20,000 loops, then went
back to the checkpoint -- and then ran it to completion (so that
the first 20,000 bytes were copied twice).  The resulting input
and output files compared identical.

But when i repeated the experiment, but jumped backward across
50,000 loops, the output file was corrupted.

This is just a crude shot-in-the-dark experiment, obviously;
but it tends to show that we can get away with somewhat more
than we might at first suppose.

[this was ix86-linux native]


  reply	other threads:[~2005-11-07 19:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-03  1:55 Michael Snyder
2005-11-07  4:01 ` Daniel Jacobowitz
2005-11-07 14:57   ` Eli Zaretskii
2005-11-07 19:43     ` Mark Kettenis
2005-11-07 19:50       ` Daniel Jacobowitz
2005-11-07 20:56         ` Michael Snyder [this message]
2005-11-07 20:43       ` Michael Snyder
2005-11-07 22:07       ` Eli Zaretskii
2005-11-08  6:05         ` Michael Snyder
2005-11-18  8:18 Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=436FB00E.40306@cisco.com \
    --to=michsnyd@cisco.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox