Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1179047ybl; Wed, 28 Aug 2019 10:46:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6ycVDdyTWs4egREu7jdq0t5dJSatOxg3UApjoQe4kAeP1yuEMcX49BNInOnTODRKHhga9 X-Received: by 2002:a63:9318:: with SMTP id b24mr4446313pge.31.1567014392243; Wed, 28 Aug 2019 10:46:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567014392; cv=none; d=google.com; s=arc-20160816; b=n3KNjNQJZjZwzxToDaK5fmS1QcXqwyfXSbpO63lUpvy4N3juURGVQDOxG0dx6n5L0z kLndqywoJf3OT5RuW7k5z2hU2uF9iDyk2ww+9ZHQ/SzTqRv9dx16Vw68gSivceK1jeF2 ekGSRlsDmbpaiHBwAUSWgrvadqcbO7PrnmQrsIg7ymWHgAj0T4txrkVc5ZuPEG40GbkP u830W2i7tP1M6UPT8qKGQDHemK26XrorJRW0SKWNypfwhdvoXCzDTRsaqjp8OW5XXQ2q CXxNO2gze3Hypd5CPxOYhj+xqZuiaS7FZQXlo96cxEOiC0+2evqB+D1RfVhmBot4aVtT ot2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:from:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date; bh=KgQ2+gsNHef5lAFE3r7E6wxwKgdm5tYG4vK6yAZCx2U=; b=r8weSqx3lEeTQhL33toAMZ6777BdJnZlaU+mq8zcFbBJhmxudq3lwURQuoZ2Qyoo8w aNezrvnvv3Jn79zzoRjYpUGGeW48zz/FnnXiWSLCAg+Ek3+28Ng82NVe8IvTVHeWeQjw WNqEeBsclpN6IJO1z7I5gYebhQzspejSSp/iS6mUGWfSrEbp1wPrrM9psBuEwYECeDtT EwcJ04/LHOhn3UaqkE8J8Ps5e06UtILhX+e2vt3/m5hORkZNKHYfRXTokIBLRHzEK07Y IIs6pRCXtrHqaNc3HZYz8O7mizJ0sqjM5yGU71d4UTTMpmeliWo57cw5IUeVuJiksGZr BIJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si2697903pgc.65.2019.08.28.10.46.11; Wed, 28 Aug 2019 10:46:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726566AbfH1RqK (ORCPT + 99 others); Wed, 28 Aug 2019 13:46:10 -0400 Received: from fieldses.org ([173.255.197.46]:49346 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726515AbfH1RqJ (ORCPT ); Wed, 28 Aug 2019 13:46:09 -0400 Received: by fieldses.org (Postfix, from userid 2815) id 480341E3B; Wed, 28 Aug 2019 13:46:09 -0400 (EDT) Date: Wed, 28 Aug 2019 13:46:09 -0400 To: Jason L Tibbitts III Cc: linux-nfs@vger.kernel.org, km@cm4all.com, linux-kernel@vger.kernel.org Subject: Re: Regression in 5.1.20: Reading long directory fails Message-ID: <20190828174609.GB29148@fieldses.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) From: bfields@fieldses.org (J. Bruce Fields) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Aug 22, 2019 at 02:39:26PM -0500, Jason L Tibbitts III wrote: > I now have another user reporting the same failure of readdir on a long > directory which showed up in 5.1.20 and was traced to > 3536b79ba75ba44b9ac1a9f1634f2e833bbb735c. I'm not sure what to do to > get more traction besides reposting and adding some addresses to the CC > list. If there is any information I can provide which might help to get > to the bottom of this, please let me know. > > To recap: > > 5.1.20 introduced a regression reading some large directories. In this > case, the directory should have 7800 files or so in it: > > [root@ld00 ~]# ls -l ~dblecher|wc -l > ls: reading directory '/home/dblecher': Input/output error > 1844 > [root@ld00 ~]# cat /proc/version Linux version 5.1.20-300.fc30.x86_64 (mockbuild@bkernel04.phx2.fedoraproject.org) (gcc version 9.1.1 20190503 (Red Hat 9.1.1-1) (GCC)) #1 SMP Fri Jul 26 15:03:11 UTC 2019 > > (The server is a Centos 7 machine running kernel 3.10.0-957.12.2.el7.x86_64.) > > Building a kernel which reverts commit 3536b79ba75ba44b9ac1a9f1634f2e833bbb735c: > Revert "NFS: readdirplus optimization by cache mechanism" (memleak) Looks like that's db531db951f950b8 upstream. (Do you know if it's reproduceable upstream as well?) > fixes the issue, but of course that revert was fixing a real issue so > I'm not sure what to do. > > I can trivially reproduce this by simply trying to list the problematic > directories but I'm not sure how to construct such a directory; simply > creating 10000 files doesn't cause the problem for me. Maybe it depends on having names of the right length to place some bit of xdr on a boundary. I wonder if it'd be possible to reproduce just by varying the name lengths randomly till you hit it. The fact that the problematic patch fixed a memory leak also makes me wonder if it might have gone to far and freed something out from under the readdir code. > I am willing to > test patches and can build my own kernels, and I'm happy to provide any > debugging information you might require. Unfortunately I don't know > enough to dig in and figure out for myself what's going wrong. > > I did file https://bugzilla.redhat.com/show_bug.cgi?id=1740954 just to > have this in a bug tracker somewhere. I'm happy to file one somewhere > else if that would help. No clever debugging ideas off the top of my head, I'm afraid. I might start by patching the kernel or doing some tracing to figure out exactly where that EIO is being generated? --b.