+++ This bug was initially created as a clone of Bug #1229658 +++
Description of problem:
statedump requests that traverse call frames of all call stacks in execution may race with a STACK_RESET on a stack. This could crash the corresponding glusterfs process. For e.g, recently we observed this in a regression test case, tests/basic/afr/sparse-self-heal.t.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Maintain constant I/O on a GlusterFS volume.
2. Issue a statedump request, using kill -SIGUSR1 <process-pid> concurrently.
glusterfs process may crash
glusterfs process shouldn't crash and the statedump must be logged successfully.
--- Additional comment from Anand Avati on 2015-06-09 07:43:20 EDT ---
REVIEW: http://review.gluster.org/11095 (stack: use list_head for managing frames) posted (#5) for review on master by Krishnan Parthasarathi (email@example.com)
REVIEW: http://review.gluster.org/11352 (stack: use list_head for managing frames) posted (#1) for review on release-3.7 by Krishnan Parthasarathi (firstname.lastname@example.org)
COMMIT: http://review.gluster.org/11352 committed in release-3.7 by Pranith Kumar Karampuri (email@example.com)
Author: Krishnan Parthasarathi <firstname.lastname@example.org>
Date: Fri Jun 5 10:33:11 2015 +0530
stack: use list_head for managing frames
statedump requests that traverse call frames of all call stacks in
execution may race with a STACK_RESET on a stack. This could crash the
corresponding glusterfs process. For e.g, recently we observed this in a
regression test case tests/basic/afr/sparse-self-heal.t.
gf_proc_dump_pending_frames takes a (TRY_LOCK) call_pool->lock before
iterating through call frames of all call stacks in progress. With this
fix, STACK_RESET removes its call frames under the same lock.
This fix makes call_stack_t to use struct list_head in place of custom
doubly-linked list implementation. This makes call_frame_t manipulation
easier to maintain in the context of STACK_WIND et al.
Signed-off-by: Krishnan Parthasarathi <email@example.com>
Reviewed-by: Niels de Vos <firstname.lastname@example.org>
Tested-by: Gluster Build System <email@example.com>
Reviewed-by: Pranith Kumar Karampuri <firstname.lastname@example.org>
Tested-by: NetBSD Build System <email@example.com>
(cherry picked from commit 79e4c7b2fad6db15863efb4e979525b1bd4862ea)
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.3, please open a new bug report.
glusterfs-3.7.3 has been announced on the Gluster mailinglists , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.