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 2171973 - Unexpected error show in virtqemud log when detaching a virtiofs device
Summary: Unexpected error show in virtqemud log when detaching a virtiofs device
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: libvirt
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-21 03:45 UTC by yafu
Modified: 2023-11-07 09:37 UTC (History)
6 users (show)

Fixed In Version: libvirt-9.2.0-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:30:47 UTC
Type: Bug
Target Upstream Version: 9.2.0
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-149282 0 None None None 2023-02-21 03:47:38 UTC
Red Hat Product Errata RHSA-2023:6409 0 None None None 2023-11-07 08:31:33 UTC

Description yafu 2023-02-21 03:45:13 UTC
Description of problem:
Unexpected error show in virttqemud log when detaching a virtiofs device

Version-Release number of selected component (if applicable):
libvirt-9.0.0-6.el9.x86_64
qemu-kvm-7.2.0-9.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1.1.Start a guest with virtiofs device:
#virsh start test2

#virsh dumpxml test2 --xpath //filesystem
<filesystem type="mount" accessmode="passthrough">
  <driver type="virtiofs" queue="512"/>
  <binary path="/usr/libexec/virtiofsd" xattr="on">
    <cache mode="none"/>
    <lock posix="off" flock="off"/>
  </binary>
  <source dir="/var/tmp/mount_tag0"/>
  <target dir="mount_tag3"/>
  <alias name="ua-8d50d10c-719d-11ed-91f4-3a40aa736603"/>
  <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
</filesystem>

2.Hotunplug the virtiofs device:
#virsh detach-device-alias test2 ua-8d50d10c-719d-11ed-91f4-3a40aa736603

3.Check the virtiofs device in the active xml:
# virsh dumpxml test2 --xpath //filesystem
no output

4.Check the syslog:
#cat /var/log/messages
Feb 20 22:37:28 ** virtqemud[1536633]: 1536636: error : virPidFileAcquirePath:401 : Failed to acquire pid file '/run/libvirt/qemu/11-test2-ua-8d50d10c-719d-11ed-91f4-3a40aa736603-fs.pid': Resource temporarily unavailable

5.Check the virtiofsd log:
#vim /var/log/libvirt/qemu/test2-ua-8d50d10c-719d-11ed-91f4-3a40aa736603-virtiofsd.log
[2023-02-21T03:34:22Z INFO  virtiofsd] Waiting for vhost-user socket connection...
[2023-02-21T03:34:22Z INFO  virtiofsd] Client connected, servicing requests
[2023-02-21T03:37:28Z INFO  virtiofsd] Client disconnected, shutting down
~                                                                         


Actual results:
The virtiofsd device detached successfully but unexpected error show in virttqemud log.

Expected results:
No error show in virtqemud log if the virtiofsd device detached successfully.

Additional info:

Comment 1 Michal Privoznik 2023-02-21 14:00:18 UTC
This is because qemuVirtioFSStop() which is called internally to kill virtiofsd, calls virPidFileForceCleanupPathFull() -> virPidFileAcquirePath() which reports error if it failed to lock PID file. In case virtiofsd is still running (and thus has the PID file locked), it is expected that libvirt fails to lock the PID file. No report should be reported though.

Comment 2 Ján Tomko 2023-03-07 16:16:34 UTC
Patches posted upstream:
https://listman.redhat.com/archives/libvir-list/2023-March/238504.html

Comment 3 Ján Tomko 2023-03-08 11:20:35 UTC
commit 7e94712699546b0dc9ec8307b19a39775761627c
Author:     Ján Tomko <jtomko>
CommitDate: 2023-03-08 12:16:56 +0100

    util: do not report errors in virPidFileForceCleanupPathFull
    
    Use the quiet version of virPidFileAcquirePath and remove the error
    reset, since there's nothing to reset anymore.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=2171973
    
    Signed-off-by: Ján Tomko <jtomko>
    Reviewed-by: Martin Kletzander <mkletzan>

git describe: v9.1.0-162-g7e94712699

Comment 4 Lili Zhu 2023-04-06 09:23:12 UTC
Tested with:
libvirt-9.2.0-1.el9.x86_64

Repeat Step1 to Step3 in https://bugzilla.redhat.com/show_bug.cgi?id=2171973#c0

4. check the log
# grep -ni "Failed to acquire pid" /var/log/libvirt/virtqemud.log

(no output)

Comment 7 Lili Zhu 2023-05-19 07:50:46 UTC
Tested with:
libvirt-9.3.0-1.el9.x86_64
qemu-kvm-8.0.0-1.el9.x86_64

Testing steps are the same with those in Comment #4

As the testing result matches with the expected one, mark the bug as verified.

Comment 9 errata-xmlrpc 2023-11-07 08:30:47 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 (Moderate: libvirt 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-2023:6409


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