Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp925943rwe; Wed, 31 Aug 2022 13:40:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XGUoAmnnEC70IJVYIEhAsTCX49IQXv/EnScfd0Y30FyyJsLBEfMEsM3QL+bKySKlMGh+f X-Received: by 2002:a17:903:228c:b0:16e:df74:34e5 with SMTP id b12-20020a170903228c00b0016edf7434e5mr27238288plh.49.1661978416856; Wed, 31 Aug 2022 13:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661978416; cv=none; d=google.com; s=arc-20160816; b=fROZDAaCrv+mxUDZiFnC92/gXrxJDPn7H7HGHcLMHGdjH7i4X1CsZn4+WBs0QRZzOI ZZEAMTSUAxhWCb4LvRSvSdkm7xlIfXC6yNvEk2WJfxUeWSmRGE2KFCL+MevNVAlK071i Xss89F/o1e1hybFndH+7JM6jdgyQNL17kz9KTdS/etm8J45bTQR7de14TxaVwX+kx9sm 4H4drU8JUok0xN57dr0EqpuTyQglg89jiymjKJjBVhmzLo12CqOdR8JaqQArEy5+D/g9 kwa/tzuJ1U3QsfeuPPoCVdNM/2F+gJaHC8ga0CIIjh74ZcPpxUgT2j41sd9y7lm9Yxat vnUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=vNbUZw9ZAyuBRA0HADclM+IyPC7OPrvHhvFWLFi8hs8=; b=QpDdhRE3PriMY3HIeGVwf2PrC/N6Yd+V2Mur+rYiS5bslZ60ubprq4OerygaNZPnRs Jksl3niXB+tHzX81mC4hbA32WulzkS+Fg6jYwlo3C8SbpRptRhhnlMUNv2j3UdA6WZG5 ugqiSXSdmtskDQ95MUqDDYgE4gvgOeXgA58AJQrnklQMMm2vcVWmaXXvDB0t5VeG0BQg tWkYQwdNrOCdN2cb3eLgAAfCrajL4LmjUJZgNvYAuZBH4PrwPltNstRsQpYQOg58rUMX K6rmmh6G+h2DdmQmgJxv0RHmrxs+0rgTT3tbSpMIDFe+o6IzJsJrm+XadUhSnjms54Ic ++wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=H1V6AmAR; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a17090a1d0a00b001fdfeac4cdesi5591616pjd.0.2022.08.31.13.39.52; Wed, 31 Aug 2022 13:40:16 -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=@redhat.com header.s=mimecast20190719 header.b=H1V6AmAR; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230490AbiHaUVC (ORCPT + 99 others); Wed, 31 Aug 2022 16:21:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229746AbiHaUVB (ORCPT ); Wed, 31 Aug 2022 16:21:01 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4301D34CF for ; Wed, 31 Aug 2022 13:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1661977260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=vNbUZw9ZAyuBRA0HADclM+IyPC7OPrvHhvFWLFi8hs8=; b=H1V6AmARTch72lw7AroOcF+KSCR8mLJD9S5WJWWT+fDC+A8RVGxhHb5GqXWdFGbh+vrAPI l1SOQBy1oqMhfNT2U4VGYMLFzQ85wArRTndGjnmAKznqyXBkt8IUAGnBDCliSy6GYuNrSV goJF0Q6qtJHGbMf+W87htItWEyYcjqk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-531-yBdNikoGNnmuMCrdv0mglQ-1; Wed, 31 Aug 2022 16:20:58 -0400 X-MC-Unique: yBdNikoGNnmuMCrdv0mglQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4F1B101A54E; Wed, 31 Aug 2022 20:20:57 +0000 (UTC) Received: from [172.16.176.1] (unknown [10.22.48.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43BBB40C141D; Wed, 31 Aug 2022 20:20:57 +0000 (UTC) From: "Benjamin Coddington" To: "Trond Myklebust" Cc: "Linux NFS Mailing List" Subject: client call_decode WARN_ON memcmp race since 72691a269f0b Date: Wed, 31 Aug 2022 16:20:55 -0400 Message-ID: <6806AB48-F7D6-4639-8D03-E31BA25C4CF3@redhat.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Hey Trond, Since "72691a269f0b SUNRPC: Don't reuse bvec on retransmission of the request" I can sometimes pop the WARN_ON() in call_decode(), usually on generic/642. I think there's a kworker halfway through xprt_complete_rqst() -> xprt_request_dequeue_receive_locked() between these two linse: xdr_free_bvec(&req->rq_rcv_buf); req->rq_private_buf.bvec = NULL; And at the same time the task is doing the WARN_ON(memcmp()) in call_decode. I'm not sure of a good fix - perhaps we can fixup the other paths that require the NULL check in xdr_alloc_bvec() so we don't have to set bvec = NULL. Any thoughts? Ben