Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5754514imw; Wed, 20 Jul 2022 11:50:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vVTEBPEjpdpO13Xv9JqfSImizNfiN9vYnHUUk6XbvAm3FXsFqyW3j9vxLWG9wfqDzCxelp X-Received: by 2002:a63:4a06:0:b0:419:f141:888b with SMTP id x6-20020a634a06000000b00419f141888bmr24123351pga.55.1658343024912; Wed, 20 Jul 2022 11:50:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658343024; cv=none; d=google.com; s=arc-20160816; b=WSlsfi228Gb3f7jHkXmF36pSLmQpT5ha47YqOI8c3pueJdF0Jkamos4mfFAsS5Qv47 5Em5sktL5Gb1kdQAPw8OmLEoXnyAnJQnr52g9b0dyaSRxigc+zi1yOe0N6jFxOfFkxlI y7WAt7HCzNLiyx6b407EWbMuTxctecHpPlOKUy3MWkhcflm8pHJrQb7Gafi0Cem3BFgu ynxu63p5uS4MxXU7/mOCjlSoFBFnOizTN1pT5uyoTbSx4EbtKB66jcpzTP3Vc1Ux/E1S rUG4mx+7Dk4OpfGc5Kx3dvzb6lV0pxjJ+cMTqCEn8A6u/uJtb8VMA0L6k2tiduP04qsI 1JnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:subject:message-id:date:from:mime-version :dkim-signature; bh=JiBy/fr88DgKURawIAAsoW6DnbBMImuTQIFATprFxqQ=; b=ZDCLHh8V89lfihyICjgQ1YNk0Azrg0AGhNAWWH/i5qTGiigWPHhZRV5ol8msi6rSx2 9LtBM0PqgPw2TvYCZG+5E1pbKypYl7tOjyvsG/FZN3taf4PZBgocnxJ4n0YTCydPAJ/J Dxk1rc1txsLyKbOfHaqhGTqnm8XPypi33Mr+Rlb9fjrS+Ym9sKl6A8SzwxtU4okPSF41 plIcwIP/K91K+ZYgj2RFxvDFQ+xV7+m1A/0nKT2q7DDVi01BXqvj6iNoFTFPViO2BWwp FVBmihxuQTvacYaPbkpSfgEeNYiiJ++HPwlExpsUgNAjW2+ZW+LaJUNgmcyIjTmU1VEI R6Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b8fFsW+R; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a170902e84700b0016c278aa325si10679693plg.601.2022.07.20.11.49.57; Wed, 20 Jul 2022 11:50:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=b8fFsW+R; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231994AbiGTSrJ (ORCPT + 99 others); Wed, 20 Jul 2022 14:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229626AbiGTSrJ (ORCPT ); Wed, 20 Jul 2022 14:47:09 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D44D72EC9 for ; Wed, 20 Jul 2022 11:47:08 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id r9so31730160lfp.10 for ; Wed, 20 Jul 2022 11:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=JiBy/fr88DgKURawIAAsoW6DnbBMImuTQIFATprFxqQ=; b=b8fFsW+Rgsvep+WiIUol9u6eixPF1+JTKi8smdZu3YBoIfYsXeOyriWz6ExT1NPo1L upSTMWxOQdb3IXlw4AZrFp5SG83LgKd3cyuoD42K2dE0nzxlunh+IZPBi4S/nMw818Tv RaJkl1nX0fzknNB8Ls6J1/lB2r+xJ23MWn5WBvPnd1buh61YttWypxWJ13/r57/LSuGt qmaozmtGb7h4B4XxZD28etqYDRfF8+DGkdHl08EusEcCjrL33+j8dEVQcTijaFuMSW3o ng/Pn4uEjXuBsEm5iShP4G0rnflWhjPv9mK5p8kI1/zPYEetGorx6h2T/BFdcvhoGU1H ZC8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=JiBy/fr88DgKURawIAAsoW6DnbBMImuTQIFATprFxqQ=; b=cwqZqzezMLC0Jk5vQvpdOfNygGoywTc7rMks5Bg1tihzTgJVeUEyTBypgM5OhtZBpL U9NtqcBY+63Y5KcHcQQ4GXAZMmG+e33flrWknZ5vf8L6+uy0vcEJRSTSaA+rVmsROYAZ vsWqx8iYEoxO0kp2fY9ez/tzTUf3+7OQbNwJ7VaKe4JmcPinfVJ01IUga5AJko2XGyup O6rw/EX15qLDMf6MLO29pYOYuNoYSvd40D7FA9f/0wH18h3pV+vHqoNEPqRQ5tV7RSvX 8uvXmzK78JlF3CQfEl+2aDjcf6eDv0nqJCCBHNrlKv5tLVF/7c+xk35k6P9Er0T2iKi7 ctkg== X-Gm-Message-State: AJIora9lA5F6Cgs5Giv+D8/YsHEvLKdTQSTtjL0rLXGrIOAKFEV9MH6l w1rJ/VzNLyan6KEqt/KWqH/08bYGWACmbVV0RoP5VfYgZaQ= X-Received: by 2002:a05:6512:a90:b0:488:943b:cb05 with SMTP id m16-20020a0565120a9000b00488943bcb05mr20914325lfu.56.1658342826021; Wed, 20 Jul 2022 11:47:06 -0700 (PDT) MIME-Version: 1.0 From: Jan Kasiak Date: Wed, 20 Jul 2022 14:46:54 -0400 Message-ID: Subject: NLM 4 Infinite Loop Bug To: linux-nfs@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi all, I'm writing my own NFS client, and while trying to test it, I've come across a way to get the lockd thread into an infinite loop and stop accepting any new requests. Kernel Version: Linux ubuntu-jammy 5.15.0-41-generic The client is a python program, and it does not run rpcbind, NLM, etc... I issue an NM_LOCK (procedure 22) request with block set to false, and get a GRANTED reply. I then issue a FREE_ALL (procedure 23) request, and the lockd thread gets stuck in nlm_traverse_locks - it matches the host, calls nlm_unlock_files, and then jumps to the again label, and repeats this loop forever. It's not clear to me who is supposed to unset the host from the lock? Any pointers as to why there is a jump to again? Thanks, -Jan