Bug 1042747

Summary: [SNAPSHOT] : CLI crash while creating CG with description more than 1024C and the CG was not created
Product: Red Hat Gluster Storage Reporter: senaik
Component: snapshotAssignee: Raghavendra Bhat <rabhat>
Status: CLOSED ERRATA QA Contact: senaik
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.0CC: nsathyan, rhinduja, rhs-bugs, rjoseph, ssamanta, storage-qa-internal, vagarwal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: SNAPSHOT
Fixed In Version: glusterfs-3.4.1.snap.feb05.2014git-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-22 19:30:19 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:

Description senaik 2013-12-13 09:24:31 UTC
Description of problem:
======================
CLI crashed while creating CG with description more than 1024C and the CG was not created 


Version-Release number of selected component (if applicable):
============================================================
glusterfs 3.4.0.snap.dec03.2013git


How reproducible:


Steps to Reproduce:
==================
1.Create 2 distribute volumes and start it 

2.Create a CG with description more than 1024C 

gluster snapshot create volume2 volume3 -n CG11 -d "Using this feature, an admin can take scheduled or unscheduled snapshots of and thereby backup a Glusterfs volume. This also provides a check-point in time to restore to, if and when necessary. In virtual machine hosted environment, this feature also provides a mechanism to take snapshots of the vm-disks.An online-snapshot is a feature where the file-system and associated data continue to be available for the clients, while the snapshot is being taken. Here the onus lies on the application to periodically sync data, so that the snap created has the desired data consistent view. On the other hand, an offline back-up makes the file-system offline or unavailable for a deterministic time-window till the snapshot is taken. This is usually achieved by doing a flush, followed by a freeze/thaw on the file-system prior to taking a snapshot. While offline snapshots are relatively easy to administer, the inaccessibility to the volume(s)/data is a major disadvantage.At any given point in time, a single gluster volume is accessed by multiple clients. In such a scenario, an offline snapshot/backup does not work because taking snapshots could lead to the whole volume being unavailable for a certain time window. This leads to an unknown scenario/behavior for the applications. Moreover in a Cloud environment such unavailability can result in even more compounded and indeterminate system behavior"


