From: Ming Lei <ming.lei@redhat.com>
To: Chris Bainbridge <chris.bainbridge@gmail.com>
Cc: "Lai, Yi" <yi1.lai@linux.intel.com>, Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Peter Zijlstra <peterz@infradead.org>,
Waiman Long <longman@redhat.com>,
Boqun Feng <boqun.feng@gmail.com>, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will@kernel.org>,
linux-kernel@vger.kernel.org,
Bart Van Assche <bvanassche@acm.org>,
yi1.lai@intel.com, syzkaller-bugs@googlegroups.com
Subject: Re: [PATCH V2 3/3] block: model freeze & enter queue as lock for supporting lockdep
Date: Mon, 13 Jan 2025 23:11:56 +0800 [thread overview]
Message-ID: <Z4UtPNtdgVrA9ztl@fedora> (raw)
In-Reply-To: <Z4Ulmv7e0-Q4wMGq@debian.local>
On Mon, Jan 13, 2025 at 02:39:22PM +0000, Chris Bainbridge wrote:
> Hi,
>
> With latest mainline 6.13-rc6, I have been getting intermittent lock
> warnings when using a btrfs filesystem. The warnings bisect to this
> commit:
>
> f1be1788a32e8fa63416ad4518bbd1a85a825c9d is the first bad commit
> commit f1be1788a32e8fa63416ad4518bbd1a85a825c9d
> Author: Ming Lei <ming.lei@redhat.com>
> Date: Fri Oct 25 08:37:20 2024 +0800
>
> block: model freeze & enter queue as lock for supporting lockdep
>
>
> On my system, these lockdep warnings are reproducible just by doing some
> large fs operation, like copying the whole linux kernel git repo to the
> btrfs filesystem.
>
> The lockdep warning is:
>
> [ 437.745808] ======================================================
> [ 437.745810] WARNING: possible circular locking dependency detected
> [ 437.745811] 6.13.0-rc6-00037-gac70f027bab6 #112 Not tainted
> [ 437.745813] ------------------------------------------------------
> [ 437.745814] kswapd0/141 is trying to acquire lock:
> [ 437.745815] ffff925c11095e90 (&delayed_node->mutex){+.+.}-{4:4}, at: __btrfs_release_delayed_node.part.0+0x3f/0x280 [btrfs]
> [ 437.745862]
> but task is already holding lock:
> [ 437.745863] ffffffffb9cc8c80 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x578/0xa80
> [ 437.745869]
> which lock already depends on the new lock.
>
> [ 437.745870]
> the existing dependency chain (in reverse order) is:
> [ 437.745871]
> -> #3 (fs_reclaim){+.+.}-{0:0}:
> [ 437.745873] fs_reclaim_acquire+0xbd/0xf0
> [ 437.745877] __kmalloc_node_noprof+0xa1/0x4f0
> [ 437.745880] __kvmalloc_node_noprof+0x24/0x100
> [ 437.745881] sbitmap_init_node+0x98/0x240
> [ 437.745885] scsi_realloc_sdev_budget_map+0xdd/0x1d0
> [ 437.745889] scsi_add_lun+0x458/0x760
> [ 437.745891] scsi_probe_and_add_lun+0x15e/0x480
> [ 437.745892] __scsi_scan_target+0xfb/0x230
> [ 437.745893] scsi_scan_channel+0x65/0xc0
> [ 437.745894] scsi_scan_host_selected+0xfb/0x160
> [ 437.745896] do_scsi_scan_host+0x9d/0xb0
> [ 437.745897] do_scan_async+0x1c/0x1a0
> [ 437.745898] async_run_entry_fn+0x2d/0x120
> [ 437.745901] process_one_work+0x210/0x730
> [ 437.745903] worker_thread+0x193/0x350
> [ 437.745905] kthread+0xf3/0x120
> [ 437.745906] ret_from_fork+0x40/0x70
> [ 437.745910] ret_from_fork_asm+0x11/0x20
> [ 437.745912]
> -> #2 (&q->q_usage_counter(io)#10){++++}-{0:0}:
Hello,
This one has been solved in for-6.14/block:
https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/log/?h=for-6.14/block
Thanks,
Ming
next prev parent reply other threads:[~2025-01-13 15:12 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-25 0:37 [PATCH V2 0/3] block: model freeze/enter queue as lock for lockdep Ming Lei
2024-10-25 0:37 ` [PATCH V2 1/3] blk-mq: add non_owner variant of start_freeze/unfreeze queue APIs Ming Lei
2024-10-25 0:37 ` [PATCH V2 2/3] nvme: core: switch to non_owner variant of start_freeze/unfreeze queue Ming Lei
2024-10-25 0:37 ` [PATCH V2 3/3] block: model freeze & enter queue as lock for supporting lockdep Ming Lei
2024-10-29 11:13 ` Marek Szyprowski
2024-10-29 15:58 ` Ming Lei
2024-10-29 16:59 ` Marek Szyprowski
2024-11-12 8:36 ` Marek Szyprowski
2024-11-12 10:15 ` Ming Lei
2024-11-12 11:32 ` Marek Szyprowski
2024-11-12 11:48 ` Ming Lei
2024-10-30 6:45 ` Lai, Yi
2024-10-30 7:13 ` Ming Lei
2024-10-30 8:50 ` Lai, Yi
2024-10-30 9:50 ` Ming Lei
2024-10-30 10:39 ` Lai, Yi
2024-10-30 11:08 ` Ming Lei
2024-12-04 3:21 ` Lai, Yi
2024-12-04 3:30 ` Ming Lei
2025-01-13 14:39 ` Chris Bainbridge
2025-01-13 15:11 ` Ming Lei [this message]
2025-01-13 15:33 ` Chris Bainbridge
2025-01-13 15:52 ` Jens Axboe
2025-01-13 15:23 ` Chris Bainbridge
2024-10-26 13:15 ` [PATCH V2 0/3] block: model freeze/enter queue as lock for lockdep Jens Axboe
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=Z4UtPNtdgVrA9ztl@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=boqun.feng@gmail.com \
--cc=bvanassche@acm.org \
--cc=chris.bainbridge@gmail.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=syzkaller-bugs@googlegroups.com \
--cc=will@kernel.org \
--cc=yi1.lai@intel.com \
--cc=yi1.lai@linux.intel.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;
as well as URLs for NNTP newsgroup(s).