summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2019-06-25 11:11:10 +0530
committerSanju Rakonde <sanjurakonde@review.gluster.org>2019-07-09 05:29:47 +0000
commit0bd67afd2bf0cba6c18e2b635af5f45ef4c0a852 (patch)
treec9e43ead48b7df5cb887dbee91f5d811534642f9 /xlators/mgmt
parentfdbb808e6dda80044ff9cc868eca265ca9614485 (diff)
glusterd: conditionally clear txn_opinfo in stage op
...otherwise this leads to a crash when volume status is run on a heterogeneous mode. > Fixes: bz#1723658 > Change-Id: I0d39f412b2e5e9d3ef0a3462b90b38bb5364b09d > Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit a72452fcf90679b28baec12d2769cbaa982bb4e4) Fixes: bz#1728126 Change-Id: I0d39f412b2e5e9d3ef0a3462b90b38bb5364b09d Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 84c34f1fe4a..af6194de4be 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -5655,9 +5655,14 @@ glusterd_op_ac_stage_op(glusterd_op_sm_event_t *event, void *ctx)
glusterd_op_info_t txn_op_info = {
{0},
};
+ glusterd_conf_t *priv = NULL;
this = THIS;
GF_ASSERT(this);
+
+ priv = this->private;
+ GF_ASSERT(priv);
+
GF_ASSERT(ctx);
req_ctx = ctx;
@@ -5709,9 +5714,12 @@ out:
gf_msg_debug(this->name, 0, "Returning with %d", ret);
/* for no volname transactions, the txn_opinfo needs to be cleaned up
- * as there's no unlock event triggered
+ * as there's no unlock event triggered. However if the originator node of
+ * this transaction is still running with a version lower than 60000,
+ * txn_opinfo can't be cleared as that'll lead to a race of referring op_ctx
+ * after it's being freed.
*/
- if (txn_op_info.skip_locking)
+ if (txn_op_info.skip_locking && priv->op_version >= GD_OP_VERSION_6_0)
ret = glusterd_clear_txn_opinfo(txn_id);
if (rsp_dict)