Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1775488

Summary: libvirtd crashes when "blockpull" cancelled by "blockjob --abort"
Product: Red Hat Enterprise Linux Advanced Virtualization Reporter: Dan Zheng <dzheng>
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: CLOSED DUPLICATE QA Contact: yisun
Severity: high Docs Contact:
Priority: high    
Version: 8.2CC: eskultet, lmen, pkrempa, weizhan, xuzhang, ymankad
Target Milestone: rcKeywords: Automation, TestBlocker
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-27 12:43:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dan Zheng 2019-11-22 05:02:12 UTC
Description of problem:
libvirtd crashes when doing block pull.

Version-Release number of selected component (if applicable):
libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64
qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64
kernel-4.18.0-80.el8.x86_64
perl-Sys-Virt-5.8.0-1.module+el8.2.0+4793+b09dd2fb.x86_64


How reproducible:
100%

Steps to Reproduce:

1. Run libvirt-tck command:
# libvirt-tck --testdir scripts/qemu/300-blockjob-lifecycle.t -v --force
...
ok 11 - running domain has an ID > 0
ok 12 - start to block pull and block job bandwidth is 1MB/S
ok 13 - abort block job
ok 14 - continue to block pull and block job bandwidth is 1MB/S
ok 15 - abort block job
libvirt error code: 38, message: End of file while reading data: Input/output error
libvirt error code: 1, message: internal error: client socket is closed

