From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: "yangx.jy@fujitsu.com" <yangx.jy@fujitsu.com>,
Sagi Grimberg <sagi@grimberg.me>, Yi Zhang <yi.zhang@redhat.com>,
RDMA mailing list <linux-rdma@vger.kernel.org>,
"open list:NVM EXPRESS DRIVER" <linux-nvme@lists.infradead.org>,
"bvanassche@acm.org" <bvanassche@acm.org>,
Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [bug report] WARNING: possible circular locking at: rdma_destroy_id+0x17/0x20 [rdma_cm] triggered by blktests nvmeof-mp/002
Date: Fri, 26 Aug 2022 19:32:22 +0800 [thread overview]
Message-ID: <a3287258-e2c4-04d0-c3d7-33dbeb81cb61@linux.dev> (raw)
In-Reply-To: <8bb6c1f4-d5c3-4eb6-0118-143b35f6e881@fujitsu.com>
On 8/26/22 6:03 PM, yangx.jy@fujitsu.com wrote:
> On 2022/8/25 14:26, Guoqing Jiang wrote:
>>
>> On 8/25/22 1:59 PM, yangx.jy@fujitsu.com wrote:
>>> On 2022/5/25 19:01, Sagi Grimberg wrote:
>>>> iirc this was reported before, based on my analysis lockdep is giving
>>>> a false alarm here. The reason is that the id_priv->handler_mutex cannot
>>>> be the same for both cm_id that is handling the connect and the cm_id
>>>> that is handling the rdma_destroy_id because rdma_destroy_id call
>>>> is always called on a already disconnected cm_id, so this deadlock
>>>> lockdep is complaining about cannot happen.
>>> Hi Jason, Bart and Sagi,
>>>
>>> I also think it is actually a false positive. The cm_id handling the
>>> connection and the cm_id calling rdma_destroy_id() cannot be the same
>>> one, right?
>> I am wondering if it is the same as the thread.
>>
>> https://lore.kernel.org/linux-rdma/CAMGffEm22sP-oKK0D9=vOw77nbS05iwG7MC3DTVB0CyzVFhtXg@mail.gmail.com/
> Hi Guoqing,
>
> Thanks for your feedback.
>
> I think they are the same deadlock issue (i.e. AB vs BCA). The only
> difference is that two combinations of locks caused the same issue.
>
> It seems that one id_priv->handler_mutex is locked on the new-created
> cm_id and the other id_priv->handler_mutex is locked on the disconnected
> cm_id.
>
>>>> I'm not sure how to settle this.
>>> Do you have any suggestion to remove the false positive by refactoring
>>> the related RDMA/CM code. Sorry, I didn't know how to do it for now.
>> The simplest way is to call lockdep_off in case it is false alarm to
>> avoid the
>> debugging effort, but not everyone likes the idea.
>>
>> https://elixir.bootlin.com/linux/v6.0-rc2/C/ident/lockdep_off
> To be honest, I don't like the fix way as well. I wonder if we can avoid
> the false positive by changing the related RDMA/CM code.
I would consider it is a workaround before CM code is changed (and it needs
more effort I guess hopefully I am wrong), otherwise different people would
post the similar issue to list again.
Thanks,
Guoqing
prev parent reply other threads:[~2022-08-26 11:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 3:04 [bug report] WARNING: possible circular locking at: rdma_destroy_id+0x17/0x20 [rdma_cm] triggered by blktests nvmeof-mp/002 Yi Zhang
2022-02-27 23:21 ` Bart Van Assche
2022-05-25 3:40 ` yangx.jy
2022-05-25 11:01 ` Sagi Grimberg
2022-05-25 18:50 ` Bart Van Assche
2022-05-27 12:52 ` Jason Gunthorpe
2022-05-28 19:00 ` Bart Van Assche
2022-05-31 12:35 ` Jason Gunthorpe
2022-05-31 17:55 ` Bart Van Assche
2022-06-01 12:45 ` Jason Gunthorpe
2022-06-01 16:26 ` Bart Van Assche
2022-06-01 17:30 ` Jason Gunthorpe
2022-06-03 5:13 ` Bart Van Assche
2022-06-06 16:21 ` Jason Gunthorpe
2022-08-23 7:29 ` yangx.jy
2022-08-25 5:59 ` yangx.jy
2022-08-25 6:26 ` Guoqing Jiang
2022-08-26 10:03 ` yangx.jy
2022-08-26 11:32 ` Guoqing Jiang [this message]
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=a3287258-e2c4-04d0-c3d7-33dbeb81cb61@linux.dev \
--to=guoqing.jiang@linux.dev \
--cc=bvanassche@acm.org \
--cc=jgg@ziepe.ca \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sagi@grimberg.me \
--cc=yangx.jy@fujitsu.com \
--cc=yi.zhang@redhat.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