snapshot create: description truncated: Description provided is longer than 1024 characters
*** glibc detected *** gluster: free(): invalid next size (fast): 0x00007f67e8002780 ***
======= Backtrace: =========
/lib64/libc.so.6[0x329b076166]
/lib64/libc.so.6[0x329b078c93]
/lib64/libc.so.6(xdr_sizeof+0xad)[0x329b119c1d]
/usr/lib64/libgfrpc.so.0(rpc_clnt_record_build_record+0x10d)[0x3b14e0d72d]
/usr/lib64/libgfrpc.so.0(rpc_clnt_record+0x1af)[0x3b14e0d9ef]
/usr/lib64/libgfrpc.so.0(rpc_clnt_submit+0x239)[0x3b14e0e6b9]
gluster(cli_submit_request+0xca)[0x40986a]
gluster(cli_cmd_submit+0x82)[0x40a652]
gluster(gf_cli_snapshot+0xa6)[0x411c96]
gluster(cli_cmd_snapshot_cbk+0xe9)[0x434579]
gluster(cli_cmd_process+0xfb)[0x40a84b]
gluster(cli_batch+0x10)[0x40a2e0]
/lib64/libpthread.so.0[0x329b4079d1]
/lib64/libc.so.6(clone+0x6d)[0x329b0e8b6d]
======= Memory map: ========
00400000-00443000 r-xp 00000000 fc:03 398418                             /usr/sbin/gluster
00643000-00648000 rw-p 00043000 fc:03 398418                             /usr/sbin/gluster
007a5000-00812000 rw-p 00000000 00:00 0                                  [heap]
329a800000-329a820000 r-xp 00000000 fc:03 407987                         /lib64/ld-2.12.so
329aa1f000-329aa20000 r--p 0001f000 fc:03 407987                         /lib64/ld-2.12.so
329aa20000-329aa21000 rw-p 00020000 fc:03 407987                         /lib64/ld-2.12.so
329aa21000-329aa22000 rw-p 00000000 00:00 0 
329ac00000-329ac02000 r-xp 00000000 fc:03 417828                         /lib64/libdl-2.12.so
329ac02000-329ae02000 ---p 00002000 fc:03 417828                         /lib64/libdl-2.12.so
329ae02000-329ae03000 r--p 00002000 fc:03 417828                         /lib64/libdl-2.12.so
329ae03000-329ae04000 rw-p 00003000 fc:03 417828                         /lib64/libdl-2.12.so
329b000000-329b18b000 r-xp 00000000 fc:03 417821                         /lib64/libc-2.12.so
329b18b000-329b38a000 ---p 0018b000 fc:03 417821                         /lib64/libc-2.12.so
329b38a000-329b38e000 r--p 0018a000 fc:03 417821                         /lib64/libc-2.12.so
329b38e000-329b38f000 rw-p 0018e000 fc:03 417821                         /lib64/libc-2.12.so
329b38f000-329b394000 rw-p 00000000 00:00 0 
329b400000-329b417000 r-xp 00000000 fc:03 402935                         /lib64/libpthread-2.12.so
329b417000-329b617000 ---p 00017000 fc:03 402935                         /lib64/libpthread-2.12.so
329b617000-329b618000 r--p 00017000 fc:03 402935                         /lib64/libpthread-2.12.so
329b618000-329b619000 rw-p 00018000 fc:03 402935                         /lib64/libpthread-2.12.so
329b619000-329b61d000 rw-p 00000000 00:00 0 
329b800000-329b807000 r-xp 00000000 fc:03 399014                         /lib64/librt-2.12.so
329b807000-329ba06000 ---p 00007000 fc:03 399014                         /lib64/librt-2.12.so
329ba06000-329ba07000 r--p 00006000 fc:03 399014                         /lib64/librt-2.12.so
329ba07000-329ba08000 rw-p 00007000 fc:03 399014                         /lib64/librt-2.12.so
329bc00000-329bc15000 r-xp 00000000 fc:03 398381                         /lib64/libz.so.1.2.3
329bc15000-329be14000 ---p 00015000 fc:03 398381                         /lib64/libz.so.1.2.3
329be14000-329be15000 r--p 00014000 fc:03 398381                         /lib64/libz.so.1.2.3
329be15000-329be16000 rw-p 00015000 fc:03 398381                         /lib64/libz.so.1.2.3
329c000000-329c083000 r-xp 00000000 fc:03 407935                         /lib64/libm-2.12.so
329c083000-329c282000 ---p 00083000 fc:03 407935                         /lib64/libm-2.12.so
329c282000-329c283000 r--p 00082000 fc:03 407935                         /lib64/libm-2.12.so
329c283000-329c284000 rw-p 00083000 fc:03 407935                         /lib64/libm-2.12.so
329c800000-329c81d000 r-xp 00000000 fc:03 412793                         /lib64/libselinux.so.1
329c81d000-329ca1c000 ---p 0001d000 fc:03 412793                         /lib64/libselinux.so.1
329ca1c000-329ca1d000 r--p 0001c000 fc:03 412793                         /lib64/libselinux.so.1
329ca1d000-329ca1e000 rw-p 0001d000 fc:03 412793                         /lib64/libselinux.so.1
329ca1e000-329ca1f000 rw-p 00000000 00:00 0 
329cc00000-329cc16000 r-xp 00000000 fc:03 417845                         /lib64/libresolv-2.12.so
329cc16000-329ce16000 ---p 00016000 fc:03 417845                         /lib64/libresolv-2.12.so
329ce16000-329ce17000 r--p 00016000 fc:03 417845                         /lib64/libresolv-2.12.so
329ce17000-329ce18000 rw-p 00017000 fc:03 417845                         /lib64/libresolv-2.12.so
329ce18000-329ce1a000 rw-p 00000000 00:00 0 
329d000000-329d01d000 r-xp 00000000 fc:03 400331                         /lib64/libtinfo.so.5.7
329d01d000-329d21d000 ---p 0001d000 fc:03 400331                         /lib64/libtinfo.so.5.7
329d21d000-329d221000 rw-p 0001d000 fc:03 400331                         /lib64/libtinfo.so.5.7
329d400000-329d43a000 r-xp 00000000 fc:03 417874                         /lib64/libreadline.so.6.0
329d43a000-329d63a000 ---p 0003a000 fc:03 417874                         /lib64/libreadline.so.6.0
329d63a000-329d642000 rw-p 0003a000 fc:03 417874                         /lib64/libreadline.so.6.0
329d642000-329d643000 rw-p 00000000 00:00 0 
329e000000-329e016000 r-xp 00000000 fc:03 400431                         /lib64/libgcc_s-4.4.7-20120601.so.1
329e016000-329e215000 ---p 00016000 fc:03 400431                         /lib64/libgcc_s-4.4.7-20120601.so.1
329e215000-329e216000 rw-p 00015000 fc:03 400431                         /lib64/libgcc_s-4.4.7-20120601.so.1
32a0000000-32a0003000 r-xp 00000000 fc:03 417848                         /lib64/libcom_err.so.2.1
32a0003000-32a0202000 ---p 00003000 fc:03 417848                         /lib64/libcom_err.so.2.1
32a0202000-32a0203000 r--p 00002000 fc:03 417848                         /lib64/libcom_err.so.2.1
32a0203000-32a0204000 rw-p 00003000 fc:03 417848                         /lib64/libcom_err.so.2.1
32a0800000-32a080a000 r-xp 00000000 fc:03 417846                         /lib64/libkrb5support.so.0.1
32a080a000-32a0a09000 ---p 0000a000 fc:03 417846                         /lib64/libkrb5support.so.0.1
32a0a09000-32a0a0a000 r--p 00009000 fc:03 417846                         /lib64/libkrb5support.so.0.1
32a0a0a000-32a0a0b000 rw-p 0000a000 fc:03 417846                         /lib64/libkrb5support.so.0.1
32a0c00000-32a0c02000 r-xp 00000000 fc:03 403502                         /lib64/libkeyutils.so.1.3
32a0c02000-32a0e01000 ---p 00002000 fc:03 403502                         /lib64/libkeyutils.so.1.3
32a0e01000-32a0e02000 r--p 00001000 fc:03 403502                         /lib64/libkeyutils.so.1.3
32a0e02000-32a0e03000 rw-p 00002000 fc:03 403502                         /lib64/libkeyutils.so.1.3
32a1400000-32a1548000 r-xp 00000000 fc:03 406473                         /usr/lib64/libxml2.so.2.7.6
32a1548000-32a1747000 ---p 00148000 fc:03 406473                         /usr/lib64/libxml2.so.2.7.6
32a1747000-32a1751000 rw-p 00147000 fc:03 406473                         /usr/lib64/libxml2.so.2.7.6
32a1751000-32a1752000 rw-p 00000000 00:00 0 
32a1800000-32a1829000 r-xp 00000000 fc:03 417847                         /lib64/libk5crypto.so.3.1
32a1829000-32a1a29000 ---p 00029000 fc:03 417847                         /lib64/libk5crypto.so.3.1
32a1a29000-32a1a2a000 r--p 00029000 fc:03 417847                         /lib64/libk5crypto.so.3.1
32a1a2a000-32a1a2b000 rw-p 0002a000 fc:03 417847                         /lib64/libk5crypto.so.3.1
32a1a2b000-32a1a2c000 rw-p 00000000 00:00 0 
32a1c00000-32a1cdb000 r-xp 00000000 fc:03 417849                         /lib64/libkrb5.so.3.3
32a1cdb000-32a1eda000 ---p 000db000 fc:03 417849                         /lib64/libkrb5.so.3.3
32a1eda000-32a1ee4000 r--p 000da000 fc:03 417849                         /lib64/libkrb5.so.3.3
32a1ee4000-32a1ee6000 rw-p 000e4000 fc:03 417849                         /lib64/libkrb5.so.3.3
32a2c00000-32a2c41000 r-xp 00000000 fc:03 417864                         /lib64/libgssapi_krb5.so.2.2
32a2c41000-32a2e41000 ---p 00041000 fc:03 417864                         /lib64/libgssapi_krb5.so.2.2
32a2e41000-32a2e42000 r--p 00041000 fc:03 417864                         /lib64/libgssapi_krb5.so.2.2
32a2e42000-32a2e44000 rw-p 00042000 fc:03 417864                         /lib64/libgssapi_krb5.so.2.2
3b14200000-3b143b5000 r-xp 00000000 fc:03 423063                         /usr/lib64/libcrypto.so.1.0.1e
3b143b5000-3b145b4000 ---p 001b5000 fc:03 423063                         /usr/lib64/libcrypto.so.1.0.1e
3b145b4000-3b145cf000 r--p 001b4000 fc:03 423063                         /usr/lib64/libcrypto.so.1.0.1e
3b145cf000-3b145db000 rw-p 001cf000 fc:03 423063                         /usr/lib64/libcrypto.so.1.0.1e
3b145db000-3b145df000 rw-p 00000000 00:00 0 
3b14600000-3b14683000 r-xp 00000000 fc:03 422830                         /usr/lib64/libglusterfs.so.0.0.0
3b14683000-3b14883000 ---p 00083000 fc:03 422830                         /usr/lib64/libglusterfs.so.0.0.0
3b14883000-3b14885000 rw-p 00083000 fc:03 422830                         /usr/lib64/libglusterfs.so.0.0.0
3b14885000-3b14889000 rw-p 00000000 00:00 0 
3b14a00000-3b14a17000 r-xp 00000000 fc:03 425222                         /usr/lib64/libgfxdr.so.0.0.0
3b14a17000-3b14c16000 ---p 00017000 fc:03 425222                         /usr/lib64/libgfxdr.so.0.0.0
3b14c16000-3b14c17000 rw-p 00016000 fc:03 425222                         /usr/lib64/libgfxdr.so.0.0.0
3b14e00000-3b14e17000 r-xp 00000000 fc:03 423065                         /usr/lib64/libgfrpc.so.0.0.0
3b14e17000-3b15017000 ---p 00017000 fc:03 423065                         /usr/lib64/libgfrpc.so.0.0.0
3b15017000-3b15018000 rw-p 00017000 fc:03 423065                         /usr/lib64/libgfrpc.so.0.0.0
3b15200000-3b15222000 r-xp 00000000 fc:03 420297                         /lib64/libncurses.so.5.7
3b15222000-3b15421000 ---p 00022000 fc:03 420297                         /lib64/libncurses.so.5.7
3b15421000-3b15422000 rw-p 00021000 fc:03 420297                         /lib64/libncurses.so.5.7
7f67e8000000-7f67e8021000 rw-p 00000000 00:00 0 
7f67e8021000-7f67ec000000 ---p 00000000 00:00 0 
7f67f0000000-7f67f0021000 rw-p 00000000 00:00 0 
7f67f0021000-7f67f4000000 ---p 00000000 00:00 0 
7f67f4d61000-7f67f4d62000 ---p 00000000 00:00 0 
7f67f4d62000-7f67f5762000 rw-p 00000000 00:00 0 
7f67f5762000-7f67f5763000 ---p 00000000 00:00 0 
7f67f5763000-7f67f6163000 rw-p 00000000 00:00 0 
7f67f6163000-7f67f61c4000 r-xp 00000000 fc:03 425219                     /usr/lib64/libssl.so.1.0.1e
7f67f61c4000-7f67f63c3000 ---p 00061000 fc:03 425219                     /usr/lib64/libssl.so.1.0.1e
7f67f63c3000-7f67f63c7000 r--p 00060000 fc:03 425219                     /usr/lib64/libssl.so.1.0.1e
7f67f63c7000-7f67f63ce000 rw-p 00064000 fc:03 425219                     /usr/lib64/libssl.so.1.0.1e
7f67f63d9000-7f67f63e8000 r-xp 00000000 fc:03 423864                     /usr/lib64/glusterfs/3.4.0.snap.dec03.2013git/rpc-transport/socket.so
7f67f63e8000-7f67f65e8000 ---p 0000f000 fc:03 423864                     /usr/lib64/glusterfs/3.4.0.snap.dec03.2013git/rpc-transport/socket.so
7f67f65e8000-7f67f65ec000 rw-p 0000f000 fc:03 423864                     /usr/lib64/glusterfs/3.4.0.snap.dec03.2013git/rpc-transport/socket.so
7f67f65ec000-7f67f72b5000 rw-p 00000000 00:00 0 
7f67f72bd000-7f67f72c1000 rw-p 00000000 00:00 0 
7fff5cc5a000-7fff5cc6f000 rw-p 00000000 00:00 0                          [stack]Aborted (core dumped)



