qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [BUG] VM abort after migration
@ 2019-07-03  8:34 longpeng
  2019-07-08  9:47 ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: longpeng @ 2019-07-03  8:34 UTC (permalink / raw)
  To: jasowang@redhat.com, quintela@redhat.com, dgilbert@redhat.com,
	v.maffione@gmail.com
  Cc: longpeng, Gonglei (Arei), qemu-devel@nongnu.org

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 ?
Can we save pcibus state after all the pci devs are saved ?

Thanks,
Longpeng(Mike)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-07-29  8:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-03  8:34 [Qemu-devel] [BUG] VM abort after migration longpeng
2019-07-08  9:47 ` Dr. David Alan Gilbert
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

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).