I was debugging the case in gdb to check what exactly fail
qemuBlockRemoveImageMetadata (the one that emits the warning)
 -> qemuSecurityMoveImageMetadata
   -> virSecurityManagerMoveImageMetadata (where the former function was 
missing)

The first hit is the stacked security, which has an implementation:

Thread 18 "libvirtd" hit Breakpoint 3, virSecurityManagerMoveImageMetadata 
(mgr=0x7f8c1800fe10, pid=-1, src=src@entry=0x7f8c4c044440, dst=dst@entry=0x0)
    at ../../../src/security/security_manager.c:467
warning: Source file is more recent than executable.
467     {
(gdb) p mgr->drv->domainMoveImageMetadata
$1 = (virSecurityDomainMoveImageMetadata) 0x7f8c638a47e0 
<virSecurityStackMoveImageMetadata>

This essentially calls itself in the lower stack (=apparmor) and there
it is 0x0 as expected.

Thread 18 "libvirtd" hit Breakpoint 3, virSecurityManagerMoveImageMetadata 
(mgr=0x7f8c18047f10, pid=pid@entry=-1, src=src@entry=0x7f8c4c044440, 
dst=dst@entry=0x0)
    at ../../../src/security/security_manager.c:467
467     {
(gdb) n
468         if (mgr->drv->domainMoveImageMetadata) {
(gdb) p mgr->drv->domainMoveImageMetadata
$2 = (virSecurityDomainMoveImageMetadata) 0x0

Then there is DAC

(gdb) p mgr->drv->domainMoveImageMetadata
$3 = (virSecurityDomainMoveImageMetadata) 0x7f8c638a5570 
<virSecurityDACMoveImageMetadata>

Calling into:
virSecurityDACMoveImageMetadata (mgr=0x7f8c1805cf10, pid=-1, 
src=0x7f8c4c044440, dst=0x0) at ../../../src/security/security_dac.c:1122
warning: Source file is more recent than executable.

This is more promising as we see in the errors "subprocess fail" and DAC
uses those.

(gdb) bt
#0  virSecurityDACMoveImageMetadata (mgr=0x7f8c1805cf10, pid=-1, 
src=0x7f8c4c044440, dst=0x0) at ../../../src/security/security_dac.c:1122
#1  0x00007f8c638a8ecf in virSecurityManagerMoveImageMetadata 
(mgr=0x7f8c1805cf10, pid=pid@entry=-1, src=src@entry=0x7f8c4c044440, 
dst=dst@entry=0x0)
    at ../../../src/security/security_manager.c:471
#2  0x00007f8c638a4820 in virSecurityStackMoveImageMetadata (mgr=<optimized 
out>, pid=-1, src=0x7f8c4c044440, dst=0x0) at 
../../../src/security/security_stack.c:705
#3  0x00007f8c638a8ecf in virSecurityManagerMoveImageMetadata 
(mgr=0x7f8c1800fe10, pid=-1, src=src@entry=0x7f8c4c044440, dst=dst@entry=0x0) 
at ../../../src/security/security_manager.c:471
#4  0x00007f8c45938708 in qemuSecurityMoveImageMetadata 
(driver=driver@entry=0x7f8c18052c30, vm=vm@entry=0x7f8c180c4110, 
src=src@entry=0x7f8c4c044440, dst=dst@entry=0x0)
    at ../../../src/qemu/qemu_security.c:182
#5  0x00007f8c458630d0 in qemuBlockRemoveImageMetadata 
(driver=driver@entry=0x7f8c18052c30, vm=vm@entry=0x7f8c180c4110, 
diskTarget=0x7f8c4c043cd0 "vda", src=<optimized out>)
    at ../../../src/qemu/qemu_block.c:2628
#6  0x00007f8c458ca13b in qemuProcessStop (driver=driver@entry=0x7f8c18052c30, 
vm=vm@entry=0x7f8c180c4110, reason=reason@entry=VIR_DOMAIN_SHUTOFF_SHUTDOWN, 
    asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, flags=flags@entry=0) at 
../../../src/qemu/qemu_process.c:7568
#7  0x00007f8c45935fd9 in processMonitorEOFEvent (vm=0x7f8c180c4110, 
driver=0x7f8c18052c30) at ../../../src/qemu/qemu_driver.c:4792
#8  qemuProcessEventHandler (data=0x562f8f783aa0, opaque=0x7f8c18052c30) at 
../../../src/qemu/qemu_driver.c:4898
#9  0x00007f8c637f9faf in virThreadPoolWorker 
(opaque=opaque@entry=0x562f8f780e70) at ../../../src/util/virthreadpool.c:163
#10 0x00007f8c637f931c in virThreadHelper (data=<optimized out>) at 
../../../src/util/virthread.c:196
#11 0x00007f8c634bd609 in start_thread (arg=<optimized out>) at 
pthread_create.c:477
#12 0x00007f8c633e4103 in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1879325

Title:
  Unable to remove disk metadata on vm

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1879325/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to