From: bugzilla-daemon@kernel.org
To: linux-ext4@vger.kernel.org
Subject: [Bug 219283] kernel regression with ext4 and ea_inode mount flags and exercising xattrs (between Linux 6.8 and 6.11)
Date: Wed, 18 Sep 2024 16:08:33 +0000 [thread overview]
Message-ID: <bug-219283-13602-DlXoU1fag7@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-219283-13602@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=219283
--- Comment #11 from Jan Kara (jack@suse.cz) ---
I think I see the problem and AFAICT commit 0a46ef234756dca is just making the
latent deadlock easier to hit. The problem is shown by these two stacktraces
from your dmesg:
Task 1
[ 247.045575] __wait_on_freeing_inode+0xba/0x140
[ 247.045584] find_inode_fast+0xa4/0xe0
[ 247.045588] iget_locked+0x71/0x200
[ 247.045597] __ext4_iget+0x148/0x1080
[ 247.045615] ext4_xattr_inode_cache_find+0xe2/0x220
[ 247.045621] ext4_xattr_inode_lookup_create+0x122/0x240
[ 247.045626] ext4_xattr_block_set+0xc2/0xeb0
[ 247.045633] ext4_xattr_set_handle+0x4ba/0x650
[ 247.045641] ext4_xattr_set+0x80/0x160
Task 2
[ 247.043719] mb_cache_entry_wait_unused+0x9a/0xd0
[ 247.043729] ext4_evict_ea_inode+0x64/0xb0
[ 247.043733] ext4_evict_inode+0x35c/0x6d0
[ 247.043739] evict+0x108/0x2c0
[ 247.043745] iput+0x14a/0x260
[ 247.043749] ext4_xattr_ibody_set+0x175/0x1d0
[ 247.043754] ext4_xattr_set_handle+0x297/0x650
[ 247.043762] ext4_xattr_set+0x80/0x160
These two tasks are deadlocked against each other. One has dropped the last
reference to xattr inode and is trying to remove it from memory and waits for
corresponding mbcache entry to get unused while another task is holding the
mbcache entry reference and is waiting for inode to be evicted from memory.
Commit 0a46ef234756dca removed synchronization on buffer lock for one of the
hot paths and thus hitting this race is now much more likely.
I just have to make up my mind how to best fix this ABBA deadlock.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
prev parent reply other threads:[~2024-09-18 16:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 13:30 [Bug 219283] New: kernel regression with ext4 and ea_inode mount flags and exercising xattrs (between Linux 6.8 and 6.11) bugzilla-daemon
2024-09-16 13:31 ` [Bug 219283] " bugzilla-daemon
2024-09-16 15:35 ` bugzilla-daemon
2024-09-16 17:03 ` bugzilla-daemon
2024-09-16 17:13 ` bugzilla-daemon
2024-09-16 17:51 ` bugzilla-daemon
2024-09-16 18:09 ` bugzilla-daemon
2024-09-17 18:13 ` bugzilla-daemon
2024-09-17 20:18 ` bugzilla-daemon
2024-09-18 13:43 ` bugzilla-daemon
2024-09-18 13:43 ` bugzilla-daemon
2024-09-18 15:35 ` bugzilla-daemon
2024-09-18 16:08 ` bugzilla-daemon [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=bug-219283-13602-DlXoU1fag7@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-ext4@vger.kernel.org \
/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