Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [ 3934.858064] ======================================================
- [ 3934.858076] WARNING: possible circular locking dependency detected
- [ 3934.858088] 5.0.0-btrfs-next-46 #1 Not tainted
- [ 3934.858096] ------------------------------------------------------
- [ 3934.858110] fsstress/30964 is trying to acquire lock:
- [ 3934.858120] 0000000033cd48fb ((wq_completion)"dio/%s"sb->s_id){+.+.}, at: flush_workqueue+0x84/0x550
- [ 3934.858140]
- but task is already holding lock:
- [ 3934.858151] 00000000ac5e6832 (&ei->dio_sem){++++}, at: btrfs_direct_IO+0x391/0x420 [btrfs]
- [ 3934.858185]
- which lock already depends on the new lock.
- [ 3934.858200]
- the existing dependency chain (in reverse order) is:
- [ 3934.858213]
- -> #3 (&ei->dio_sem){++++}:
- [ 3934.858238] btrfs_sync_file+0x1c9/0x440 [btrfs]
- [ 3934.858258] btrfs_file_write_iter+0x45b/0x5c0 [btrfs]
- [ 3934.858270] __vfs_write+0x129/0x1c0
- [ 3934.858279] vfs_write+0xc2/0x1b0
- [ 3934.858287] ksys_write+0x55/0xc0
- [ 3934.858295] do_syscall_64+0x60/0x1b0
- [ 3934.858305] entry_SYSCALL_64_after_hwframe+0x49/0xbe
- [ 3934.858315]
- -> #2 (&sb->s_type->i_mutex_key#14){+.+.}:
- [ 3934.858339] btrfs_sync_file+0x1aa/0x440 [btrfs]
- [ 3934.858350] dio_complete+0x231/0x270
- [ 3934.858359] process_one_work+0x21e/0x5c0
- [ 3934.858369] worker_thread+0x4f/0x3b0
- [ 3934.858377] kthread+0x103/0x140
- [ 3934.858386] ret_from_fork+0x3a/0x50
- [ 3934.858394]
- -> #1 ((work_completion)(&dio->complete_work)){+.+.}:
- [ 3934.858410] worker_thread+0x4f/0x3b0
- [ 3934.858419] kthread+0x103/0x140
- [ 3934.858432] ret_from_fork+0x3a/0x50
- [ 3934.858441]
- -> #0 ((wq_completion)"dio/%s"sb->s_id){+.+.}:
- [ 3934.858455] flush_workqueue+0xa7/0x550
- [ 3934.858464] drain_workqueue+0xc5/0x190
- [ 3934.858473] destroy_workqueue+0x17/0x230
- [ 3934.858485] sb_init_dio_done_wq+0x50/0x60
- [ 3934.858497] do_blockdev_direct_IO+0xe8f/0x2c90
- [ 3934.858518] btrfs_direct_IO+0x14d/0x420 [btrfs]
- [ 3934.858797] generic_file_direct_write+0xcc/0x160
- [ 3934.859082] btrfs_file_write_iter+0x20b/0x5c0 [btrfs]
- [ 3934.859359] aio_write+0x13c/0x1f0
- [ 3934.859644] io_submit_one+0x496/0x9c0
- [ 3934.859915] __x64_sys_io_submit+0xa4/0x280
- [ 3934.860188] do_syscall_64+0x60/0x1b0
- [ 3934.860453] entry_SYSCALL_64_after_hwframe+0x49/0xbe
- [ 3934.860718]
- other info that might help us debug this:
- [ 3934.861473] Chain exists of:
- (wq_completion)"dio/%s"sb->s_id --> &sb->s_type->i_mutex_key#14 --> &ei->dio_sem
- [ 3934.862214] Possible unsafe locking scenario:
- [ 3934.862716] CPU0 CPU1
- [ 3934.862963] ---- ----
- [ 3934.863204] lock(&ei->dio_sem);
- [ 3934.863450] lock(&sb->s_type->i_mutex_key#14);
- [ 3934.863710] lock(&ei->dio_sem);
- [ 3934.863953] lock((wq_completion)"dio/%s"sb->s_id);
- [ 3934.864197]
- *** DEADLOCK ***
- [ 3934.864909] 1 lock held by fsstress/30964:
- [ 3934.865150] #0: 00000000ac5e6832 (&ei->dio_sem){++++}, at: btrfs_direct_IO+0x391/0x420 [btrfs]
- [ 3934.865420]
- stack backtrace:
- [ 3934.865938] CPU: 2 PID: 30964 Comm: fsstress Not tainted 5.0.0-btrfs-next-46 #1
- [ 3934.866196] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.11.2-0-gf9626ccb91-prebuilt.qemu-project.org 04/01/2014
- [ 3934.866738] Call Trace:
- [ 3934.867013] dump_stack+0x7d/0xbb
- [ 3934.867287] print_circular_bug.isra.35+0x1d7/0x1e4
- [ 3934.867573] __lock_acquire+0x11f9/0x1400
- [ 3934.867853] ? flush_workqueue+0x84/0x550
- [ 3934.868133] ? lock_acquire+0xa6/0x190
- [ 3934.868405] lock_acquire+0xa6/0x190
- [ 3934.868684] ? flush_workqueue+0x84/0x550
- [ 3934.868964] flush_workqueue+0xa7/0x550
- [ 3934.869239] ? flush_workqueue+0x84/0x550
- [ 3934.869513] ? drain_workqueue+0xc5/0x190
- [ 3934.869781] drain_workqueue+0xc5/0x190
- [ 3934.870052] destroy_workqueue+0x17/0x230
- [ 3934.870324] sb_init_dio_done_wq+0x50/0x60
- [ 3934.870596] do_blockdev_direct_IO+0xe8f/0x2c90
- [ 3934.870869] ? __lock_acquire+0x33b/0x1400
- [ 3934.871140] ? _raw_spin_unlock+0x24/0x30
- [ 3934.871423] ? btrfs_endio_direct_read+0xb0/0xb0 [btrfs]
- [ 3934.871709] ? btrfs_swap_activate+0x620/0x620 [btrfs]
- [ 3934.871980] ? __lock_acquire+0x33b/0x1400
- [ 3934.872261] ? btrfs_direct_IO+0x14d/0x420 [btrfs]
- [ 3934.872542] btrfs_direct_IO+0x14d/0x420 [btrfs]
- [ 3934.872825] ? btrfs_endio_direct_read+0xb0/0xb0 [btrfs]
- [ 3934.873101] generic_file_direct_write+0xcc/0x160
- [ 3934.873375] ? current_time+0x47/0x80
- [ 3934.873657] btrfs_file_write_iter+0x20b/0x5c0 [btrfs]
- [ 3934.873946] aio_write+0x13c/0x1f0
- [ 3934.874222] ? io_submit_one+0x96/0x9c0
- [ 3934.874492] ? lock_acquire+0xa6/0x190
- [ 3934.874755] ? __might_fault+0x3e/0x90
- [ 3934.875015] ? __might_fault+0x3e/0x90
- [ 3934.875273] ? io_submit_one+0x496/0x9c0
- [ 3934.875539] io_submit_one+0x496/0x9c0
- [ 3934.875813] ? __x64_sys_io_submit+0xa4/0x280
- [ 3934.876077] __x64_sys_io_submit+0xa4/0x280
- [ 3934.876338] ? do_syscall_64+0x60/0x1b0
- [ 3934.876598] ? __ia32_compat_sys_io_submit+0x260/0x260
- [ 3934.876859] do_syscall_64+0x60/0x1b0
- [ 3934.877119] entry_SYSCALL_64_after_hwframe+0x49/0xbe
- [ 3934.877384] RIP: 0033:0x7faaea038717
- [ 3934.877650] Code: 00 75 08 8b 47 0c 39 47 08 74 08 e9 c3 ff ff ff 0f 1f 00 31 c0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 b8 d1 00 00 00 0f 05 <c3> 0f 1f 84 00 00 00 00 00 b8 d2 00 00 00 0f 05 c3 0f 1f 84 00 00
- [ 3934.878219] RSP: 002b:00007ffc454e3c28 EFLAGS: 00000206 ORIG_RAX: 00000000000000d1
- [ 3934.878503] RAX: ffffffffffffffda RBX: 00007ffc454e3c90 RCX: 00007faaea038717
- [ 3934.878792] RDX: 00007ffc454e3c48 RSI: 0000000000000001 RDI: 00007faaea879000
- [ 3934.879089] RBP: 0000000000000001 R08: 0000000000000003 R09: 0000000000002040
- [ 3934.879366] R10: 000000000000000f R11: 0000000000000206 R12: 000000000000000a
- [ 3934.879636] R13: 0000000000000003 R14: 00000000002e4000 R15: 0000000000001000
RAW Paste Data