From: "Longpeng (Mike)" <longpeng2@huawei.com>
To: Jason Wang <jasowang@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: "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: Wed, 10 Jul 2019 16:27:35 +0800 [thread overview]
Message-ID: <5621ea8b-00b5-8fd7-c34b-61e21928d9f8@huawei.com> (raw)
In-Reply-To: <2c37ed34-7cd9-8962-c4bd-d55b91336bd5@redhat.com>
在 2019/7/10 11:57, Jason Wang 写道:
>
> On 2019/7/10 上午11:36, Longpeng (Mike) wrote:
>> 在 2019/7/10 11:25, Jason Wang 写道:
>>> On 2019/7/8 下午5:47, Dr. David Alan Gilbert wrote:
>>>> * 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.
>>>
>>> I wonder maybe we can simply fix this by no setting ICS on pre_save() but
>>> scheduling mit timer unconditionally in post_load().
>>>
>> I also think this is a bug of e1000 because we find more cores with the same
>> frame thease days.
>>
>> I'm not familiar with e1000 so hope someone could fix it, thanks. :)
>>
>
> Draft a path in attachment, please test.
>
Thanks. We'll test it for a few weeks and then give you the feedback. :)
> Thanks
>
>
>>> Thanks
>>>
>>>
>>>> Dave
>>>>
>>>>> Thanks,
>>>>> Longpeng(Mike)
>>>> --
>>>> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
>>> .
>>>
--
Regards,
Longpeng(Mike)
next prev parent reply other threads:[~2019-07-10 8:28 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
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) [this message]
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=5621ea8b-00b5-8fd7-c34b-61e21928d9f8@huawei.com \
--to=longpeng2@huawei.com \
--cc=arei.gonglei@huawei.com \
--cc=dgilbert@redhat.com \
--cc=jasowang@redhat.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).