Bug 769804 - Glusterd crashes when you add brick with replica 2 to the striped-replicate volume
Summary: Glusterd crashes when you add brick with replica 2 to the striped-replicate v...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: GlusterFS
Classification: Community
Component: cli
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Rajesh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-22 10:20 UTC by Vijaykumar Koppad
Modified: 2014-08-25 00:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-09 07:18:17 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Vijaykumar Koppad 2011-12-22 10:20:45 UTC
Description of problem:
Volume Name: vol
Type: Striped-Replicate
Status: Started
Number of Bricks: 0 x 2 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: vostro:/home/vijay/bricks/doa/f1
Brick2: vostro:/home/vijay/bricks/doa/f2

If you try to add-bricks to this volume with replica 2 option, it will crash 

"gluster volume add-brick  vol replica 2  vostro:/home/vijay/bricks/doa/f3 vostro:/home/vijay/bricks/doa/f4"


How reproducible: Consistently


Steps to Reproduce:
1.Create a striped-replicate volume .
2.then add brick with replica 2 option.


This is the back trace of the core.
################################################################################
#0  0x00007f9b8b1aa5f3 in add_brick_at_right_order (brickinfo=0xf29cf0, volinfo=0x6ad7f0, count=0, stripe_cnt=0, replica_cnt=2) at glusterd-brick-ops.c:79
#1  0x00007f9b8b1ae902 in glusterd_op_perform_add_bricks (volinfo=0x6ad7f0, count=2, 
    bricks=0x6bc7b0 " vostro:/home/vijay/bricks/doa/f3 vostro:/home/vijay/bricks/doa/f4 ", dict=0x6ad200) at glusterd-brick-ops.c:826
#2  0x00007f9b8b1b0f4e in glusterd_op_add_brick (dict=0x6ad200, op_errstr=0x7fffe9ccabd8) at glusterd-brick-ops.c:1327
#3  0x00007f9b8b13be4e in glusterd_op_commit_perform (op=GD_OP_ADD_BRICK, dict=0x6ad200, op_errstr=0x7fffe9ccabd8, rsp_dict=0x0) at glusterd-op-sm.c:2304
#4  0x00007f9b8b139188 in glusterd_op_ac_send_commit_op (event=0x6be950, ctx=0x6ba4c0) at glusterd-op-sm.c:1681
#5  0x00007f9b8b13f55c in glusterd_op_sm () at glusterd-op-sm.c:3321
#6  0x00007f9b8b1ac7d1 in glusterd_handle_add_brick (req=0x7f9b8b04204c) at glusterd-brick-ops.c:489
#7  0x00007f9b8df20728 in rpcsvc_handle_rpc_call (svc=0x6a5640, trans=0x6bde70, msg=0x6a6f90) at rpcsvc.c:507
#8  0x00007f9b8df20cdb in rpcsvc_notify (trans=0x6bde70, mydata=0x6a5640, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x6a6f90) at rpcsvc.c:603
#9  0x00007f9b8df2a656 in rpc_transport_notify (this=0x6bde70, event=RPC_TRANSPORT_MSG_RECEIVED, data=0x6a6f90) at rpc-transport.c:498
#10 0x00007f9b8ae2d0eb in socket_event_poll_in (this=0x6bde70) at socket.c:1675
#11 0x00007f9b8ae2db23 in socket_event_handler (fd=19, idx=12, data=0x6bde70, poll_in=1, poll_out=0, poll_err=0) at socket.c:1790
#12 0x00007f9b8e1ac078 in event_dispatch_epoll_handler (event_pool=0x69d2d0, events=0x6a89d0, i=0) at event.c:794
#13 0x00007f9b8e1ac43b in event_dispatch_epoll (event_pool=0x69d2d0) at event.c:856
#14 0x00007f9b8e1aca69 in event_dispatch (event_pool=0x69d2d0) at event.c:956
#15 0x000000000040adb3 in main (argc=3, argv=0x7fffe9ccba28) at glusterfsd.c:1601
(gdb) f 0
#0  0x00007f9b8b1aa5f3 in add_brick_at_right_order (brickinfo=0xf29cf0, volinfo=0x6ad7f0, count=0, stripe_cnt=0, replica_cnt=2) at glusterd-brick-ops.c:79
79	        idx = (count / (replica_cnt - sub_cnt) * sub_cnt) +
(gdb) f 1
#1  0x00007f9b8b1ae902 in glusterd_op_perform_add_bricks (volinfo=0x6ad7f0, count=2, 
    bricks=0x6bc7b0 " vostro:/home/vijay/bricks/doa/f3 vostro:/home/vijay/bricks/doa/f4 ", dict=0x6ad200) at glusterd-brick-ops.c:826
826	                        add_brick_at_right_order (brickinfo, volinfo, (i - 1),
(gdb) f 3
#3  0x00007f9b8b13be4e in glusterd_op_commit_perform (op=GD_OP_ADD_BRICK, dict=0x6ad200, op_errstr=0x7fffe9ccabd8, rsp_dict=0x0) at glusterd-op-sm.c:2304
2304	                        ret = glusterd_op_add_brick (dict, op_errstr);
(gdb) f 4
#4  0x00007f9b8b139188 in glusterd_op_ac_send_commit_op (event=0x6be950, ctx=0x6ba4c0) at glusterd-op-sm.c:1681
1681	        ret = glusterd_op_commit_perform (op, dict, &op_errstr, NULL); //rsp_dict invalid for source

Comment 1 Rajesh 2012-01-09 07:18:17 UTC
This bug has been implicitly fixed by the solution of https://bugzilla.redhat.com/show_bug.cgi?id=770561 : http://review.gluster.com/2577. 
After this patch, we cannot remove bricks to get a 0x2x2 configuration.


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