Actual results:
==============
CLI crashed while creating CG with description more than 1024C and the CG was not created 


Expected results:
================
When a CG is created with description more than 1024C , Warning should be displayed that the description is more than 1024C , truncate the message but success the CLI


Additional info:

Comment 1 senaik 2013-12-13 09:36:05 UTC
Adding a line to 'Expected Results' section : 
---------------------------------------------
When a CG is created with description more than 1024C , CG should also be created along with warning message .

sosreports : 
============
http://rhsqe-repo.lab.eng.blr.redhat.com/bugs_necessary_info/snapshots/1042747/

Comment 3 senaik 2013-12-13 10:50:32 UTC
Same issue is seen while creating snap with description more than 1024C

Comment 4 Raghavendra Bhat 2014-01-07 12:16:45 UTC
http://review.gluster.org/#/c/6501/ has been sent for review.

Comment 5 Raghavendra Bhat 2014-02-06 10:45:01 UTC
http://review.gluster.org/#/c/6501/ handles the issue.

Comment 6 senaik 2014-02-10 10:49:05 UTC
Version : 
========

No crash observed while creating snap with description more than 1024C. 
Snapshot is created successfully after truncating the description with the message: "Description provided is longer than 1024 characters"

 gluster snapshot create vol0 -n snap1 -d "Using this feature, an admin can take scheduled or unscheduled snapshots of and thereby backup a Glusterfs volume. This also provides a check-point in time to restore to, if and when necessary. In virtual machine hosted environment, this feature also provides a mechanism to take snapshots of the vm-disks.An online-snapshot is a feature where the file-system and associated data continue to be available for the clients, while the snapshot is being taken. Here the onus lies on the application to periodically sync data, so that the snap created has the desired data consistent view. On the other hand, an offline back-up makes the file-system offline or unavailable for a deterministic time-window till the snapshot is taken. This is usually achieved by doing a flush, followed by a freeze/thaw on the file-system prior to taking a snapshot. While offline snapshots are relatively easy to administer, the inaccessibility to the volume(s)/data is a major disadvantage.At any given point in time, a single gluster volume is accessed by multiple clients. In such a scenario, an offline snapshot/backup does not work because taking snapshots could lead to the whole volume being unavailable for a certain time window. This leads to an unknown scenario/behavior for the applications. Moreover in a Cloud environment such unavailability can result in even more compounded and indeterminate system behavior"