libvirtd restarted automatically.
libvirtd log:

    Thread 2 "libvirtd" received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x7f4e44757700 (LWP 27385)]
    0x00007f4e04f5efba in qemuDomainObjBeginJobInternal (driver=driver@entry=0x7f4de4113b60, obj=0x7f4e1c0112c0, job=job@entry=QEMU_JOB_QUERY,
        agentJob=agentJob@entry=QEMU_AGENT_JOB_NONE, asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, nowait=nowait@entry=false) at qemu/qemu_domain.c:8268
    8268        virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
    (gdb) t a a bt
     
    Thread 18 (Thread 0x7f4e00c8d700 (LWP 27472)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x7f4de41eb490) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7f4de41eb440, cond=0x7f4de41eb468) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x7f4de41eb468, mutex=mutex@entry=0x7f4de41eb440) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x7f4de41eb468, m=m@entry=0x7f4de41eb440) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098bd1f30) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 17 (Thread 0x7f4e0148e700 (LWP 27455)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x7f4de40f7ab8) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x7f4de40f7a50, cond=0x7f4de40f7a90) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x7f4de40f7a90, mutex=mutex@entry=0x7f4de40f7a50) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x7f4de40f7a90, m=m@entry=0x7f4de40f7a50) at util/virthread.c:144
    #4  0x00007f4e0592bb34 in udevEventHandleThread (opaque=<optimized out>) at node_device/node_device_udev.c:1571
    #5  0x00007f4e5b1f079a in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 16 (Thread 0x7f4e036ce700 (LWP 27399)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098bcfeb0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098bcfe60, cond=0x563098bcfe88) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098bcfe88, mutex=mutex@entry=0x563098bcfe60) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098bcfe88, m=m@entry=0x563098bcfe60) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098bcab30) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 15 (Thread 0x7f4dfbfff700 (LWP 27398)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098bcfeb0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098bcfe60, cond=0x563098bcfe88) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098bcfe88, mutex=mutex@entry=0x563098bcfe60) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098bcfe88, m=m@entry=0x563098bcfe60) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098bcb310) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    --Type <RET> for more, q to quit, c to continue without paging--
     
    Thread 14 (Thread 0x7f4e03ecf700 (LWP 27397)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098bcfeb0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098bcfe60, cond=0x563098bcfe88) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098bcfe88, mutex=mutex@entry=0x563098bcfe60) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098bcfe88, m=m@entry=0x563098bcfe60) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098ba5420) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 13 (Thread 0x7f4e046d0700 (LWP 27396)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098bcfeb0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098bcfe60, cond=0x563098bcfe88) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098bcfe88, mutex=mutex@entry=0x563098bcfe60) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098bcfe88, m=m@entry=0x563098bcfe60) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098ba5b40) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 12 (Thread 0x7f4e04ed1700 (LWP 27395)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098bcfeb0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098bcfe60, cond=0x563098bcfe88) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098bcfe88, mutex=mutex@entry=0x563098bcfe60) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098bcfe88, m=m@entry=0x563098bcfe60) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098ba68e0) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 11 (Thread 0x7f4e3b7fe700 (LWP 27394)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67e84) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67e58) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67e58, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67e58, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f1474 in virThreadPoolWorker (opaque=opaque@entry=0x563098b71da0) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    --Type <RET> for more, q to quit, c to continue without paging--
     
    Thread 10 (Thread 0x7f4e3bfff700 (LWP 27393)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67e80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67e58) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67e58, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67e58, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f1474 in virThreadPoolWorker (opaque=opaque@entry=0x563098b71df0) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 9 (Thread 0x7f4e40f50700 (LWP 27392)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67e84) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67e58) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67e58, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67e58, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f1474 in virThreadPoolWorker (opaque=opaque@entry=0x563098b71e40) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 8 (Thread 0x7f4e41751700 (LWP 27391)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67e80) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67e58) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67e58, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67e58, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f1474 in virThreadPoolWorker (opaque=opaque@entry=0x563098b71f70) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 7 (Thread 0x7f4e41f52700 (LWP 27390)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67e84) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67e58) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67e58, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67e58, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f1474 in virThreadPoolWorker (opaque=opaque@entry=0x563098b71fc0) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    --Type <RET> for more, q to quit, c to continue without paging--
     
    Thread 6 (Thread 0x7f4e42753700 (LWP 27389)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67de4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67db8) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67db8, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67db8, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098b72090) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 5 (Thread 0x7f4e42f54700 (LWP 27388)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67de4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67db8) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67db8, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67db8, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098b72170) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 4 (Thread 0x7f4e43755700 (LWP 27387)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67de4) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67db8) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67db8, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67db8, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098b722b0) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 3 (Thread 0x7f4e43f56700 (LWP 27386)):
    #0  futex_wait_cancelable (private=0, expected=0, futex_word=0x563098b67de0) at ../sysdeps/unix/sysv/linux/futex-internal.h:88
    #1  __pthread_cond_wait_common (abstime=0x0, mutex=0x563098b67d90, cond=0x563098b67db8) at pthread_cond_wait.c:502
    #2  __pthread_cond_wait (cond=cond@entry=0x563098b67db8, mutex=mutex@entry=0x563098b67d90) at pthread_cond_wait.c:655
    #3  0x00007f4e5b1f09ea in virCondWait (c=c@entry=0x563098b67db8, m=m@entry=0x563098b67d90) at util/virthread.c:144
    #4  0x00007f4e5b1f14c3 in virThreadPoolWorker (opaque=opaque@entry=0x563098b72400) at util/virthreadpool.c:120
    #5  0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #6  0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #7  0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
    --Type <RET> for more, q to quit, c to continue without paging--
     
    Thread 2 (Thread 0x7f4e44757700 (LWP 27385)):
    #0  0x00007f4e04f5efba in qemuDomainObjBeginJobInternal (driver=driver@entry=0x7f4de4113b60, obj=0x7f4e1c0112c0, job=job@entry=QEMU_JOB_QUERY,
        agentJob=agentJob@entry=QEMU_AGENT_JOB_NONE, asyncJob=asyncJob@entry=QEMU_ASYNC_JOB_NONE, nowait=nowait@entry=false) at qemu/qemu_domain.c:8268
    #1  0x00007f4e04f63575 in qemuDomainObjBeginJob (driver=driver@entry=0x7f4de4113b60, obj=<optimized out>, job=job@entry=QEMU_JOB_QUERY) at qemu/qemu_domain.c:8479
    #2  0x00007f4e04fe273f in qemuDomainGetBlockJobInfo (dom=0x7f4e3c000d10, path=0x7f4e3c0058a0 "/var/cache/libvirt-tck/storage-fs/tck/tck-main", info=0x7f4e44756850,
        flags=0) at qemu/qemu_driver.c:17771
    #3  0x00007f4e5b39f465 in virDomainGetBlockJobInfo (dom=dom@entry=0x7f4e3c000d10, disk=0x7f4e3c0058a0 "/var/cache/libvirt-tck/storage-fs/tck/tck-main",
        info=info@entry=0x7f4e44756850, flags=0) at libvirt-domain.c:9971
    #4  0x0000563096f0aef1 in remoteDispatchDomainGetBlockJobInfo (server=0x563098b67c80, msg=0x563098bab440, ret=0x7f4e3c003120, args=0x7f4e3c003cd0,
        rerr=0x7f4e44756960, client=<optimized out>) at remote/remote_daemon_dispatch.c:3541
    #5  remoteDispatchDomainGetBlockJobInfoHelper (server=0x563098b67c80, client=<optimized out>, msg=0x563098bab440, rerr=0x7f4e44756960, args=0x7f4e3c003cd0,
        ret=0x7f4e3c003120) at remote/remote_daemon_dispatch_stubs.h:5688
    #6  0x00007f4e5b2cd839 in virNetServerProgramDispatchCall (msg=0x563098bab440, client=0x563098bb43b0, server=0x563098b67c80, prog=0x563098bd39a0)
        at rpc/virnetserverprogram.c:435
     
    #7  virNetServerProgramDispatch (prog=0x563098bd39a0, server=server@entry=0x563098b67c80, client=0x563098bb43b0, msg=0x563098bab440) at rpc/virnetserverprogram.c:302
    #8  0x00007f4e5b2d29dc in virNetServerProcessMsg (msg=<optimized out>, prog=<optimized out>, client=<optimized out>, srv=0x563098b67c80) at rpc/virnetserver.c:137
    #9  virNetServerHandleJob (jobOpaque=<optimized out>, opaque=0x563098b67c80) at rpc/virnetserver.c:158
    #10 0x00007f4e5b1f13e0 in virThreadPoolWorker (opaque=opaque@entry=0x563098b73040) at util/virthreadpool.c:163
    #11 0x00007f4e5b1f076c in virThreadHelper (data=<optimized out>) at util/virthread.c:196
    #12 0x00007f4e5796d2de in start_thread (arg=<optimized out>) at pthread_create.c:486
    #13 0x00007f4e5769da63 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
     
    Thread 1 (Thread 0x7f4e5bd15b80 (LWP 27384)):
    #0  0x00007f4e576927e1 in __GI___poll (fds=fds@entry=0x563098bb2d20, nfds=nfds@entry=10, timeout=timeout@entry=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
    #1  0x00007f4e5b19477a in poll (__timeout=-1, __nfds=10, __fds=0x563098bb2d20) at /usr/include/bits/poll2.h:46
    #2  virEventPollRunOnce () at util/vireventpoll.c:636
    #3  0x00007f4e5b193325 in virEventRunDefaultImpl () at util/virevent.c:322
    #4  0x00007f4e5b2d2215 in virNetDaemonRun (dmn=dmn@entry=0x563098b67940) at rpc/virnetdaemon.c:836
    #5  0x0000563096ef4fbb in main (argc=<optimized out>, argv=<optimized out>) at remote/remote_daemon.c:1438

