Bug 1222379 - Fix infinite looping in shard_readdir(p) on '/'
Summary: Fix infinite looping in shard_readdir(p) on '/'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: sharding
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Krutika Dhananjay
QA Contact: bugs@gluster.org
URL:
Whiteboard:
Depends On:
Blocks: 1226880
TreeView+ depends on / blocked
 
Reported: 2015-05-18 05:08 UTC by Krutika Dhananjay
Modified: 2016-06-16 13:03 UTC (History)
1 user (show)

Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1226880 (view as bug list)
Environment:
Last Closed: 2016-06-16 13:03:00 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Krutika Dhananjay 2015-05-18 05:08:22 UTC
Description of problem:

Readdir(p) on '/' in sharded volume can sometimes lead to infinite calls to readdirp at same set of offsets circling back to offset=0 all over again.

RCA:
DHT performs readdirp one subvol at a time and the entries are ordered according to their offsets in ascending order. At some point, when /.shard is the last of the several entries read, and DHT unwinds the call to shard xlator, it deletes the entry corresponding to "/.shard" from the list as it is not supposed to be exposed on the mount. Shard xlator then unwinds the call with the rest of the entries to parent xlator. When the readdirp result reaches readdir-ahead translator, it winds the next readdir at the last entry's offset (which is at an offset less than that of "/.shard"). In this iteration, DHT fetches "/.shard", shard xlator ignores it and unwinds with no entries. In such cases, readdir-ahead creates a new stub for readdirp with offset = 0. When the call is resumed, it would again lead to the same events described above getting executed again forever, causing the mount to perceive a hang.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-05-18 17:06:10 UTC
REVIEW: http://review.gluster.org/10809 (features/shard: Fix issue with readdir(p) fop) posted (#1) for review on master by Krutika Dhananjay (kdhananj)

Comment 2 Anand Avati 2015-05-28 10:36:51 UTC
REVIEW: http://review.gluster.org/10809 (features/shard: Fix issue with readdir(p) fop) posted (#2) for review on master by Krutika Dhananjay (kdhananj)

Comment 3 Anand Avati 2015-05-29 06:08:58 UTC
REVIEW: http://review.gluster.org/10809 (features/shard: Fix issue with readdir(p) fop) posted (#3) for review on master by Krutika Dhananjay (kdhananj)

Comment 4 Anand Avati 2015-05-30 10:33:24 UTC
REVIEW: http://review.gluster.org/10809 (features/shard: Fix issue with readdir(p) fop) posted (#4) for review on master by Krutika Dhananjay (kdhananj)

Comment 5 Nagaprasad Sathyanarayana 2015-10-25 14:58:49 UTC
Fix for this BZ is already present in a GlusterFS release. You can find clone of this BZ, fixed in a GlusterFS release and closed. Hence closing this mainline BZ as well.

Comment 6 Niels de Vos 2016-06-16 13:03:00 UTC
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.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://blog.gluster.org/2016/06/glusterfs-3-8-released/
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.