Bug 961691 - CLI crash upon executing "gluster peer status " command
CLI crash upon executing "gluster peer status " command
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: cli (Show other bugs)
mainline
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: santosh pradhan
:
Depends On: 960946
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-10 05:43 EDT by santosh pradhan
Modified: 2014-09-21 18:54 EDT (History)
7 users (show)

See Also:
Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 960946
Environment:
Last Closed: 2013-07-24 13:10:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Anand Avati 2013-05-10 05:46:06 EDT
REVIEW: http://review.gluster.org/4976 (gluster/CLI: crash upon executing "peer status" command) posted (#2) for review on master by Santosh Pradhan (spradhan@redhat.com)
Comment 2 Anand Avati 2013-05-10 08:39:22 EDT
COMMIT: http://review.gluster.org/4976 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit fef1270fc2d665c67084c4ce06f60fc8faed4d52
Author: Santosh Kumar Pradhan <spradhan@redhat.com>
Date:   Fri May 10 14:31:27 2013 +0530

    gluster/CLI: crash upon executing "peer status" command
    
    Problem:
    While doing "gluster peer status", cli_cmd_peer_status_cbk() creates
    the frame and passes as arg to gf_cli_list_friends() which sets
    frame->local to GF_CLI_LIST_PEERS flag (value: 0x1). It expects
    gf_cli_list_friends_cbk() [invoked through cli_cmd_submit()] to
    reset frame->local to NULL. But if cli_cmd_submit() fails some
    where before gf_cli_list_friends_cbk() gets invoked, then the
    flag value remains in frame->local and causes a SEGV while
    destroying the stack i.e. [CLI_STACK_DESTROY => cli_local_wipe()].
    
    Fix:
    In gf_cli_list_friends(), if cli_cmd_submit() fails, then
    reset the value of frame->local to NULL.
    
    Change-Id: Ied19f07eaf67e3bd42c75cdc2ff3729b0789e632
    BUG: 961691
    Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
    Reviewed-on: http://review.gluster.org/4976
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Comment 3 santosh pradhan 2013-05-13 02:35:19 EDT
Already submitted to mainline.
Comment 4 Sachidananda Urs 2013-05-13 02:42:12 EDT
Please update Fixed in Version field before moving to ON_QA
Comment 5 Anand Avati 2013-09-05 06:39:25 EDT
REVIEW: http://review.gluster.org/5811 (gluster/CLI: crash upon executing "peer status" command) posted (#1) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 6 Anand Avati 2013-09-05 11:13:11 EDT
REVIEW: http://review.gluster.org/5811 (gluster/CLI: crash upon executing "peer status" command) posted (#2) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 7 Anand Avati 2013-09-06 00:27:14 EDT
REVIEW: http://review.gluster.org/5811 (gluster/CLI: crash upon executing "peer status" command) posted (#3) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 8 Anand Avati 2013-09-06 03:43:10 EDT
REVIEW: http://review.gluster.org/5811 (gluster/CLI: crash upon executing "peer status" command) posted (#4) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 9 Anand Avati 2013-09-07 11:01:27 EDT
REVIEW: http://review.gluster.org/5811 (gluster/CLI: crash upon executing "peer status" command) posted (#5) for review on release-3.4 by Vijay Bellur (vbellur@redhat.com)
Comment 10 Anand Avati 2013-09-09 20:23:29 EDT
COMMIT: http://review.gluster.org/5811 committed in release-3.4 by Anand Avati (avati@redhat.com) 
------
commit ddcb2409afce17f2720ab8198cf587728b4b3bb4
Author: Santosh Kumar Pradhan <spradhan@redhat.com>
Date:   Fri May 10 14:31:27 2013 +0530

    gluster/CLI: crash upon executing "peer status" command
    
    Problem:
    While doing "gluster peer status", cli_cmd_peer_status_cbk() creates
    the frame and passes as arg to gf_cli_list_friends() which sets
    frame->local to GF_CLI_LIST_PEERS flag (value: 0x1). It expects
    gf_cli_list_friends_cbk() [invoked through cli_cmd_submit()] to
    reset frame->local to NULL. But if cli_cmd_submit() fails some
    where before gf_cli_list_friends_cbk() gets invoked, then the
    flag value remains in frame->local and causes a SEGV while
    destroying the stack i.e. [CLI_STACK_DESTROY => cli_local_wipe()].
    
    Fix:
    In gf_cli_list_friends(), if cli_cmd_submit() fails, then
    reset the value of frame->local to NULL.
    
    Change-Id: Ied19f07eaf67e3bd42c75cdc2ff3729b0789e632
    BUG: 961691
    Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
    Reviewed-on: http://review.gluster.org/4976
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>
    Reviewed-on: http://review.gluster.org/5811
    Reviewed-by: Anand Avati <avati@redhat.com>

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