All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: Thomas Huth <thuth@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none"
Date: Sun, 29 Jan 2017 14:03:29 +0100	[thread overview]
Message-ID: <20170129140329.3646dee3@bahia.lan> (raw)
In-Reply-To: <CAC2QTZZaaMgiiJbXgnLzBF+02=XnzKsofP7fwK7oF56maXY8Gg@mail.gmail.com>

On Sun, 29 Jan 2017 01:06:47 +0530
Ashijeet Acharya <ashijeetacharya@gmail.com> wrote:

> On Sun, Jan 29, 2017 at 12:11 AM, Greg Kurz <groug@kaod.org> wrote:
> > On Thu, 26 Jan 2017 14:46:52 +0530
> > Ashijeet Acharya <ashijeetacharya@gmail.com> wrote:
> >  
> >> Migration of a "none" machine with no RAM crashes abruptly as
> >> bitmap_new() fails and thus aborts. Instead, place a check for
> >> last_ram_offset() being '0' at the start of ram_save_setup() and
> >> error out with a meaningful error message.
> >>
> >> Signed-off-by: Ashijeet Acharya <ashijeetacharya@gmail.com>
> >> ---  
> >  
> 
> cc'ing Paolo in : I had an IRC chat with him and he has a very
> interesting twist in the tale to add here.
> 
> > Maybe a naive question: why a "none" machine with zero RAM should fail to
> > migrate ?  
> 
> Assuming you are referring to why its failing ATM; it fails because

My question was more: why deciding to fail migration instead of fixing the
crash ? One would naively think that no RAM is *just* less state to
migrate... but maybe the current code assumes that a machine always has
RAM.

> g_try_malloc0() inside bitmap_try_new() returns a NULL pointer for
> zero bits and thus the check for NULL inside bitmap_new() becomes true
> and it aborts. Check bitmap_new() for convenience.
> 
> Ignore the noise if you already knew this! :-)
> 

I hadn't checked, thanks for the details.

Cheers.

--
Greg

> Ashijeet

  reply	other threads:[~2017-01-29 13:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  9:16 [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none" Ashijeet Acharya
2017-01-26 11:25 ` Kashyap Chamarthy
2017-01-26 19:41 ` Dr. David Alan Gilbert
2017-01-27  9:37 ` Daniel P. Berrange
2017-01-27  9:46   ` Dr. David Alan Gilbert
2017-01-27  9:57     ` Daniel P. Berrange
2017-01-27  9:52   ` Ashijeet Acharya
2017-01-27  9:57     ` Daniel P. Berrange
2017-01-28 18:41 ` Greg Kurz
2017-01-28 19:36   ` Ashijeet Acharya
2017-01-29 13:03     ` Greg Kurz [this message]
2017-01-29 13:19       ` Ashijeet Acharya
2017-01-30 20:48         ` Paolo Bonzini
2017-02-01 17:53           ` Ashijeet Acharya

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=20170129140329.3646dee3@bahia.lan \
    --to=groug@kaod.org \
    --cc=ashijeetacharya@gmail.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.