From 4ee59efe3826745a5359bd36e79957d3b78ec4ba Mon Sep 17 00:00:00 2001 From: Jeff Darcy Date: Fri, 17 Feb 2017 09:42:46 -0500 Subject: glusterd: take conn->lock around operations on conn->reconnect Failure to do this could lead to a race in which a timer would be removed twice concurrently, corrupting the timer list (because gf_timer_call_cancel has no internal protection against this) and possibly causing a crash. Backport of: > 4e0d4b15717da1f6466133158a26927fb91384b8 > BUG: 1421721 > Reviewed-on: https://review.gluster.org/16662 Change-Id: Ic1a8b612d436daec88fd6cee935db0ae81a47d5c BUG: 1431175 Signed-off-by: Jeff Darcy Reviewed-on: https://review.gluster.org/16885 Reviewed-by: Atin Mukherjee Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- tests/bugs/core/bug-1421721-mpx-toggle.t | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/bugs/core/bug-1421721-mpx-toggle.t (limited to 'tests') diff --git a/tests/bugs/core/bug-1421721-mpx-toggle.t b/tests/bugs/core/bug-1421721-mpx-toggle.t new file mode 100644 index 00000000000..231be5b81a0 --- /dev/null +++ b/tests/bugs/core/bug-1421721-mpx-toggle.t @@ -0,0 +1,25 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +write_a_file () { + echo $1 > $2 +} + +TEST glusterd +TEST $CLI volume create $V0 $H0:$B0/${V0}[0,1] + +TEST $CLI volume set all cluster.brick-multiplex on +TEST $CLI volume start $V0 + +TEST $GFS -s $H0 --volfile-id=$V0 $M0 +TEST write_a_file "hello" $M0/a_file + +TEST force_umount $M0 +TEST $CLI volume stop $V0 + +TEST $CLI volume set all cluster.brick-multiplex off +TEST $CLI volume start $V0 + +cleanup -- cgit