Bug 1211576 - Gluster CLI crashes when volume create command is incomplete
Summary: Gluster CLI crashes when volume create command is incomplete
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Satish Mohan
QA Contact:
URL:
Whiteboard: GlusterD
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-14 11:10 UTC by Joseph Elwin Fernandes
Modified: 2016-06-20 00:01 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.8rc2
Clone Of:
Environment:
Last Closed: 2016-06-16 12:50:21 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Joseph Elwin Fernandes 2015-04-14 11:10:12 UTC
Description of problem:

Gluster volume create command core dumps:

[root@josferna redhat]# gluster volume create test replica 2
Segmentation fault (core dumped)
[root@josferna redhat]# 


(gdb) 
(gdb) bt
#0  0x0000003533d3bff6 in __strcmp_ssse3 () from /lib64/libc.so.6
#1  0x0000000000430e0c in cli_cmd_volume_create_parse (state=0x7fff3a715090, words=0x7fff3a715260, wordcount=5, options=0x7f06be06fe00) at cli-cmd-parser.c:530
#2  0x000000000040e2b6 in cli_cmd_volume_create_cbk (state=0x7fff3a715090, word=0x1f4c790, words=0x7fff3a715260, wordcount=5) at cli-cmd-volume.c:214
#3  0x000000000040c9ff in cli_cmd_process (state=0x7fff3a715090, argc=5, argv=0x7fff3a715260) at cli-cmd.c:140
#4  0x000000000040c4eb in cli_batch (d=0x7fff3a715090) at input.c:34
#5  0x0000003534007ee5 in start_thread () from /lib64/libpthread.so.0
#6  0x0000003533cf4b8d in clone () from /lib64/libc.so.6
(gdb) 



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


How reproducible:

Just execute this incomplete command,

$> gluster volume create test replica 2

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-04-15 07:09:25 UTC
REVIEW: http://review.gluster.org/10245 (cli: validate brick while creating replicate volume) posted (#1) for review on master by Gaurav Kumar Garg (ggarg)

Comment 2 Anand Avati 2015-04-23 16:57:38 UTC
REVIEW: http://review.gluster.org/10245 (cli: validate brick while creating replicate volume) posted (#3) for review on master by Gaurav Kumar Garg (ggarg)

Comment 3 Anand Avati 2015-04-24 06:29:28 UTC
COMMIT: http://review.gluster.org/10245 committed in master by Kaushal M (kaushal) 
------
commit ec6ccda3783e9a3edd5a2e4093e07ee37f266520
Author: Gaurav Kumar Garg <ggarg>
Date:   Wed Apr 15 12:32:11 2015 +0530

    cli: validate brick while creating replicate volume
    
    When user create replicate volume by typing incomplete command
    "gluster volume create <VOLNAME> replica replica_count" then cli
    is crashing.
    Fix is to validate command properly. If user have not given any brick
    then it should return proper cli command usage error message.
    
    Change-Id: I3d4096a144e20f21ab956049af1dae196217a807
    BUG: 1211576
    Signed-off-by: Gaurav Kumar Garg <ggarg>
    Reviewed-on: http://review.gluster.org/10245
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Atin Mukherjee <amukherj>
    Reviewed-by: Ravishankar N <ravishankar>
    Tested-by: NetBSD Build System
    Reviewed-by: Kaushal M <kaushal>
    Tested-by: Kaushal M <kaushal>

Comment 4 Anand Avati 2015-04-30 08:18:28 UTC
REVIEW: http://review.gluster.org/10462 (cli: validate brick while creating replicate volume) posted (#1) for review on release-3.7 by Gaurav Kumar Garg (ggarg)

Comment 5 Anand Avati 2015-05-01 07:19:17 UTC
COMMIT: http://review.gluster.org/10462 committed in release-3.7 by Vijay Bellur (vbellur) 
------
commit 539bbfad68939601c8666d16d7bc51e89321ebef
Author: Gaurav Kumar Garg <ggarg>
Date:   Wed Apr 15 12:32:11 2015 +0530

    cli: validate brick while creating replicate volume
    
    When user create replicate volume by typing incomplete command
    "gluster volume create <VOLNAME> replica replica_count" then cli
    is crashing.
    Fix is to validate command properly. If user have not given any brick
    then it should return proper cli command usage error message.
    
    Change-Id: I3d4096a144e20f21ab956049af1dae196217a807
    BUG: 1211576
    Signed-off-by: Gaurav Kumar Garg <ggarg>
    Reviewed-on: http://review.gluster.org/10245
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Atin Mukherjee <amukherj>
    Reviewed-by: Ravishankar N <ravishankar>
    Tested-by: NetBSD Build System
    Reviewed-by: Kaushal M <kaushal>
    Tested-by: Kaushal M <kaushal>
    (cherry picked from commit ec6ccda3783e9a3edd5a2e4093e07ee37f266520)
    Reviewed-on: http://review.gluster.org/10462
    Reviewed-by: Krishnan Parthasarathi <kparthas>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 6 Niels de Vos 2015-05-14 17:29:27 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Niels de Vos 2015-05-14 17:35:56 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Niels de Vos 2015-05-14 17:38:17 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 9 Niels de Vos 2015-05-14 17:46:49 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 11 Niels de Vos 2016-06-16 12:50:21 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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