Bug 862526

Summary: cli crashes during volume set operation
Product: [Community] GlusterFS Reporter: Krutika Dhananjay <kdhananj>
Component: cliAssignee: Krutika Dhananjay <kdhananj>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:55:41 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:

Description Krutika Dhananjay 2012-10-03 07:04:23 UTC
Description of problem:
cli crashes during volume set when it is invoked from the gluster cli prompt.

[root@kd glusterfs]# gluster
gluster> volume set v3 auth.allow "write-behind"
Segmentation fault (core dumped)

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Go to the gluster cli prompt ( gluster>)
2. do volume set on auth.allow with value equal to "write-behind" (without omitting the double quotes), which is invalid but nonetheless, shouldn't cause the cli to crash.

Actual results:


Expected results:


Additional info:
The following info is taken from valgrind log.


==10540== Invalid write of size 2
==10540==    at 0x421FED: cli_to_glusterd (cli-rpc-ops.c:6008)
==10540==    by 0x417FAF: gf_cli_set_volume (cli-rpc-ops.c:2704)
==10540==    by 0x40DBFD: cli_cmd_volume_set_cbk (cli-cmd-volume.c:908)
==10540==    by 0x40A2CB: cli_cmd_process (cli-cmd.c:140)
==10540==    by 0x40A463: cli_cmd_process_line (cli-cmd.c:202)
==10540==    by 0x40AA97: cli_rl_process_line (cli-rl.c:103)
==10540==    by 0x40B15A: cli_rl_input (cli-rl.c:368)
==10540==    by 0x3DE8A07D13: start_thread (pthread_create.c:309)
==10540==    by 0x3DE86F167C: clone (clone.S:115)
==10540==  Address 0x56145c7 is 39 bytes inside a block of size 40 alloc'd
==10540==    at 0x4A06F18: calloc (vg_replace_malloc.c:566)
==10540==    by 0x4C6E062: __gf_default_calloc (mem-pool.h:75)
==10540==    by 0x4C6E46B: __gf_calloc (mem-pool.c:113)
==10540==    by 0x421F56: cli_to_glusterd (cli-rpc-ops.c:5999)
==10540==    by 0x417FAF: gf_cli_set_volume (cli-rpc-ops.c:2704)
==10540==    by 0x40DBFD: cli_cmd_volume_set_cbk (cli-cmd-volume.c:908)
==10540==    by 0x40A2CB: cli_cmd_process (cli-cmd.c:140)
==10540==    by 0x40A463: cli_cmd_process_line (cli-cmd.c:202)
==10540==    by 0x40AA97: cli_rl_process_line (cli-rl.c:103)
==10540==    by 0x40B15A: cli_rl_input (cli-rl.c:368)
==10540==    by 0x3DE8A07D13: start_thread (pthread_create.c:309)
==10540==    by 0x3DE86F167C: clone (clone.S:115)