qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: longpeng <longpeng2@huawei.com>
Cc: "jasowang@redhat.com" <jasowang@redhat.com>,
	"Gonglei \(Arei\)" <arei.gonglei@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"v.maffione@gmail.com" <v.maffione@gmail.com>,
	"quintela@redhat.com" <quintela@redhat.com>
Subject: Re: [Qemu-devel] [BUG] VM abort after migration
Date: Mon, 8 Jul 2019 10:47:50 +0100	[thread overview]
Message-ID: <20190708094750.GE2746@work-vm> (raw)
In-Reply-To: <785B5B0623C08241B2D0E6E7D8FA6B181E0A8FFF@DGGEMM506-MBX.china.huawei.com>

* longpeng (longpeng2@huawei.com) wrote:
> Hi guys,
> 
> We found a qemu core in our testing environment, the assertion
> 'assert(bus->irq_count[i] == 0)' in pcibus_reset() was triggered and
> the bus->irq_count[i] is '-1'.
> 
> Through analysis, it was happened after VM migration and we think
> it was caused by the following sequence:
> 
> *Migration Source*
> 1. save bus pci.0 state, including irq_count[x] ( =0 , old )
> 2. save E1000:
>    e1000_pre_save
>     e1000_mit_timer
>      set_interrupt_cause
>       pci_set_irq --> update pci_dev->irq_state to 1 and
>                   update bus->irq_count[x] to 1 ( new )
>     the irq_state sent to dest.
> 
> *Migration Dest*
> 1. Receive the irq_count[x] of pci.0 is 0 , but the irq_state of e1000 is 1.
> 2. If the e1000 need change irqline , it would call to pci_irq_handler(),
>   the irq_state maybe change to 0 and bus->irq_count[x] will become
>   -1 in this situation.
> 3. do VM reboot then the assertion will be triggered.
> 
> We also found some guys faced the similar problem:
> [1] https://lists.gnu.org/archive/html/qemu-devel/2016-11/msg02525.html
> [2] https://bugs.launchpad.net/qemu/+bug/1702621
> 
> Is there some patches to fix this problem ?

I don't remember any.

> Can we save pcibus state after all the pci devs are saved ?

Does this problem only happen with e1000? I think so.
If it's only e1000 I think we should fix it - I think once the VM is
stopped for doing the device migration it shouldn't be raising
interrupts.

Dave

> Thanks,
> Longpeng(Mike)
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


  reply	other threads:[~2019-07-08  9:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-03  8:34 [Qemu-devel] [BUG] VM abort after migration longpeng
2019-07-08  9:47 ` Dr. David Alan Gilbert [this message]
2019-07-10  3:25   ` Jason Wang
2019-07-10  3:36     ` Longpeng (Mike)
2019-07-10  3:57       ` Jason Wang
2019-07-10  8:27         ` Longpeng (Mike)
2019-07-27  6:10         ` Longpeng (Mike)
2019-07-29  8:16           ` Jason Wang

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=20190708094750.GE2746@work-vm \
    --to=dgilbert@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=jasowang@redhat.com \
    --cc=longpeng2@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=v.maffione@gmail.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;
as well as URLs for NNTP newsgroup(s).