diff options
author | Vijay Bellur <vbellur@redhat.com> | 2019-01-10 11:08:49 -0800 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2019-01-11 03:23:35 +0000 |
commit | fa7ae128706062afefcb0a3117527b8bef21f396 (patch) | |
tree | 70dc227ee6127ccb42b176d8a492db8235e0a9d0 /tests/bugs | |
parent | 99ac5a83805e46659124acfefbc05c9b6dda1a1b (diff) |
performance/md-cache: Fix a crash when statfs caching is enabled
mem_put() in STACK_UNWIND_STRICT causes a crash if frame->local is not null
as md-cache obtains local from CALLOC.
Changed two occurrences of STACK_UNWIND_STRICT to MDC_STACK_UNWIND as
the latter macro does not rely on STACK_UNWIND_STRICT for cleaning up
frame->local.
fixes: bz#1632503
Change-Id: I1b3edcb9372a164ef73119e99a49e747765d7166
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'tests/bugs')
-rwxr-xr-x | tests/bugs/md-cache/bug-1632503.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/bugs/md-cache/bug-1632503.t b/tests/bugs/md-cache/bug-1632503.t new file mode 100755 index 00000000000..aeb57f65639 --- /dev/null +++ b/tests/bugs/md-cache/bug-1632503.t @@ -0,0 +1,24 @@ +#!/bin/bash + +. $(dirname $0)/../../include.rc +. $(dirname $0)/../../volume.rc + +cleanup; +TESTS_EXPECTED_IN_LOOP=5 + +TEST glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}{1,2,3}; + +TEST $CLI volume start $V0 + +TEST $CLI volume set $V0 performance.md-cache-timeout 600 +TEST $CLI volume set $V0 performance.md-cache-statfs on + +TEST glusterfs --volfile-id=/$V0 --volfile-server=$H0 $M0 + +for i in $(seq 1 5); do + TEST_IN_LOOP df $M0; +done + +cleanup; |