Bug 1783187

Summary: Segment fault when creating disk snapshot to glusterfs source
Product: Red Hat Enterprise Linux 8 Reporter: Han Han <hhan>
Component: glusterfsAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED WONTFIX QA Contact: Giridhar Ramaraju <giridhar.ramaraju>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.2CC: lmen, pkrempa, sheggodu, yisun
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-13 07:30:15 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:
Attachments:
Description Flags
logs and xmls none

Description Han Han 2019-12-13 08:52:32 UTC
Created attachment 1644726 [details]
logs and xmls

Description of problem:
As subject

Version-Release number of selected component (if applicable):
libvirt-5.10.0-1.module+el8.2.0+5040+bd433686.x86_64
qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb.x86_64
glusterfs-6.0-24.el8.x86_64

Gluster server: glusterfs-server-6.0-21.el7rhgs.x86_64

How reproducible:
60%

Steps to Reproduce:
1. Start an VM
# virsh create domain.xml

2. Create a disk snapshot on gluster source
# cat snapshot.xml 
<domainsnapshot>
  <name>s1</name>
  <description>Snapshot of OS install and updates</description>
  <disks>
    <disk name='vda' type='network' device='disk'>
      <source protocol='gluster' name='gv/q35.s1'>
        <host name='10.66.85.42'/>
      </source>
      <target dev='vda' bus='virtio'/>
    </disk>
  </disks>
</domainsnapshot>

# virsh snapshot-create q35 snapshot.xml --no-metadata --disk-only
error: operation failed: failed to format image: 'Permission denied'

Then you may get a SIGSEGV:
# abrt-cli ls                             
id d87d01b28bb5b676870e86ab2159def43838dec6
reason:         gf_log_flush_msgs(): qemu-kvm killed by SIGSEGV
time:           Fri 13 Dec 2019 02:46:09 AM EST
cmdline:        /usr/libexec/qemu-kvm -name guest=q35,debug-threads=on -S -object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-2-q35/master-key.aes -machine pc-q35-rhel8.1.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu Opteron_G3 -m 1024 -overcommit mem-lock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 516b83cb-bd68-47cf-b577-9ed07741601e -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=38,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x5.0x2 -device virtio-scsi-pci,id=scsi0,bus=pcie.0,addr=0x6 -device virtio-serial-pci,id=virtio-serial0,bus=pcie.0,addr=0x7 -blockdev '{\"driver\":\"file\",\"filename\":\"/var/lib/libvirt/images/RHEL-8.2-x86_64-latest-clone.qcow2\",\"node-name\":\"libvirt-1-storage\",\"auto-read-only\":true,\"discard\":\"unmap\"}' -blockdev '{\"node-name\":\"libvirt-1-format\",\"read-only\":false,\"driver\":\"qcow2\",\"file\":\"libvirt-1-storage\",\"backing\":null}' -device virtio-blk-pci,scsi=off,bus=pcie.0,addr=0x9,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 -netdev tap,fd=40,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:87:15:bd,bus=pcie.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=13,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5901,addr=0.0.0.0,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x2 -device intel-hda,id=sound0,bus=pcie.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x8 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
package:        15:qemu-kvm-core-4.2.0-1.module+el8.2.0+4793+b09dd2fb
uid:            107 (qemu)
count:          1
Directory:      /var/spool/abrt/ccpp-2019-12-13-02:46:09-27855
Run 'abrt-cli report /var/spool/abrt/ccpp-2019-12-13-02:46:09-27855' for creating a case in Red Hat Customer Portal

Backtrace:
(gdb) bt
#0  0x00007f6e536d5b75 in __list_splice (list=0x5564a6844490, list=0x5564a6844490, head=0x7f6e2cff8660) at ./glusterfs/list.h:112
#1  0x00007f6e536d5b75 in list_splice_init (head=0x7f6e2cff8660, list=0x5564a6844490) at ./glusterfs/list.h:135
#2  0x00007f6e536d5b75 in gf_log_flush_msgs (ctx=ctx@entry=0x5564a6844120) at logging.c:1763
#3  0x00007f6e536d5ece in gf_log_flush_timeout_cbk (data=0x5564a6844120) at logging.c:1883
#4  0x00007f6e536e1655 in gf_timer_proc (data=0x5564a6545c40) at timer.c:185
#5  0x00007f6eca4a82de in start_thread (arg=<optimized out>) at pthread_create.c:486
#6  0x00007f6eca1d9e83 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95


Actual results:
As subject

Expected results:
NO SIGSEGV

Additional info:
Logs in attachment:
br0.log --> brick log of gluster server
glusterd.log --> glutserd log of gluster server
libvirtd.log --> log of libvirtd
gdb.txt --> the backtrace of coredump
qemu.log --> it should contain the gluster client log. But due to the error following, I cannot get it:
ERROR: failed to create logfile "/var/log/glusterfs/10.66.85.42-gv-27855.log" (Permission denied)

I will ask qemu or libvirt developers about how to get client log.

Comment 1 Kotresh HR 2019-12-18 07:28:55 UTC
Hi,

The back trace of gdb is not much helpful. Please attach the core file along with gluster binaries to further debug.

Comment 7 RHEL Program Management 2021-06-13 07:30:15 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.