diff options
| author | Pranith Kumar K <pkarampu@redhat.com> | 2016-11-18 13:30:08 +0530 |
|---|---|---|
| committer | Raghavendra G <rgowdapp@redhat.com> | 2016-11-24 22:27:47 -0800 |
| commit | 41ee2fbad54c89add98c4c0423211f246409708a (patch) | |
| tree | 789a65b2fed6697bcd7940bfb107b85576354780 /tests/basic | |
| parent | 66f5c8a6f06c389cfb8b845254d3033f2b22801a (diff) | |
performance/io-threads: Exit threads in fini() as well
Problem:
io-threads starts the thread in 'init()' but doesn't clean them up
on 'fini()'. It relies on PARENT_DOWN to exit threads but there can
be cases where event before PARENT_UP the graph init code can think
of issuing fini(). This code path is hit when glfs_init() is called
on a volume that is in 'stopped' state. It leads to a crash in ganesha
process, because the io-thread tries to access freed memory.
Fix:
Ideal fix would be to wait for all fops in io-thread list to be completed on
PARENT_DOWN, and have fini() do cleanup of threads. Because there is no proper
documentation about how PARENT_DOWN/fini are supposed to be used,
we are getting different kinds of sequences in different higher level protocols.
So for now cleaning up in both PARENT_DOWN and fini(). Fuse doesn't call fini()
gfapi is not calling PARENT_DOWN in some cases, so for now I don't see
another way out.
>BUG: 1396793
>Change-Id: I9c9154e7d57198dbaff0f30d3ffc25f6d8088aec
>Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
>Reviewed-on: http://review.gluster.org/15888
>Smoke: Gluster Build System <jenkins@build.gluster.org>
>CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
>NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
>Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
>(cherry picked from commit 25817a8c868b6c1b8149117f13e4216a99e453aa)
Change-Id: Id55e7c2f3e90c013d40e59bfbfb3f1583b8c4061
BUG: 1397381
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/15921
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'tests/basic')
0 files changed, 0 insertions, 0 deletions
