Bug 1792723 - Domain set time does not release the lock
Summary: Domain set time does not release the lock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: 8.2
Assignee: Ján Tomko
QA Contact: Lili Zhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-19 12:31 UTC by Dan Zheng
Modified: 2020-05-12 10:25 UTC (History)
7 users (show)

Fixed In Version: libvirt-6.0.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 09:55:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd log (1.02 MB, text/plain)
2020-01-19 12:36 UTC, Dan Zheng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2017 0 None None None 2020-05-05 09:56:49 UTC

Description Dan Zheng 2020-01-19 12:31:18 UTC
Description of problem:
Domain set time does not releases the lock which causes getting domain time failed.

Version-Release number of selected component (if applicable):
libvirt-6.0.0-1.module+el8.2.0+5453+31b2b136.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start guest and get domain time and set domain time

# virsh domtime test
Time: 1579436433
# virsh domtime test --time 1000000000

2. Get domain time again, but get hung for 30 seconds and finally timeout.
# date;virsh domtime test;date
Sun Jan 19 07:23:01 EST 2020
error: Timed out during operation: cannot acquire state change lock (held by agent=remoteDispatchDomainSetTime)

Sun Jan 19 07:23:31 EST 2020




Actual results:

See above.
Expected results:

virsh command returns OK.

Additional info:

Comment 2 Dan Zheng 2020-01-19 12:36:39 UTC
Created attachment 1653621 [details]
libvirtd log

Comment 3 Ján Tomko 2020-01-20 07:02:21 UTC
Upstream patch:
https://www.redhat.com/archives/libvir-list/2020-January/msg00827.html

Comment 4 Ján Tomko 2020-01-20 08:29:22 UTC
Pushed as:
commit d61f95cf6a6fbd564e104c168d325581acd9cd8d
Author:     Ján Tomko <jtomko>
CommitDate: 2020-01-20 07:55:48 +0100

    qemu: end the agent job in qemuDomainSetTimeAgent
    
    This function grabs an agent job but ends a monitor job.
    End the agent job instead.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1792723
    
    Signed-off-by: Ján Tomko <jtomko>
    Reported-by: Dan Zheng <dzheng>
    Fixes: e005c95f56fee9ed780be7f8db103d690bd34cbd

git describe: v6.0.0-67-gd61f95cf6a

Comment 7 Lili Zhu 2020-02-12 10:16:35 UTC
Verify this bug with:
libvirt-6.0.0-4.module+el8.2.0+5642+838f3513.x86_64
qemu-kvm-4.2.0-8.module+el8.2.0+5607+dc756904.x86_64
qemu-guest-agent-4.2.0-8.module+el8.2.0+5607+dc756904.x86_64

1. Start guest and get domain time and set domain time
# virsh domtime rhel8.2
Time: 1581495530
[root@lenovo-sr630-06 ~]# virsh domtime rhel8.2 --time 1581495513

2. Get domain time again
[root@lenovo-sr630-06 ~]# date;virsh domtime rhel8.2; date
Wed Feb 12 05:11:38 EST 2020
Time: 1581495526
Wed Feb 12 05:11:38 EST 2020

As querying guest time did not hang, match with expected result, mark the bug as verified.

Comment 9 errata-xmlrpc 2020-05-05 09:55:54 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, 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/RHBA-2020:2017


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