RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2107954 - Unclear error message output when poweroff vm during postcopy migration.
Summary: Unclear error message output when poweroff vm during postcopy migration.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Fangge Jin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-18 01:38 UTC by Fangge Jin
Modified: 2022-11-08 09:47 UTC (History)
5 users (show)

Fixed In Version: libvirt-8.0.0-10.module+el8.7.0+16047+746a126c
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-08 09:20:55 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd log (599.72 KB, application/x-bzip)
2022-07-18 01:38 UTC, Fangge Jin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker LIBVIRTAT-13415 0 None None None 2022-09-20 07:00:13 UTC
Red Hat Issue Tracker RHELPLAN-127948 0 None None None 2022-07-18 01:39:26 UTC
Red Hat Product Errata RHSA-2022:7472 0 None None None 2022-11-08 09:21:47 UTC

Description Fangge Jin 2022-07-18 01:38:14 UTC
Created attachment 1897866 [details]
libvirtd log

Description of problem:
Do live migration, switch to postcopy, then poweroff inside vm. Migration failed, but the error message is not expected:
# virsh migrate vm1 qemu+tcp://dell-per740-04.******/system --live --verbose   --postcopy --p2p --bandwidth 3 --postcopy-bandwidth 10
Migration: [ 96 %]error: cannot get locked memory limit of process -1: No such file or directory

Our automation script covers this scenario, but you can close it if you think it is not a bug or not worth fixing

Version-Release number of selected component (if applicable):
libvirt-client-8.0.0-9.module+el8.7.0+15830+85788ab7.x86_64
qemu-kvm-6.2.0-17.module+el8.7.0+15924+b11d8c3f.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Start vm
2. Do live migration, and switch to postcopy
3. Check error message

Actual results:
error: cannot get locked memory limit of process -1: No such file or directory

Expected results:
error: operation failed: domain is not running

Additional info:

Comment 1 Jiri Denemark 2022-07-18 12:59:50 UTC
Could you please check if this is reproducible with upstream or RHEL-9.1.0
libvirt to confirm my suspicion this is in fact caused by backporting the
zero-copy migration patches to a different code base.

Comment 2 Fangge Jin 2022-07-18 13:01:13 UTC
It can't be reproduce with libvirt-8.5.0-1.el9.x86_64

Comment 3 Jiri Denemark 2022-07-18 13:18:31 UTC
Thanks. And I just noticed this bug is filed for 9.1 despite talking about libvirt from 8.7.0.

Comment 9 Fangge Jin 2022-08-01 03:33:33 UTC
Versions:
libvirt-8.0.0-10.module+el8.7.0+16047+746a126c.x86_64
qemu-kvm-6.2.0-18.module+el8.7.0+15999+d24f860e.x86_64

Test scenarios:
* non-p2p, poweroff vm during postcopy(passed)
** error: operation failed: domain is not running

* p2p, poweroff vm during postcopy(passed)
** error: operation failed: domain is not running

* non-p2p, poweroff vm during precopy(failed)
** error: cannot get locked memory limit of process -1: No such file or directory
** Also tested with libvirt-8.0.0-9.module+el8.7.0+15830+85788ab7.x86_64, can reproduce.

* p2p, poweroff vm during postcopy(passed)
** error: operation failed: domain is not running

Also tested same scenarios with RHEL9 packages, all passed:
libvirt-8.5.0-3.el9.x86_64
qemu-kvm-7.0.0-9.el9.x86_64

Comment 10 Jiri Denemark 2022-08-02 15:34:55 UTC
(In reply to Fangge Jin from comment #9)
> * non-p2p, poweroff vm during precopy(failed)
> ** error: cannot get locked memory limit of process -1: No such file or
> directory
> ** Also tested with libvirt-8.0.0-9.module+el8.7.0+15830+85788ab7.x86_64,
> can reproduce.

This is an issue even in upstream although it's masked by a patch which
changed the PID of an inactive domain from 0 to -1. As a result of this change
virProcessGetMaxMemLock does not fail when trying to get the limit for PID -1,
but rather succeeds reading the limit for PID 0, i.e., libvirt. Which might
actually be even worse as it may set the limit on libvirt daemon itself.

Anyway, it's harmless on RHEL 8.7.0.

Comment 12 errata-xmlrpc 2022-11-08 09:20:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: virt:rhel and virt-devel:rhel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7472


Note You need to log in before you can comment on or make changes to this bug.