Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1392456ybn; Wed, 25 Sep 2019 17:39:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0zy3eeIHgQwkH0PtDDeyupvYbBoovqy/elPfTtAIw4cUL0cv2vmh2+4Y8PR+P1YIma8zA X-Received: by 2002:a17:906:5284:: with SMTP id c4mr846254ejm.39.1569458376057; Wed, 25 Sep 2019 17:39:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458376; cv=none; d=google.com; s=arc-20160816; b=q4WqmD9RjWYQKFmVcE5uhDV2SsFKkGEx5cG5ulmtukGzygmQ/zQu1GO7mfDEKZsbf1 xbOeD0skuJHMsxfS/G0Rr6W3wSYUcuBo86GylY98kAK3xSfqwYlihPJjGDxc1VwZXVyI YvTk892ixJxubUrcLbK/swK6fTm2RN7vK6Q42+NMOC+fHlvqTussg3Dn5OmkwjjgPdQg 5FJSDP9RGzhFgPpGZ/YFDDVEJEvluWyIU4JSGTGP66ggrus+H3pkLMbyKiMr67OsgvwW 4ha5fi4gIMPdtFiqvnYDzxVoRACaLBhGR8O3CXRsPJ0oPzrQbtBFdmOaL9XcReeG7h6S qHNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=lLYtaARxjDWgDaoGwEZkVE8l0lrfXwXhlypc3x349Vk=; b=vgqjoduYoEgAieKC7oEwYNXiwRsjxnNQSQlaGEUiqsQ1JwoeDRjR8fs/LWYZDkw0hQ QINNuMQkC8lTiRU3vC/T4ztsdLgPcgj3lcsGYSxBOQIoSx1eFvqxyKM2Z4TaxMKJ3Kpa k3M/lUaygswMjf6qpWPJb9A1bNwUisKjfkjvJcFTZPVurYgw681uBh7hA0NJXAEBdy2c /dX62WX3jJIHkTJIUsGz6DO5zVfgFo4nGceO3KLcRXxKciCTfkfoIGodkMUNddnvdFf+ T9lcTDi/z4rsk6Tfejo1sOBkS58AdH14l+HAt4YL7Ph7Vp8+0BXrIYplYSXl2z9I9wIv D8Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dug-com.20150623.gappssmtp.com header.s=20150623 header.b=OfTFjKt7; 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 v13si397178eds.375.2019.09.25.17.39.02; Wed, 25 Sep 2019 17:39:35 -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; dkim=pass header.i=@dug-com.20150623.gappssmtp.com header.s=20150623 header.b=OfTFjKt7; 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 S1726770AbfIXESM (ORCPT + 99 others); Tue, 24 Sep 2019 00:18:12 -0400 Received: from mail-pf1-f171.google.com ([209.85.210.171]:33815 "EHLO mail-pf1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbfIXESM (ORCPT ); Tue, 24 Sep 2019 00:18:12 -0400 Received: by mail-pf1-f171.google.com with SMTP id b128so438405pfa.1 for ; Mon, 23 Sep 2019 21:18:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dug-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lLYtaARxjDWgDaoGwEZkVE8l0lrfXwXhlypc3x349Vk=; b=OfTFjKt7U6mim14lUT3PEyT6z5zqdDagiHdYEj5C5LgMIMR3bwoykr+5aYwUm59PXE FrFQtIu8vY2b4WK5ms/pej4RIkdYRdfBkpEhhH6dFjVx2/98JbPiCjJNbjNd92iSRfiX WFglPBUEX7yE+dU6eXtEGoSojHiVq3zEBSHXD58OZrNkn5UYi7sCGEcEvJB2uaq9sFi9 nSy6ZSmSp9VDwU8Uj239GqcyfcMyxfhLF33lkHiXq0ydGD/fYot8wmENFuQRnLO1oBbt GuD6o1MPTR1yqzN0AVp278wM7O1tSScp+oDW3UC8MIyKUOdm+rXkjCqTRVNwXYtHbFGO n90Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lLYtaARxjDWgDaoGwEZkVE8l0lrfXwXhlypc3x349Vk=; b=XlYPEF2FjPxysEuflZ3chklZD0gg7z20FKxmyiULEXH7cUe2W3HnebVjj8i5b0zE8a XpYjp7NcANJx98wRj4rXKEpBk4cpyqjMG9kLZJvWuAalccsXkhADMz125Ormd1R5v3gJ 59cA+kbXN4q897hHnEwt/6ASL5dRJHJNaniqrSX1Sm1zCjAEKeFhCmI7m8ZxqoOTGAKe NqnILSpA6TcMDavYZDXYstj/DSPwZzfdtXs4FtHmW6r6/mCNegDngDMqQpz4Fle5MBBE Z2OcsTogt5jb2S0x4zKM/P2kGSXUbm78pPrHqYRTakoCyw1B6zsXoC8axx1EcTB1rSco d/ww== X-Gm-Message-State: APjAAAVLpgpXxqr7ws2Ue9/snc2Pq99wH1MV3VryxuTLp+63lgV40Nuj knhFfQJadLqwVcnR2We1Awj1s7EC6Itt0Pr1LRGdhA== X-Received: by 2002:a63:c304:: with SMTP id c4mr1103274pgd.126.1569298690612; Mon, 23 Sep 2019 21:18:10 -0700 (PDT) MIME-Version: 1.0 References: <8217416C-F3E5-4BEE-BD01-2BE19952425E@redhat.com> <66D00B9D-16DC-4979-8400-457398DC4801@redhat.com> In-Reply-To: From: Leon Kyneur Date: Tue, 24 Sep 2019 12:17:58 +0800 Message-ID: Subject: Re: troubleshooting LOCK FH and NFS4ERR_BAD_SEQID To: Olga Kornievskaia Cc: Benjamin Coddington , linux-nfs Content-Type: text/plain; charset="UTF-8" Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Thu, Sep 19, 2019 at 9:36 PM Olga Kornievskaia wrote: > > Hi Leon, > > Given that you have a network trace with the BAD_SEQID error can you > filter on the file handle and trace the operations? It should be > possible to tell at that point if it's the client that's sending an > incorrect seq or the server. I'm assuming we can either trace the > locking stated to a previous (successful) use or to an open. Provided > tshark output isn't enough to see what was inside the packets. > > If the LOCK that's failing used a seqid that wasn't bootstrapped from > the open seqid, then it can't be caused by a double CLOSE problem. But > if this LOCK was was bootstrapped from the open stateid we need to > traces open owner sequencing and a double close could have been the > cause. Hi Olga I don't ever see a double close in my packet captures. Here's a more verbose dump, I'm not quite sure what you mean re LOCK "wasn't bootstrapped from the open seqid" that does seem to explain it as I don't see the 0x00000001 seq id on the from the OPEN call later in the LOCK FH call. The working example (also below) does show this. So I'm still wondering if this is the double close issue or something else? # tshark -2 -n -r ../nfs.pcap -z proto,colinfo,nfs.stateid4.other,nfs.stateid4.other ... 22 3 172.27.50.222 -> 172.27.255.28 NFS 370 V4 Call (Reply In 23) OPEN DH: 0xbfe01adc/m.db nfs.seqid == 0x00000022 23 3 172.27.255.28 -> 172.27.50.222 NFS 394 V4 Reply (Call In 22) OPEN StateID: 0x7999 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e3:02:00:00 24 3 172.27.50.222 -> 172.27.255.28 NFS 290 V4 Call (Reply In 25) OPEN_CONFIRM nfs.seqid == 0x00000001 nfs.seqid == 0x00000023 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e3:02:00:00 25 3 172.27.255.28 -> 172.27.50.222 NFS 138 V4 Reply (Call In 24) OPEN_CONFIRM nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e3:02:00:00 26 3 172.27.50.222 -> 172.27.255.28 NFS 370 V4 Call (Reply In 27) OPEN DH: 0x272b8d23/.sqliterc nfs.seqid == 0x00000024 27 3 172.27.255.28 -> 172.27.50.222 NFS 122 V4 Reply (Call In 26) OPEN Status: NFS4ERR_NOENT 28 3 172.27.50.222 -> 172.27.255.28 NFS 374 V4 Call (Reply In 29) OPEN DH: 0x272b8d23/.sqlite_history nfs.seqid == 0x00000025 29 3 172.27.255.28 -> 172.27.50.222 NFS 430 V4 Reply (Call In 28) OPEN StateID: 0x3203 nfs.seqid == 0x00000001 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e5:02:00:00 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e6:02:00:00 30 3 172.27.50.222 -> 172.27.255.28 NFS 306 V4 Call (Reply In 31) CLOSE StateID: 0x3203 nfs.seqid == 0x00000026 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e5:02:00:00 31 3 172.27.255.28 -> 172.27.50.222 NFS 202 V4 Reply (Call In 30) CLOSE nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e5:02:00:00 32 3 172.27.50.222 -> 172.27.255.28 NFS 306 V4 Call (Reply In 33) LOOKUP DH: 0x272b8d23/.terminfo 33 3 172.27.255.28 -> 172.27.50.222 NFS 122 V4 Reply (Call In 32) LOOKUP Status: NFS4ERR_NOENT 34 3 172.27.50.222 -> 172.27.255.28 NFS 290 V4 Call (Reply In 35) ACCESS FH: 0x272b8d23, [Check: RD LU MD XT DL] 35 3 172.27.255.28 -> 172.27.50.222 NFS 194 V4 Reply (Call In 34) ACCESS, [Allowed: RD LU MD XT DL] 36 3 172.27.50.222 -> 172.27.255.28 NFS 282 V4 Call (Reply In 37) GETATTR FH: 0x272b8d23 37 3 172.27.255.28 -> 172.27.50.222 NFS 266 V4 Reply (Call In 36) GETATTR 38 3 172.27.50.222 -> 172.27.255.28 NFS 302 V4 Call (Reply In 39) LOOKUP DH: 0x272b8d23/.inputrc 39 3 172.27.255.28 -> 172.27.50.222 NFS 122 V4 Reply (Call In 38) LOOKUP Status: NFS4ERR_NOENT 40 3 172.27.50.222 -> 172.27.255.28 TCP 66 822 > 2049 [ACK] Seq=3950 Ack=2617 Win=3077 Len=0 TSval=177154789 TSecr=3474577216 41 5 172.27.50.222 -> 172.27.255.28 NFS 354 V4 Call (Reply In 42) LOCK FH: 0x80589398 Offset: 1073741824 Length: 1 nfs.seqid == 0x00000027 nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:e3:02:00:00 42 5 172.27.255.28 -> 172.27.50.222 NFS 122 V4 Reply (Call In 41) LOCK Status: NFS4ERR_BAD_SEQID 43 5 172.27.50.222 -> 172.27.255.28 TCP 66 822 > 2049 [ACK] Seq=4238 Ack=2673 Win=3077 Len=0 TSval=177156701 TSecr=3474579167 working: 7 2 172.27.50.222 -> 172.27.255.28 NFS 370 V4 Call (Reply In 8) OPEN DH: 0xbfe01adc/m.db nfs.seqid == 0x00000017 8 2 172.27.255.28 -> 172.27.50.222 NFS 394 V4 Reply (Call In 7) OPEN StateID: 0x08c1 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fc:02:00:00 9 2 172.27.50.222 -> 172.27.255.28 NFS 374 V4 Call (Reply In 10) OPEN DH: 0x272b8d23/.sqlite_history nfs.seqid == 0x00000018 10 2 172.27.255.28 -> 172.27.50.222 NFS 430 V4 Reply (Call In 9) OPEN StateID: 0x147a nfs.seqid == 0x00000001 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fd:02:00:00 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fe:02:00:00 11 2 172.27.50.222 -> 172.27.255.28 NFS 306 V4 Call (Reply In 12) CLOSE StateID: 0x147a nfs.seqid == 0x00000019 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fd:02:00:00 12 2 172.27.255.28 -> 172.27.50.222 NFS 202 V4 Reply (Call In 11) CLOSE nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fd:02:00:00 13 2 172.27.50.222 -> 172.27.255.28 TCP 66 919 > 2049 [ACK] Seq=1293 Ack=1157 Win=40 Len=0 TSval=177379723 TSecr=3474802150 14 4 172.27.50.222 -> 172.27.255.28 NFS 354 V4 Call (Reply In 15) LOCK FH: 0x80589398 Offset: 1073741824 Length: 1 nfs.seqid == 0x0000001a nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fc:02:00:00 15 4 172.27.255.28 -> 172.27.50.222 NFS 138 V4 Reply (Call In 14) LOCK nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 16 4 172.27.50.222 -> 172.27.255.28 TCP 66 919 > 2049 [ACK] Seq=1581 Ack=1229 Win=40 Len=0 TSval=177381305 TSecr=3474803772 17 4 172.27.50.222 -> 172.27.255.28 NFS 318 V4 Call (Reply In 18) LOCK FH: 0x80589398 Offset: 1073741826 Length: 510 nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 18 4 172.27.255.28 -> 172.27.50.222 NFS 138 V4 Reply (Call In 17) LOCK nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 19 4 172.27.50.222 -> 172.27.255.28 NFS 310 V4 Call (Reply In 20) LOCKU FH: 0x80589398 Offset: 1073741824 Length: 1 nfs.seqid == 0x00000002 nfs.seqid == 0x00000002 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 20 4 172.27.255.28 -> 172.27.50.222 NFS 138 V4 Reply (Call In 19) LOCKU nfs.seqid == 0x00000003 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 21 4 172.27.50.222 -> 172.27.255.28 NFS 298 V4 Call (Reply In 22) READ StateID: 0x2656 Offset: 0 Len: 6144 nfs.seqid == 0x00000003 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 22 4 172.27.255.28 -> 172.27.50.222 NFS 6274 V4 Reply (Call In 21) READ 23 4 172.27.50.222 -> 172.27.255.28 TCP 66 919 > 2049 [ACK] Seq=2309 Ack=7581 Win=40 Len=0 TSval=177381309 TSecr=3474803775 24 4 172.27.50.222 -> 172.27.255.28 NFS 310 V4 Call (Reply In 25) LOCKU FH: 0x80589398 Offset: 0 Length: nfs.seqid == 0x00000003 nfs.seqid == 0x00000003 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 25 4 172.27.255.28 -> 172.27.50.222 NFS 138 V4 Reply (Call In 24) LOCKU nfs.seqid == 0x00000004 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:ff:02:00:00 26 4 172.27.50.222 -> 172.27.255.28 NFS 190 V4 Call (Reply In 28) RELEASE_LOCKOWNER 27 4 172.27.50.222 -> 172.27.255.28 NFS 354 V4 Call (Reply In 29) LOCK FH: 0x80589398 Offset: 1073741824 Length: 1 nfs.seqid == 0x0000001b nfs.seqid == 0x00000001 nfs.stateid4.other == 8f:73:7b:5d:30:ab:b5:d0:fc:02:00:00 28 4 172.27.255.28 -> 172.27.50.222 NFS 114 V4 Reply (Call In 26) RELEASE_LOCKOWNER