diff options
author | Ashish Pandey <aspandey@redhat.com> | 2016-01-18 15:57:41 +0530 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2016-02-08 00:24:44 -0800 |
commit | 8ad742de98da284539b8ae772e0990294412da01 (patch) | |
tree | a07187b8431eeeb0b4ebad783c28a67b93985919 /xlators/mount/fuse/src | |
parent | eb362c74db84d95aac07febf0d888bd98b3fb2b9 (diff) |
Fuse: Add a check for NULL in fuse_itable_dump
Problem: Immediately after starting a disperse volume (2+1)
kill one brick and just after that try to mount it
through fuse. This lead to crash.
Our test scripts use process statedumps to determine various things
like whether they are up, connected to bricks etc. It takes some time
for an active_subvol to be be associated with fuse even after mount
process is daemonized. This time is normally a function of completion
of handshake with bricks. So, if we try to take statedump in this time
window, fuse wouldn't have an active_subvol associated with it leading
to this crash.
This happened while executing ec-notify.t, which contains above steps.
Solution: Check priv and priv->active_subvol for NULL before
inode_table_dump. If priv->active_subvol is null its perfectly fine to
skip dumping of inode table as inode table is associated with an
active_subvol. A Null active_subvol indicates initialization in
progress and fuse wouldn't even have started reading requests from
/dev/fuse and hence there wouldn't be any inodes or file system
activity.
Change-Id: I323a154789edf8182dbd1ac5ec7ae07bf59b2060
BUG: 1299410
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
Reviewed-on: http://review.gluster.org/13253
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/mount/fuse/src')
-rw-r--r-- | xlators/mount/fuse/src/fuse-bridge.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index dabef3598cc..724a70b8149 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -5024,10 +5024,11 @@ fuse_itable_dump (xlator_t *this) priv = this->private; - gf_proc_dump_add_section("xlator.mount.fuse.itable"); - inode_table_dump(priv->active_subvol->itable, - "xlator.mount.fuse.itable"); - + if (priv && priv->active_subvol) { + gf_proc_dump_add_section("xlator.mount.fuse.itable"); + inode_table_dump(priv->active_subvol->itable, + "xlator.mount.fuse.itable"); + } return 0; } |