btrfs/058 deadlock with lseek
Subsystems (2)
Hi guys,
Just got a reproducible error in btrfs/058.
The backtrace is completely in VFS territory, not btrfs related lock at all:
BTRFS info (device dm-5): checking UUID tree
sysrq: Show Blocked State
task PC stack pid father
rm D 0 560678 560445 0x00000000
Call Trace: __schedule+0x5c7/0xea0 ? __sched_text_start+0x8/0x8 ? lock_downgrade+0x380/0x380 ? lock_contended+0x730/0x730 ? debug_check_no_locks_held+0x60/0x60 schedule+0x7b/0x170 schedule_preempt_disabled+0x18/0x30 __mutex_lock+0x481/0xc70 ? __fdget_pos+0x7e/0x80 ? mutex_trylock+0x190/0x190 ? debug_lockdep_rcu_enabled+0x26/0x40 ? kmem_cache_free+0x157/0x3b0 ? putname+0x73/0x80 ? __ia32_sys_rmdir+0x30/0x30 ? __check_object_size+0x134/0x1e6 mutex_lock_nested+0x1b/0x20 ? mutex_lock_nested+0x1b/0x20 __fdget_pos+0x7e/0x80 ksys_lseek+0x1d/0xf0 __x64_sys_lseek+0x43/0x50 do_syscall_64+0x79/0xe0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f7518e5652b Code: Bad RIP value. RSP: 002b:00007ffead7508e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7518e5652b RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f7518f267e0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000002 R14: 00007f7518f2be68 R15: 00007f7518f287e0
Is this a known bug in VFS layer?
Thanks,
Qu
Quoted 4 lines · Qu Wenruo
Hi guys,
Just got a reproducible error in btrfs/058.
The backtrace is completely in VFS territory, not btrfs related lock at all:
With the help of Nikolay and Johannes, the offending commit is pinned down to 0be0ee71816b ("vfs: properly and reliably lock f_pos in fdget_pos()"), and Linus will soon revert it.
Not a big deal, but testers would have a much easier life using David's misc-5.5 (still based on v5.4-rc).
And to David, would you please keep your misc-5.5 branch until the offending patch get reverted?
Thanks,
Qu
Quoted 41 lines
BTRFS info (device dm-5): checking UUID tree
sysrq: Show Blocked State
task PC stack pid father
rm D 0 560678 5604450x00000000Call Trace: __schedule+0x5c7/0xea0 ? __sched_text_start+0x8/0x8 ? lock_downgrade+0x380/0x380 ? lock_contended+0x730/0x730 ? debug_check_no_locks_held+0x60/0x60 schedule+0x7b/0x170 schedule_preempt_disabled+0x18/0x30 __mutex_lock+0x481/0xc70 ? __fdget_pos+0x7e/0x80 ? mutex_trylock+0x190/0x190 ? debug_lockdep_rcu_enabled+0x26/0x40 ? kmem_cache_free+0x157/0x3b0 ? putname+0x73/0x80 ? __ia32_sys_rmdir+0x30/0x30 ? __check_object_size+0x134/0x1e6 mutex_lock_nested+0x1b/0x20 ? mutex_lock_nested+0x1b/0x20 __fdget_pos+0x7e/0x80 ksys_lseek+0x1d/0xf0 __x64_sys_lseek+0x43/0x50 do_syscall_64+0x79/0xe0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f7518e5652b Code: Bad RIP value. RSP: 002b:00007ffead7508e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000008 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7518e5652b RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f7518f267e0 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000002 R14: 00007f7518f2be68 R15: 00007f7518f287e0Is this a known bug in VFS layer?
Thanks,
Qu
Quoted 8 lines · Qu Wenruo
Quoted 2 lines · Qu Wenruo
Just got a reproducible error in btrfs/058.
The backtrace is completely in VFS territory, not btrfs related lock at all:With the help of Nikolay and Johannes, the offending commit is pinned down to
0be0ee71816b("vfs: properly and reliably lockf_posinfdget_pos()"), and Linus will soon revert it.
Quoted 5 lines
Not a big deal, but testers would have a much easier life using David's misc-5.5 (still based on v5.4-rc).
And to David, would you please keep your misc-5.5 branch until the offending patch get reverted?
misc-5.5 will not rebase, it's the branch that gets pulled to master. I won't rebase misc-next until rc1 at least and will rebase only after I see that tests pass. During merge window lots of things are in flux so breakage is expected so we need a development base for testing.