From: Bob Pearson <rpearsonhpe@gmail.com>
To: Leon Romanovsky <leon@kernel.org>,
Jason Gunthorpe <jgg@nvidia.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: Bad behavior by rdma-core ?
Date: Thu, 14 Oct 2021 11:14:57 -0500 [thread overview]
Message-ID: <3bda5d0b-dc04-7640-b832-867858ef7a12@gmail.com> (raw)
In-Reply-To: <414e99de-9b1b-edcc-4547-f8002adecd69@gmail.com>
On 10/14/21 9:57 AM, Bob Pearson wrote:
> I have been chasing a bug in the rxe driver seen in the python tests (test_cq_events_ud).
> The following occurs
>
> The first time I execute this test it creates two AHs which are allocated by
> rdma-core and passed to rxe_create_ah. The test attempts to destroy them
> (i.e. rxe_destroy_ah is called in the provider driver) but rdma-core does not
> destroy them (i.e. rxe_destroy_ah is not called in the kernel).
>
> The rxe driver saves the AV state and some metadata for these AHs and keeps it
> since it thinks they are still active.
>
> The second or third time I execute this test two new AHs are created by
> rxe_create_ah but the memory passed in from rdma-core is the same as the first
> test. I.e. it has recycled them but they are still active in the driver so
> the result is chaos.
>
> Somehow rdma-core thinks it has destroyed the AHs but it does not call down to the
> driver. This only occurs for AHs AFAIK.
>
> Bob
>
The cause seems simple enough.
In uverbs_cmd.c ib_uverbs_create_ah() calls rdma_create_user_ah() which
eventually calls device->ops.create_user_ah() or device->ops.create_ah().
But ib_uverbs_destroy_ah does *not* call rdma_uverbs_destroy_ah() it just
deletes the object.
next prev parent reply other threads:[~2021-10-14 16:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 14:57 Bad behavior by rdma-core ? Bob Pearson
2021-10-14 16:14 ` Bob Pearson [this message]
2021-10-14 16:43 ` Bob Pearson
2021-10-14 18:32 ` Jason Gunthorpe
2021-10-14 20:08 ` Bob Pearson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bda5d0b-dc04-7640-b832-867858ef7a12@gmail.com \
--to=rpearsonhpe@gmail.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox