Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7155814ybi; Mon, 8 Jul 2019 15:46:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWTXJdXO9ErJkMBiu1vzD2pG8wVlkf5JjV185uUaVcY/R+1O2pIdq55dwZzOgo+fOwguck X-Received: by 2002:a63:510a:: with SMTP id f10mr25954698pgb.435.1562626000191; Mon, 08 Jul 2019 15:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562626000; cv=none; d=google.com; s=arc-20160816; b=tGGE5WypOTV//pqg/ebUm8TudS5DZKavtvcZe/jAKHQ2SZxjS1t8JvV6XJS+XRfm3S X04H9gthi/zABPlqC6m4p8ssKz/fv4l0fZp/ABAcqBKoabkLi5QB3fla52w2ZR52vGUA YyI5oEUPu1Ea931kB12nEvgPX6xvckB2Wt1ApSy6Td5+v/uSortwXcjkESSpzINcr+Jm 1cjnF4zC3bSYguQbW1xVjGLuBHLELMAHf3HtwM3LNTiy9ERvHbJjBM/uWRA1lyF0S3g2 HwZGEO1otjOH+yqOkSNXKsUvZJkYxmliR0PTo35XnP47ihvcDf5lU2RE0ZQ4QMk+90W1 6ehA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:to :organization:subject:from; bh=9kJOmqrIv6o6xujtH8ublv6qf/B7iAaNZ0LLtHO51H8=; b=J3TYa4sa/R6rhsq7BkgZCDS+dy2XJ3k+okAmppwdzvpmTCfHa1UKpfASmBnOqU58nW yY7hxGNj12ISPV5u3kSvBkePV0alUYVpSutyNvbAWElf9GnkA1F0f01iprUUUTlS/SWr vf8NriZ3G/J/fQnC12+36ToRTrBgniu0WoR2p+9Xm9e0aDabfdaRR1TFbG6IWFUF8nXQ NDvbqMI0I8HQkOUkobVyLFtEI5E0WxR5PXXenoyLxtdSuNvZxEB0MGv2i/BYHvOQQ+xc +kEjSaqIvoc9OLsDJ1FpspFFVTB/Y5rqWiWNHxFKS6+aB8g7Y3ql+42LyaeH/chpBUo+ mF4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 j4si20300610pgh.251.2019.07.08.15.46.25; Mon, 08 Jul 2019 15:46:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731357AbfGHS57 (ORCPT + 99 others); Mon, 8 Jul 2019 14:57:59 -0400 Received: from ivanoab6.miniserver.com ([5.153.251.140]:35716 "EHLO www.kot-begemot.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728562AbfGHS57 (ORCPT ); Mon, 8 Jul 2019 14:57:59 -0400 X-Greylist: delayed 2280 seconds by postgrey-1.27 at vger.kernel.org; Mon, 08 Jul 2019 14:57:59 EDT Received: from [192.168.17.6] (helo=jain.kot-begemot.co.uk) by www.kot-begemot.co.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkYF3-0000i0-Lu for linux-kernel@vger.kernel.org; Mon, 08 Jul 2019 18:19:57 +0000 Received: from sleer.kot-begemot.co.uk ([192.168.3.72]) by jain.kot-begemot.co.uk with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hkYF1-00053d-7c for linux-kernel@vger.kernel.org; Mon, 08 Jul 2019 19:19:57 +0100 From: Anton Ivanov Subject: NFS Caching broken in 4.19.37 Organization: Cambridge Greys To: Linux Kernel Mailing List Message-ID: <5022bdc4-9f3e-9756-cbca-ada37f88ecc7@cambridgegreys.com> Date: Mon, 8 Jul 2019 19:19:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 X-Spam-Score: -1.0 X-Clacks-Overhead: GNU Terry Pratchett Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi list, NFS caching appears broken in 4.19.37. The more cores/threads the easier to reproduce. Tested with identical results on Ryzen 1600 and 1600X. 1. Mount an openwrt build tree over NFS v4 2. Run make -j `cat /proc/cpuinfo | grep vendor | wc -l` ; make clean in a loop 3. Result after 3-4 iterations: State on the client ls -laF /var/autofs/local/src/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/linux-4.14.125/arch/mips/include/generated/uapi/asm total 8 drwxr-xr-x 2 anivanov anivanov 4096 Jul 8 11:40 ./ drwxr-xr-x 3 anivanov anivanov 4096 Jul 8 11:40 ../ State as seen on the server (mounted via nfs from localhost): ls -laF /var/autofs/local/src/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/linux-4.14.125/arch/mips/include/generated/uapi/asm total 12 drwxr-xr-x 2 anivanov anivanov 4096 Jul 8 11:40 ./ drwxr-xr-x 3 anivanov anivanov 4096 Jul 8 11:40 ../ -rw-r--r-- 1 anivanov anivanov 32 Jul 8 11:40 ipcbuf.h Actual state on the filesystem: ls -laF /exports/work/src/openwrt/build_dir/target-mips_24kc_musl/linux-ar71xx_tiny/linux-4.14.125/arch/mips/include/generated/uapi/asm total 12 drwxr-xr-x 2 anivanov anivanov 4096 Jul 8 11:40 ./ drwxr-xr-x 3 anivanov anivanov 4096 Jul 8 11:40 ../ -rw-r--r-- 1 anivanov anivanov 32 Jul 8 11:40 ipcbuf.h So the client has quite clearly lost the plot. Telling it to drop caches and re-reading the directory shows the file present. It is possible to reproduce this using a linux kernel tree too, just takes much more iterations - 10+ at least. Both client and server run 4.19.37 from Debian buster. This is filed as debian bug 931500. I originally thought it to be autofs related, but IMHO it is actually something fundamentally broken in nfs caching resulting in cache corruption. -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/