Bug 1438070

Summary: [abrt] libvirt-daemon: qemuDomainSecretDiskPrepare(): libvirtd killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Eric Harney <eharney>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: agedosier, berrange, clalancette, crobinso, itamar, laine, libvirt-maint, pkrempa, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/1a5744bfcf54fa4b794588302f903998d1e4e40a
Whiteboard: abrt_hash:342006b19b003323c18e78304d47e61071c8b06c;VARIANT_ID=server;
Fixed In Version: libvirt-2.2.1-1.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-15 04:40:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: dso_list
none
File: environ
none
File: exploitable
none
File: limits
none
File: maps
none
File: mountinfo
none
File: namespaces
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Eric Harney 2017-03-31 19:27:38 UTC
Description of problem:
Working on OpenStack Cinder/Nova development: attaching and detaching iSCSI volumes that use LUKS encryption.

Version-Release number of selected component:
libvirt-daemon-2.2.0-2.fc25

Additional info:
reporter:       libreport-2.8.0
backtrace_rating: 4
cmdline:        /usr/sbin/libvirtd
crash_function: qemuDomainSecretDiskPrepare
executable:     /usr/sbin/libvirtd
global_pid:     14515
kernel:         4.9.7-201.fc25.x86_64
pkg_fingerprint: 4089 D8F2 FDB1 9C98
pkg_vendor:     Fedora Project
runlevel:       N 3
type:           CCpp
uid:            0

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 qemuDomainSecretDiskPrepare at qemu/qemu_domain.c:1091
 #1 qemuDomainAttachVirtioDiskDevice at qemu/qemu_hotplug.c:355
 #2 qemuDomainAttachDeviceDiskLive at qemu/qemu_hotplug.c:881
 #3 qemuDomainAttachDeviceLive at qemu/qemu_driver.c:7469
 #4 qemuDomainAttachDeviceLiveAndConfig at qemu/qemu_driver.c:8259
 #5 qemuDomainAttachDeviceFlags at qemu/qemu_driver.c:8315
 #6 virDomainAttachDeviceFlags at libvirt-domain.c:8416
 #7 remoteDispatchDomainAttachDeviceFlags at remote_dispatch.h:3461
 #8 remoteDispatchDomainAttachDeviceFlagsHelper at remote_dispatch.h:3437
 #9 virNetServerProgramDispatchCall at rpc/virnetserverprogram.c:437

Comment 1 Eric Harney 2017-03-31 19:28:31 UTC
Created attachment 1267953 [details]
File: backtrace

Comment 2 Eric Harney 2017-03-31 19:28:33 UTC
Created attachment 1267954 [details]
File: cgroup

Comment 3 Eric Harney 2017-03-31 19:28:35 UTC
Created attachment 1267955 [details]
File: core_backtrace

Comment 4 Eric Harney 2017-03-31 19:28:37 UTC
Created attachment 1267956 [details]
File: dso_list

Comment 5 Eric Harney 2017-03-31 19:28:40 UTC
Created attachment 1267957 [details]
File: environ

Comment 6 Eric Harney 2017-03-31 19:28:41 UTC
Created attachment 1267958 [details]
File: exploitable

Comment 7 Eric Harney 2017-03-31 19:28:43 UTC
Created attachment 1267959 [details]
File: limits

Comment 8 Eric Harney 2017-03-31 19:28:46 UTC
Created attachment 1267960 [details]
File: maps

Comment 9 Eric Harney 2017-03-31 19:28:48 UTC
Created attachment 1267961 [details]
File: mountinfo

Comment 10 Eric Harney 2017-03-31 19:28:49 UTC
Created attachment 1267962 [details]
File: namespaces

Comment 11 Eric Harney 2017-03-31 19:28:51 UTC
Created attachment 1267963 [details]
File: open_fds

Comment 12 Eric Harney 2017-03-31 19:28:53 UTC
Created attachment 1267964 [details]
File: proc_pid_status

Comment 13 Eric Harney 2017-03-31 19:28:55 UTC
Created attachment 1267965 [details]
File: var_log_messages

Comment 15 Peter Krempa 2017-04-03 12:20:17 UTC
The following commit should fix the issue:

commit 7f7d99048350935a394d07b98a13d7da9c4b0502
Author: John Ferlan <jferlan>
Date:   Thu Dec 22 07:12:49 2016 -0500

    qemu: Don't assume secret provided for LUKS encryption
    
...
    
    If a secret was not provided for what was determined to be a LUKS
    encrypted disk (during virStorageFileGetMetadata processing when
    called from qemuDomainDetermineDiskChain as a result of hotplug
    attach qemuDomainAttachDeviceDiskLive), then do not attempt to
    look it up (avoiding a libvirtd crash) and do not alter the format
    to "luks" when adding the disk; otherwise, the device_add would
    fail with a message such as:
    
       "unable to execute QEMU command 'device_add': Property 'scsi-hd.drive'
        can't find value 'drive-scsi0-0-0-0'"
    
    because of assumptions that when the format=luks that libvirt would have
    provided the secret to decrypt the volume.
    
    Access to unlock the volume will thus be left to the application.


$ git describe 7f7d99048350935a394d07b98a13d7da9c4b0502
v2.5.0-284-g7f7d990
$

Fedora 26 should already contain the fixed package.

Comment 16 Fedora Update System 2017-05-11 13:43:07 UTC
libvirt-2.2.1-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b67f65db3

Comment 17 Fedora Update System 2017-05-12 13:40:20 UTC
libvirt-2.2.1-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b67f65db3

Comment 18 Fedora Update System 2017-05-15 04:40:41 UTC
libvirt-2.2.1-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.