Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp938261pxp; Wed, 16 Mar 2022 21:59:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWTsBFPySSWhp11cN8SRLaetlmFSzVsKX61+GgwimZhd1LloNmAky+Trw7KTe7YDJp0QCd X-Received: by 2002:a17:902:7fc2:b0:153:3c90:17b9 with SMTP id t2-20020a1709027fc200b001533c9017b9mr2791979plb.61.1647493158054; Wed, 16 Mar 2022 21:59:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647493158; cv=none; d=google.com; s=arc-20160816; b=JpftHU90nqyZR3Ch6mI7wWyCKES15EI3udhLvkzaog9MMCglmsGpaoBO9paAfZaAwP PwRG0Khrb3doxF6GQOJJnqphOt9SQGQvnB0QKj9M0gZ0A8+TI0ukk474bpV7X95zmqp8 FsBT6EkXzA5qN9A8a0FbckKiu5m9kKwCPz9Qsuq+E7DdECCqThzAS10uG30vQG76VRnC qFyxs/KFOKfzgVYa8yfjMB0AYMVSElgkRmGEaOZXBFmDoyEJVv6UImf059x6C/Y/Rfzx AX2NtwMll1If0ZH003WMmPJZUzyeiZcnUWlicMZWkgE5P2kE6VA9qnwWStXbVWQkTzXO otdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id:date :references:subject:to:from:dkim-signature; bh=LlSJ7alKcJr08/SyBfp6L3HGPJ94XSr0s4DRqkjkzu0=; b=xZOxTcTyMF5nEx0rbt8XhRH0JgIoBlqtmrKyKiqWHU3AH0Ov3M2OGBN1y2TjcBoaJ9 LgFxdcDN4c5vIE/bdYxCKfNLxQAUtZvwxwlhyoT6byS4zmIcI/DuuTxy+stq3NYD9Emo OH5uSI/b7NeQkYf2UX8l7tBqUzLSh+5vQVGmynVOzft6gBtfEw22zQ4XDrE7RsJyisfE NfJERJmYLA6Q6RCW7vyyo3mWh1GYNw4HgpSND9PuZDtne/cmSpnscW51RTn5jjZWRDrF /1uWXOTgZaGAgM69DLOGBsOnfP/03WOP6ay+lwI/6jo8elqbIz54LNB1wjHgP7mKG2W1 ufWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sigma-chemnitz.de header.s=v2012061000 header.b=SjMJ1XKf; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sigma-chemnitz.de Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c15-20020a056a000acf00b004e104694fcfsi3984339pfl.366.2022.03.16.21.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 21:59:18 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@sigma-chemnitz.de header.s=v2012061000 header.b=SjMJ1XKf; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sigma-chemnitz.de Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B54E187B8C; Wed, 16 Mar 2022 21:14:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233460AbiCPU4r (ORCPT + 99 others); Wed, 16 Mar 2022 16:56:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344217AbiCPU4q (ORCPT ); Wed, 16 Mar 2022 16:56:46 -0400 Received: from smtpout-3.cvg.de (smtpout-3.cvg.de [IPv6:2003:49:a034:1067:5::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99D991D338 for ; Wed, 16 Mar 2022 13:55:30 -0700 (PDT) Received: from mail-mta-2.intern.sigma-chemnitz.de (mail-mta-2.intern.sigma-chemnitz.de [192.168.12.70]) by mail-out-3.intern.sigma-chemnitz.de (8.16.1/8.16.1) with ESMTPS id 22GKtSPQ262244 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK) for ; Wed, 16 Mar 2022 21:55:28 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigma-chemnitz.de; s=v2012061000; t=1647464128; bh=LlSJ7alKcJr08/SyBfp6L3HGPJ94XSr0s4DRqkjkzu0=; l=4130; h=From:To:Subject:References:Date; b=SjMJ1XKf3P6hxWvD8IuMyka8lkSnAr4kKQcQU7BsUbvyId1Gi/yl2fW2o6GbpvhVL nngREq4c6rlsbjsNKpps26Y3eOjkdw6qs5jP0Tu6Czyo0r3nuW/gZoG/dcmU/f6ICJ DDhe22AK2UgPjfk/O+mFuR6ETUtBUmhzi/Wgf5h8= Received: from reddoxx.intern.sigma-chemnitz.de (reddoxx.sigma.local [192.168.16.32]) by mail-mta-2.intern.sigma-chemnitz.de (8.16.1/8.16.1) with ESMTP id 22GKtP4u001156 for from enrico.scholz@sigma-chemnitz.de; Wed, 16 Mar 2022 21:55:26 +0100 Received: from mail-msa-3.intern.sigma-chemnitz.de ( [192.168.12.73]) by reddoxx.intern.sigma-chemnitz.de (Reddoxx engine) with SMTP id 65EE3859A7; Wed, 16 Mar 2022 21:55:23 +0100 Received: from ensc-virt.intern.sigma-chemnitz.de (ensc-virt.intern.sigma-chemnitz.de [192.168.3.24]) by mail-msa-3.intern.sigma-chemnitz.de (8.15.2/8.15.2) with ESMTPS id 22GKtM0i260512 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for from ensc@sigma-chemnitz.de; Wed, 16 Mar 2022 21:55:23 +0100 Received: from ensc by ensc-virt.intern.sigma-chemnitz.de with local (Exim 4.94.2) (envelope-from ) id 1nUafx-0002aK-At for linux-nfs@vger.kernel.org; Wed, 16 Mar 2022 21:55:21 +0100 From: Enrico Scholz To: linux-nfs@vger.kernel.org Subject: Re: Random NFS client lockups References: Date: Wed, 16 Mar 2022 21:55:21 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: Enrico Scholz X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Enrico Scholz writes: > I am experiencing random NFS client lockups after 1-2 days. > ... > The full log is available at https://pastebin.pl/view/7d0b345b Filtering only RPC messages[1] shows ----- Mar 16 04:48:58.345357: RPC: worker connecting xprt 0000000022aecad1 via tcp to XXXXX:2001:1022:: (port 2049) Mar 16 04:48:58.345487: RPC: 0000000022aecad1 connect status 115 connected 0 sock state 2 Mar 16 04:48:58.345705: RPC: state 1 conn 0 dead 0 zapped 1 sk_shutdown 0 Mar 16 05:02:40.037783: RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 Mar 16 05:02:40.037921: RPC: xs_close xprt 0000000022aecad1 Mar 16 05:02:40.038076: RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.038211: RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.038293: RPC: xs_error_report client 0000000022aecad1, error=104... Mar 16 05:02:40.038449: RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.039134: RPC: xs_connect scheduled xprt 0000000022aecad1 Mar 16 05:02:40.042991: RPC: xs_bind 0000:0000:0000:0000:0000:0000:0000:0000:883: ok (0) Mar 16 05:02:40.043072: RPC: worker connecting xprt 0000000022aecad1 via tcp to XXXXX:2001:1022:: (port 2049) Mar 16 05:02:40.043159: RPC: 0000000022aecad1 connect status 115 connected 0 sock state 2 Mar 16 05:02:40.043308: RPC: state 1 conn 0 dead 0 zapped 1 sk_shutdown 0 Mar 16 05:02:40.045883: RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 Mar 16 05:02:40.046163: RPC: xs_close xprt 0000000022aecad1 Mar 16 05:02:40.046410: RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.046625: RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.047428: RPC: xs_connect scheduled xprt 0000000022aecad1 Mar 16 05:02:40.050387: RPC: xs_bind 0000:0000:0000:0000:0000:0000:0000:0000:822: ok (0) Mar 16 05:02:40.050614: RPC: worker connecting xprt 0000000022aecad1 via tcp to XXXXX:2001:1022:: (port 2049) Mar 16 05:02:40.050662: RPC: 0000000022aecad1 connect status 115 connected 0 sock state 2 Mar 16 05:02:40.050788: RPC: state 1 conn 0 dead 0 zapped 1 sk_shutdown 0 Mar 16 05:02:40.051969: RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 Mar 16 05:02:40.052067: RPC: xs_close xprt 0000000022aecad1 Mar 16 05:02:40.052189: RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.052243: RPC: xs_error_report client 0000000022aecad1, error=32... Mar 16 05:02:40.052367: RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.052503: RPC: state 7 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:02:40.053201: RPC: xs_connect scheduled xprt 0000000022aecad1 Mar 16 05:02:40.055886: RPC: xs_bind 0000:0000:0000:0000:0000:0000:0000:0000:875: ok (0) __A__ 05:02:40.055947: RPC: worker connecting xprt 0000000022aecad1 via tcp to XXXXX:2001:1022:: (port 2049) Mar 16 05:02:40.055995: RPC: 0000000022aecad1 connect status 115 connected 0 sock state 2 Mar 16 05:02:40.056125: RPC: state 1 conn 0 dead 0 zapped 1 sk_shutdown 0 Mar 16 05:07:28.326605: RPC: state 8 conn 1 dead 0 zapped 1 sk_shutdown 1 Mar 16 05:07:28.326679: RPC: xs_connect scheduled xprt 0000000022aecad1 __B__ 05:07:28.326978: RPC: worker connecting xprt 0000000022aecad1 via tcp to XXXXX:2001:1022:: (port 2049) Mar 16 05:07:28.327050: RPC: 0000000022aecad1 connect status 0 connected 0 sock state 8 __C__ 05:07:28.327113: RPC: xs_close xprt 0000000022aecad1 Mar 16 05:07:28.327229: RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 Mar 16 05:07:28.327446: RPC: state 9 conn 0 dead 0 zapped 1 sk_shutdown 3 ----- For me, it seems that 'xs_close' at position __C__ belongs to the connection at __A__ but is applied to the newly created connection __B__. Because the close did not happened yet, __B__ operated on the old socket which is in state 8 (CLOSE_WAIT) and connect returned with 0 instead of -EINPROGRESS hence. There will not be generated a new connection in this case. It seems to be some race where 'xs_connect()' is executed before a delayed 'xs_error_handle()'. Both functions are called in reaction of a 'CLOSE_WAIT'. Enrico