Actual results:


Expected results:


Additional info:

Comment 1 Erik Skultety 2019-11-22 08:34:42 UTC
(In reply to Dan Zheng from comment #0)
> Description of problem:
> libvirtd crashes when doing block pull.
> 
> Version-Release number of selected component (if applicable):
> libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64
> qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64
> kernel-4.18.0-80.el8.x86_64
> perl-Sys-Virt-5.8.0-1.module+el8.2.0+4793+b09dd2fb.x86_64
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 
> 1. Run libvirt-tck command:
> # libvirt-tck --testdir scripts/qemu/300-blockjob-lifecycle.t -v --force

where does ^this test come from? It doesn't exist in upstream TCK, so I can't reproduce this, can I see the test?

Comment 4 yisun 2019-11-27 04:51:49 UTC
Manually reproduced with: libvirt-5.9.0-4.module+el8.2.0+4836+a8e32ad7.x86_64
Open two terminals:
T1 = Terminal 1
T2 = Terminal 2

Steps:
T1:
  1. create a snapshot for a vm
    # virsh domstate avocado-vt-vm1
    running
    # virsh snapshot-create-as avocado-vt-vm1 snap1 --disk-only
    Domain snapshot snap1 created
  2. do blockpull with bandwidth = 1048576 Bytes
    # virsh blockpull avocado-vt-vm1 vda --bytes 1048576
    Block Pull started

T2:
  3. Abort the blockpull job
    # virsh blockjob avocado-vt-vm1 vda --abort

T1:
  4. Do the blockpull again
  # virsh blockpull avocado-vt-vm1 vda --bytes 1048576
  Block Pull started

T2:
  5. Abort the blockpull job again, crash happened
  # virsh blockjob avocado-vt-vm1 vda --abort
  error: Disconnected from qemu:///system due to end of file
  error: failed to get domain 'avocado-vt-vm1'

6. If not reproduced, repeat step 4&5. Sometimes it's not reproduced for the first 2 rounds.

Comment 5 Peter Krempa 2019-11-27 12:43:35 UTC

*** This bug has been marked as a duplicate of bug 1777230 ***