[Pkg-libvirt-maintainers] Bug#972673: In debian bullseye: libvirt fails to start disk type pool where the source-dev is an iscsi_debug generated disk

Katerina Koukiou kkoukiou at redhat.com
Thu Oct 22 11:07:07 BST 2020


Package: libvirt0

Version:
root at debian:~# virsh --version
6.6.0

When trying to start a disk type pool which has a source-dev generated
with scsi_debug the virsh pool-start command fails. See the output
bellow:

root at debian:~# virsh -d 0 pool-start poolDisk
pool-start: pool(optdata): poolDisk
pool-start: found option <pool>: poolDisk
pool-start: <pool> trying as pool NAME
error: Failed to start pool poolDisk
error: internal error: Child process
(/usr/lib/libvirt/libvirt_parthelper /dev/sda -g) unexpected fatal
signal 6

root at debian:~# virsh pool-dumpxml poolDisk
<pool type='disk'>
  <name>poolDisk</name>
  <uuid>d2c0e6ac-0ccf-4531-8ffa-e01c2bbca1f7</uuid>
  <capacity unit='bytes'>0</capacity>
  <allocation unit='bytes'>0</allocation>
  <available unit='bytes'>0</available>
  <source>
    <device path='/dev/sda'/>
    <format type='dos'/>
  </source>
  <target>
    <path>/var/lib/cockpittest/poolDiskImages</path>
  </target>
</pool>

And here is the valgrind output:

root at debian:~#  valgrind  /usr/lib/libvirt/libvirt_parthelper /dev/sda -g
==3192== Memcheck, a memory error detector
==3192== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==3192== Using Valgrind-3.16.1 and LibVEX; rerun with -h for copyright info
==3192== Command: /usr/lib/libvirt/libvirt_parthelper /dev/sda -g
==3192==
==3192== Invalid free() / delete / delete[] / realloc()
==3192==    at 0x48399AB: free (vg_replace_malloc.c:538)
==3192==    by 0x498586E: virResetError (virerror.c:471)
==3192==    by 0x49860D6: virRaiseErrorFull (virerror.c:818)
==3192==    by 0x4986442: virReportErrorHelper (virerror.c:1303)
==3192==    by 0x4983127: virDevMapperGetMajor (virdevmapper.c:82)
==3192==    by 0x4983127: virIsDevMapperDevice (virdevmapper.c:339)
==3192==    by 0x109170: main (in /usr/lib/libvirt/libvirt_parthelper)
==3192==  Address 0x848b280 is 1,024 bytes inside a block of size 2,032 alloc'd
==3192==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3192==    by 0x4D7EAD0: g_malloc0 (gmem.c:136)
==3192==    by 0x4DA1E31: g_private_set_alloc0 (gthread.c:541)
==3192==    by 0x4D96CFF: thread_memory_from_self (gslice.c:564)
==3192==    by 0x4D96CFF: thread_memory_from_self (gslice.c:550)
==3192==    by 0x4D96CFF: g_slice_alloc (gslice.c:1047)
==3192==    by 0x4D656DD: g_hash_table_new_full (ghash.c:1072)
==3192==    by 0x4D8880A: g_quark_init (gquark.c:61)
==3192==    by 0x400FFB1: call_init.part.0 (dl-init.c:72)
==3192==    by 0x40100B8: call_init (dl-init.c:30)
==3192==    by 0x40100B8: _dl_init (dl-init.c:119)
==3192==    by 0x40010C9: ??? (in /usr/lib/x86_64-linux-gnu/ld-2.31.so)
==3192==    by 0x2: ???
==3192==    by 0x1FFF000D12: ???
==3192==    by 0x1FFF000D36: ???
==3192==
2002552==3192==
==3192== HEAP SUMMARY:
==3192==     in use at exit: 37,804 bytes in 241 blocks
==3192==   total heap usage: 2,525 allocs, 2,285 frees, 419,811 bytes allocated
==3192==
==3192== LEAK SUMMARY:
==3192==    definitely lost: 9 bytes in 1 blocks
==3192==    indirectly lost: 0 bytes in 0 blocks
==3192==      possibly lost: 1,352 bytes in 18 blocks
==3192==    still reachable: 36,443 bytes in 222 blocks
==3192==                       of which reachable via heuristic:
==3192==                         newarray           : 1,536 bytes in 16 blocks
==3192==         suppressed: 0 bytes in 0 blocks
==3192== Rerun with --leak-check=full to see details of leaked memory
==3192==
==3192== For lists of detected and suppressed errors, rerun with: -s
==3192== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)



Note that I use the following command to create the /dev/sda which I
use for source-dev:

+ test ! -e /sys/module/scsi_debug
+ modprobe scsi_debug dev_size_mb=50
+ set -e; while true; do O=$(ls
/sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block
2>/dev/null || true); [ -n "$O" ] && break || sleep 0.1; done; echo
"/dev/$O"
/dev/sda

Regards,
Katerina



More information about the Pkg-libvirt-maintainers mailing list