Description of problem: Getting a crash while i am running the test case tests/bugs/replicate/bug-1266876-allow-reset-brick-for-same-path.t 0x00007f38c9bf17d9 in glusterd_svcs_stop (volinfo=0x7f38bc01d9d0) at glusterd-svc-helper.c:90 #2 0x00007f38c9bf75d0 in glusterd_op_reset_brick (dict=dict@entry=0x7f38bc006108, rsp_dict=rsp_dict@entry=0x7f38bc00a838) at glusterd-reset-brick.c:329 #3 0x00007f38c9bd65cb in gd_mgmt_v3_commit_fn (op=op@entry=GD_OP_RESET_BRICK, dict=dict@entry=0x7f38bc006108, op_errstr=op_errstr@entry=0x7f38b8405910, op_errno=op_errno@entry=0x7f38b840590c, rsp_dict=rsp_dict@entry=0x7f38bc00a838) at glusterd-mgmt.c:341 #4 0x00007f38c9bd99e6 in glusterd_mgmt_v3_commit (op=op@entry=GD_OP_RESET_BRICK, op_ctx=op_ctx@entry=0x7f38bc002ac8, req_dict=0x7f38bc006108, op_errstr=op_errstr@entry=0x7f38b8405910, op_errno=op_errno@entry=0x7f38b840590c, txn_generation=txn_generation@entry=0) at glusterd-mgmt.c:1577 #5 0x00007f38c9b932d1 in glusterd_mgmt_v3_initiate_replace_brick_cmd_phases (req=req@entry=0x7f38b80018b8, op=op@entry=GD_OP_RESET_BRICK, dict=0x7f38bc002ac8) at glusterd-replace-brick.c:662 #6 0x00007f38c9b937ef in __glusterd_handle_replace_brick (req=req@entry=0x7f38b80018b8) at glusterd-replace-brick.c:147 #7 0x00007f38c9af72ee in glusterd_big_locked_handler (req=0x7f38b80018b8, actor_fn=0x7f38c9b93310 <__glusterd_handle_replace_brick>) at glusterd-handler.c:79 #8 0x00007f38d723d6b0 in synctask_wrap () at syncop.c:272 #9 0x00007f38d5637010 in ?? () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () It is crashing in this function ret = priv->nfs_svc.stop(&(priv->nfs_svc), SIGKILL); if (ret) goto out; here nfs_svc is NULL because nfs_svc specific code executed only while we do pass gnfs to configure Need to protect access to priv->nfs_svc members only if priv_nfs_svc != NULL
REVIEW: https://review.gluster.org/24059 (multiple files: ensure nfs_svc functions are available) posted (#1) for review on master by Yaniv Kaul
REVIEW: https://review.gluster.org/24059 (multiple files: ensure nfs_svc functions are available) merged (#5) on master by MOHIT AGRAWAL