Bug 765303 (GLUSTER-3571) - [glustersfs-3.3.0qa9]: gluster cli crashes instead of shwoing the proper usage for a wrong command
Summary: [glustersfs-3.3.0qa9]: gluster cli crashes instead of shwoing the proper usag...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-3571
Product: GlusterFS
Classification: Community
Component: cli
Version: pre-release
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-16 08:24 UTC by Raghavendra Bhat
Modified: 2015-12-01 16:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions: 3.3.0qa11
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2011-09-16 08:24:11 UTC
gluster volume create <volname> replica 2:

The above command which does not contain the bricks as the arguments to the command crashes with the following backtrace.


Core was generated by `gluster volume create mirror replica 2'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000004086fb in cli_getunamb (tok=0x0, choices=0x7fd0bf668d20, sel=0x417e11 <id_sel>) at ../../../cli/src/registry.c:271
271	        if (!choices || !*tok)
(gdb) bt
#0  0x00000000004086fb in cli_getunamb (tok=0x0, choices=0x7fd0bf668d20, sel=0x417e11 <id_sel>) at ../../../cli/src/registry.c:271
#1  0x0000000000417e49 in str_getunamb (tok=0x0, opwords=0x7fd0bf668d20) at ../../../cli/src/cli-cmd-parser.c:49
#2  0x00000000004187eb in cli_cmd_volume_create_parse (words=0x7fff07f81560, wordcount=5, options=0x7fd0bf668de8)
    at ../../../cli/src/cli-cmd-parser.c:225
#3  0x0000000000409cf9 in cli_cmd_volume_create_cbk (state=0x7fff07f81390, word=0x19a4300, words=0x7fff07f81560, wordcount=5)
    at ../../../cli/src/cli-cmd-volume.c:170
#4  0x00000000004090fb in cli_cmd_process (state=0x7fff07f81390, argc=5, argv=0x7fff07f81560) at ../../../cli/src/cli-cmd.c:146
#5  0x0000000000408b67 in cli_batch (d=0x7fff07f81390) at ../../../cli/src/input.c:44
#6  0x00007fd0c1720d8c in start_thread (arg=0x7fd0bf669700) at pthread_create.c:304
#7  0x00007fd0c146c04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#8  0x0000000000000000 in ?? ()
(gdb) info thr
  3 Thread 30068  0x00007fd0c146c6a3 in epoll_wait () at ../sysdeps/unix/syscall-template.S:82
  2 Thread 30069  0x00007fd0c14335ad in nanosleep () at ../sysdeps/unix/syscall-template.S:82
* 1 Thread 30073  0x00000000004086fb in cli_getunamb (tok=0x0, choices=0x7fd0bf668d20, sel=0x417e11 <id_sel>)
    at ../../../cli/src/registry.c:271
(gdb) f 2
#2  0x00000000004187eb in cli_cmd_volume_create_parse (words=0x7fff07f81560, wordcount=5, options=0x7fd0bf668de8)
    at ../../../cli/src/cli-cmd-parser.c:225
225	                w = str_getunamb (words[index], opwords);
(gdb) p words[index]
$1 = 0x0
(gdb) p index
$2 = 5
(gdb) p words
$3 = (const char **) 0x7fff07f81560
(gdb) p words[0]
$4 = 0x7fff07f8188f "volume"
(gdb) p words[1]
$5 = 0x7fff07f81896 "create"
(gdb) p words[2]
$6 = 0x7fff07f8189d "mirror"
(gdb) p words[3]
$7 = 0x7fff07f818a4 "replica"
(gdb) p words[4]
$8 = 0x7fff07f818ac "2"
(gdb) p words[5]
$9 = 0x0
(gdb)

Comment 1 Amar Tumballi 2011-09-19 00:40:48 UTC
Johny submitted a patch for this already.

Comment 2 Anand Avati 2011-09-19 02:04:04 UTC
CHANGE: http://review.gluster.com/438 (Change-Id: I41f896d5a9c514994874b6e4e956d38fed742d4b) merged in master by Vijay Bellur (vijay)


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