Arm KVM guests fail to start if KVM_CREATE_VM returns EINTR

Bug #2019766 reported by dann frazier
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
Undecided
dann frazier
Kinetic
Fix Released
Undecided
dann frazier

Bug Description

[Impact]
KVM-accelerated virtual machines sometimes fail to start on ARM.

[Test Case]
My reproducer is to run 6 parallel VM create/destroy loop - using the attached test.sh script. When this issue is hit, a VM will fail with the following in its log:

2023-05-16T21:07:37.300791Z qemu-system-aarch64: Failed to retrieve host
CPU features
2023-05-16 21:07:37.466+0000: shutting down, reason=failed

[Fix]
https://gitlab.com/qemu-project/qemu/-/commit/bbde13cd14ad4eec18529ce0bf5876058464e124

[What Could Go Wrong]
There may exist conditions that could cause the added loop to block for a long time, burning CPU. However, the fix uses a seemingly common pattern.

dann frazier (dannf)
description: updated
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The fix is in qemu 7.2, so >=Lunar is already fixed.
But this really looks like a straight forward case to SRU.

Changed in qemu (Ubuntu):
status: New → Fix Released
tags: added: server-todo
dann frazier (dannf)
Changed in qemu (Ubuntu Jammy):
assignee: nobody → dann frazier (dannf)
Changed in qemu (Ubuntu Kinetic):
assignee: nobody → dann frazier (dannf)
status: New → In Progress
Changed in qemu (Ubuntu Jammy):
status: New → In Progress
Revision history for this message
dann frazier (dannf) wrote :
description: updated
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Please test proposed package

Hello dann, or anyone else affected,

Accepted qemu into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:7.0+dfsg-7ubuntu2.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in qemu (Ubuntu Kinetic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-kinetic
Changed in qemu (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello dann, or anyone else affected,

Accepted qemu into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:6.2+dfsg-2ubuntu6.9 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
dann frazier (dannf) wrote (last edit ):

= verification =
I started my test loop on both a kinetic and a jammy system *without* these updates installed, and verified that they are hitting this condition frequently as a baseline (notably, they hit it 64 and 32 times respectively). I then upgraded to the -proposed versions, and let them continue to run for at least 30 minutes and verified that neither hit this condition after the update.

Tested versions:

6.2+dfsg-2ubuntu6.9
7.0+dfsg-7ubuntu2.4

EDIT: The loop continued to run successfully overnight

tags: added: verification-done verification-done-jammy verification-done-kinetic
removed: verification-needed verification-needed-jammy verification-needed-kinetic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (qemu/1:7.0+dfsg-7ubuntu2.4)

All autopkgtests for the newly accepted qemu (1:7.0+dfsg-7ubuntu2.4) for kinetic have finished running.
The following regressions have been reported in tests triggered by the package:

ganeti/3.0.2-1ubuntu1 (armhf)
sbuild/0.83.1ubuntu1 (amd64, arm64, ppc64el, s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/kinetic/update_excuses.html#qemu

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (qemu/1:6.2+dfsg-2ubuntu6.9)

All autopkgtests for the newly accepted qemu (1:6.2+dfsg-2ubuntu6.9) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

livecd-rootfs/2.765.20 (amd64)
sbuild/0.81.2ubuntu6 (amd64, arm64, ppc64el, s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#qemu

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:7.0+dfsg-7ubuntu2.4

---------------
qemu (1:7.0+dfsg-7ubuntu2.4) kinetic; urgency=medium

  * d/p/u/lp-2019766-target-arm-kvm-Retry-KVM_CREATE_VM-call-if-it-fails-.patch:
    ARM: Retry KVM_CREATE_VM when it returns EINTR (LP: #2019766)

 -- dann frazier <email address hidden> Tue, 16 May 2023 14:59:50 -0600

Changed in qemu (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for qemu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu - 1:6.2+dfsg-2ubuntu6.9

---------------
qemu (1:6.2+dfsg-2ubuntu6.9) jammy; urgency=medium

  * d/p/u/lp-2019766-target-arm-kvm-Retry-KVM_CREATE_VM-call-if-it-fails-.patch:
    ARM: Retry KVM_CREATE_VM when it returns EINTR (LP: #2019766)

 -- dann frazier <email address hidden> Tue, 16 May 2023 14:59:54 -0600

Changed in qemu (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.