snapshot create: description truncated: Description provided is longer than 1024 characters
snapshot create: snap1: snap created successfully



gluster snapshot list vol0 -d

Volume Name                  : vol0
Number of snaps taken        : 1
Number of snaps available    : 255

	Snap Name         : snap1
	Snap Time         : 2014-02-10 09:06:46
	Snap UUID         : 97503def-e911-4d7a-ae68-48421aa87220
	CG Name           : Does not exist
	CG ID             : Does not exist
	Snap Description  : Using this feature, an admin can take scheduled or unscheduled snapshots of and thereby backup a Glusterfs volume. This also provides a check-point in time to restore to, if and when necessary. In virtual machine hosted environment, this feature also provides a mechanism to take snapshots of the vm-disks.An online-snapshot is a feature where the file-system and associated data continue to be available for the clients, while the snapshot is being taken. Here the onus lies on the application to periodically sync data, so that the snap created has the desired data consistent view. On the other hand, an offline back-up makes the file-system offline or unavailable for a deterministic time-window till the snapshot is taken. This is usually achieved by doing a flush, followed by a freeze/thaw on the file-system prior to taking a snapshot. While offline snapshots are relatively easy to administer, the inaccessibility to the volume(s)/data is a major disadvantage.At any given point in time, a single gluster volume is
	Snap Status       : In-use


Marking the bug as 'Verified'

Comment 8 Nagaprasad Sathyanarayana 2014-04-21 06:18:16 UTC
Marking snapshot BZs to RHS 3.0.

Comment 9 Nagaprasad Sathyanarayana 2014-05-06 12:05:58 UTC
Fixing RHS 3.0 flags.

Comment 10 Nagaprasad Sathyanarayana 2014-05-06 12:12:53 UTC
Fixing RHS 3.0 flags.

Comment 11 Nagaprasad Sathyanarayana 2014-05-19 10:56:38 UTC
Setting flags required to add BZs to RHS 3.0 Errata

Comment 14 errata-xmlrpc 2014-09-22 19:30:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2014-1278.html