Bug 1089934
| Summary: | list dir with more than N files results in Input/output error | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | Niels de Vos <ndevos> |
| Component: | fuse | Assignee: | Niels de Vos <ndevos> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.5.0 | CC: | gluster-bugs, jegan4u, joe, luiscamposflores, ndevos, sebastian.thomae, thigdon |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | glusterfs-3.5.1beta | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1074023 | Environment: | |
| Last Closed: | 2014-06-24 11:05:01 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1074023 | ||
| Bug Blocks: | |||
|
Description
Niels de Vos
2014-04-22 09:09:41 UTC
REVIEW: http://review.gluster.org/7522 (fuse: prevent READDIR(P) from writing to much data to /dev/fuse) posted (#1) for review on release-3.5 by Niels de Vos (ndevos) REVIEW: http://review.gluster.org/7522 (fuse: prevent READDIR(P) from writing to much data to /dev/fuse) posted (#2) for review on release-3.5 by Niels de Vos (ndevos) COMMIT: http://review.gluster.org/7522 committed in release-3.5 by Niels de Vos (ndevos) ------ commit 94282fcae8ecb0d53399baa4e96f3aaa443979f0 Author: Niels de Vos <ndevos> Date: Thu Apr 24 13:38:31 2014 +0200 fuse: prevent READDIR(P) from writing to much data to /dev/fuse In an environment with mixed architectures (32-bit servers, 64-bit client), it is possible that the on-wire Reply on a READDIR(P) procedure contains more direntries than the client can fit in the maximum size that the fuse-request indicated. A direntry is a dynamically sized structure, because the structure contains the name of the entry. The client sends a maximum size in the READDIR(P) Call to the server, and the server uses this size to limit the number of direntries to return. In case the server can pack more direntries in the requested maximum size (due to alignment differences between the architectures), it can happen that the client unpacks the list of direntries into a buffer that exceeds the maximum size that was given in the initial fuse-request. This change introduces a check for the maximum requested size of the fuse-response in fuse_readdir_cbk() and fuse_readdirp_cbk(). When the conversion from gluster-direntries to the fuse-direntry format takes place, the maximum size is checked, and the 'extra' direntries are discarded. The next readdir()/getdents() that is done, will fetch the just discarded direntries again. In addition to this bugfix, some extra logging in send_fuse_iov() and send_fuse_data() has been added to help diagnosing similar issues. This change combines two commits from master: > Commit: 20e317011af7c0f075819bf0648b225f6dc42350 > Change-Id: If2eecfcdf9c248f3820035601446d2c89ff9d1a1 > BUG: 1074023 > Signed-off-by: Niels de Vos <ndevos> > Reviewed-on: http://review.gluster.org/7278 > Tested-by: Gluster Build System <jenkins.com> > Reviewed-by: Xavier Hernandez <xhernandez> > Reviewed-by: Anand Avati <avati> > > Commit: 76ab97169f63da78c9e83daf040d7b09766497cf > Change-Id: Ic62d9d729a86a1a6a53ed1354fce153bac01d860 > BUG: 1074023 > Reported-by: Kaleb S. KEITHLEY <kkeithle> > Signed-off-by: Niels de Vos <ndevos> > Reviewed-on: http://review.gluster.org/7547 > Tested-by: Gluster Build System <jenkins.com> > Reviewed-by: Anand Avati <avati> Change-Id: Id847db26d861a9805041ff3367e848da7be05545 BUG: 1089934 Signed-off-by: Niels de Vos <ndevos> Reviewed-on: http://review.gluster.org/7522 Tested-by: Gluster Build System <jenkins.com> Reviewed-by: Xavier Hernandez <xhernandez> The first (and last?) Beta for GlusterFS 3.5.1 has been released [1]. Please verify if the release solves this bug report for you. In case the glusterfs-3.5.1beta release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED. Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution. [1] http://supercolony.gluster.org/pipermail/gluster-users/2014-May/040377.html [2] http://supercolony.gluster.org/pipermail/gluster-users/ 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.5.1, please reopen this bug report. glusterfs-3.5.1 has been announced on the Gluster Users mailinglist [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://supercolony.gluster.org/pipermail/gluster-users/2014-June/040723.html [2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user |