Bug 1207060 - qemu-img seg-faults while creating qcow2 image file using qemu native driver for glusterfs
Summary: qemu-img seg-faults while creating qcow2 image file using qemu native driver ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfs-devel
Version: rhgs-3.0
Hardware: x86_64
OS: All
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Poornima G
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-30 07:30 UTC by SATHEESARAN
Modified: 2015-08-10 08:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
virt-rhgs integration RHEL 7.1
Last Closed: 2015-08-10 08:41:01 UTC
Embargoed:


Attachments (Terms of Use)

Description SATHEESARAN 2015-03-30 07:30:34 UTC
Description of problem:
-----------------------
qemu-img command hits segmentation fault while creating a qcow2 image using qemu's native driver for glusterfs

This happens only for qcow2 image type. 
(i.e) Creating raw image file works as expected.

Version-Release number of selected component (if applicable):
-------------------------------------------------------------
Red Hat Gluster Storage 3.0.4 ( glusterfs-3.6.0.53-1.el6rhs )
qemu-kvm-1.5.3-86.el7_1.1.x86_64
qemu-img-1.5.3-86.el7_1.1.x86_64

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Create a gluster pure replicate volume of type replica 2

2. Optimize the volume for virt-store
(i.e) gluster volume set <vol> group virt

3. Set the proper ownership of qemu on the volume
(i.e) gluster volume set <vol> storage.owner-uid 107
      gluster volume set <vol> storage.owner-gid 107

4. Start the volume

5. From RHEL 7.1 Host (hypervisor in this context ) create a image file
(i.e) qemu-img create -f qcow2 gluster://<gluster-server>/<vol>/<image_file> 25G

Actual results:
---------------
qemu-img command hits segmentation fault

Expected results:
-----------------
qemu-img command should succeed in creating the image file

Additional info:
-----------------
Here is the console logs :

[root@~]# qemu-img create -f qcow2 gluster://root.eng.blr.redhat.com/vol1/newvm2.img 25G
Formatting 'gluster://root.eng.blr.redhat.com/vol1/newvm2.img', fmt=qcow2 size=26843545600 encryption=off cluster_size=65536 lazy_refcounts=off 
[2015-03-30 07:42:45.336720] E [MSGID: 108006] [afr-common.c:4527:afr_notify] 0-vol1-replicate-0: All subvolumes are down. Going offline until atleast one of them comes back up.
Segmentation fault

qemu-img was working good with Red Hat Gluster Storage 3.0.3 ( glusterfs-3.6.0.42-1.el6rhs ) and I have tested the same with that version

Comment 1 SATHEESARAN 2015-03-30 07:32:35 UTC
I couldn't find any logs or cores related to seg-fault

I observed the error messages in /var/log/messages only
Mar 30 13:12:46 rhs-client15 kernel: qemu-img[28666]: segfault at 8 ip 00007f360d9c6295 sp 00007f3610e93d50 error 6 in libglusterfs.so.0.0.0[7f360d979000+9f000]

No other relevant information

Comment 3 SATHEESARAN 2015-03-30 10:52:47 UTC
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4b0d295 in mem_pool_new_fn () from /lib64/libglusterfs.so.0
Missing separate debuginfos, use: debuginfo-install glusterfs-3.6.0.53-1.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.12.2-14.el7.x86_64 libcom_err-1.42.9-7.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 pcre-8.32-14.el7.x86_64 xz-libs-5.1.2-9alpha.el7.x86_64
(gdb) bt
#0  0x00007ffff4b0d295 in mem_pool_new_fn () from /lib64/libglusterfs.so.0
#1  0x00007ffff7590da4 in glfs_new () from /lib64/libgfapi.so.0
#2  0x000055555556d9c0 in qemu_gluster_init (gconf=gconf@entry=0x555555c45c90, filename=<optimized out>) at block/gluster.c:199
#3  0x000055555556dc53 in qemu_gluster_open (bs=<optimized out>, options=0x555555c2b3f0, bdrv_flags=66, errp=<optimized out>) at block/gluster.c:341
#4  0x0000555555564870 in bdrv_open_common (bs=bs@entry=0x555555c291e0, file=file@entry=0x0, options=options@entry=0x555555c2b3f0, flags=flags@entry=2, drv=drv@entry=0x5555557fe3a0 <bdrv_gluster>, 
    errp=0x7ffff7fd8eb0) at block.c:829
#5  0x0000555555569464 in bdrv_file_open (pbs=pbs@entry=0x7ffff7fd8f48, filename=filename@entry=0x555555c0a760 "gluster://10.70.37.53/vstore/vm10.img", options=0x555555c2b3f0, options@entry=0x0, 
    flags=flags@entry=2, errp=errp@entry=0x7ffff7fd8f50) at block.c:959
#6  0x000055555557ca90 in qcow2_create2 (errp=0x7ffff7fd8f40, version=3, prealloc=<optimized out>, cluster_size=65536, flags=0, backing_format=0x0, backing_file=0x0, total_size=12582912, 
    filename=0x555555c0a760 "gluster://10.70.37.53/vstore/vm10.img") at block/qcow2.c:1660
#7  qcow2_create (filename=0x555555c0a760 "gluster://10.70.37.53/vstore/vm10.img", options=<optimized out>, errp=0x7ffff7fd8fa0) at block/qcow2.c:1839
#8  0x0000555555563409 in bdrv_create_co_entry (opaque=0x7fffffffe1b0) at block.c:393
#9  0x000055555559af2a in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at coroutine-ucontext.c:118
#10 0x00007ffff502d0f0 in ?? () from /lib64/libc.so.6
#11 0x00007fffffffda20 in ?? ()
#12 0x0000000000000000 in ?? ()

Comment 4 Poornima G 2015-04-15 05:33:59 UTC
Fix posted for review @http://review.gluster.org/#/c/10205/

Comment 5 Vivek Agarwal 2015-04-15 06:06:29 UTC

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

Comment 8 SATHEESARAN 2015-08-03 13:24:17 UTC
I have tested this bug with RHGS 3.1 ( glusterfs-3.7.1-11.el7rhgs ) and RHEL 7.1 

qcow2 image creation is successful and this bug could be moved to VERIFIED state, once its moved ON_QA

Comment 10 SATHEESARAN 2015-08-10 07:47:56 UTC
( Refer comment8 ) Moving this bug to VERIFIED

Comment 11 Vivek Agarwal 2015-08-10 08:41:01 UTC
Thanks Sas, closing this, please reopen if this issue is seen again.


Note You need to log in before you can comment on or make changes to this bug.