RHEL8: xfs_buf deadlock between inode deletion and block allocation

Solution Verified - Updated -

Issue

  • The task is blocked with below logs:
[6553607.856923] INFO: task irisdb:1499256 blocked for more than 120 seconds.
[6553607.856958]       Tainted: G           OE    --------- -  - 4.18.0-372.9.1.el8.x86_64 #1
[6553607.856980] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[6553607.857001] task:irisdb          state:D stack:    0 pid:1499256 ppid:     1 flags:0x10004080
[6553607.857004] Call Trace:
[6553607.857007]  __schedule+0x2d1/0x830
[6553607.857016]  schedule+0x35/0xa0
[6553607.857018]  schedule_timeout+0x274/0x300
[6553607.857023]  ? dma_map_sg_attrs+0x30/0x50
[6553607.857027]  ? scsi_dma_map+0x35/0x40
[6553607.857033]  __down+0x9a/0xf0
[6553607.857037]  ? sd_init_command+0x1e9/0xc80 [sd_mod]
[6553607.857042]  ? xfs_buf_find.isra.29+0x3c8/0x5f0 [xfs]
[6553607.857104]  down+0x3b/0x50
[6553607.857108]  xfs_buf_lock+0x33/0xf0 [xfs]
[6553607.857147]  xfs_buf_find.isra.29+0x3c8/0x5f0 [xfs]
[6553607.857189]  xfs_buf_get_map+0x4c/0x320 [xfs]
[6553607.857230]  xfs_buf_read_map+0x53/0x310 [xfs]
[6553607.857267]  ? xfs_read_agf+0x8e/0x120 [xfs]
[6553607.857295]  xfs_trans_read_buf_map+0x1cb/0x360 [xfs]
[6553607.857343]  ? xfs_read_agf+0x8e/0x120 [xfs]
[6553607.857371]  xfs_read_agf+0x8e/0x120 [xfs]
[6553607.857399]  xfs_alloc_read_agf+0x3e/0x1e0 [xfs]
[6553607.857427]  xfs_alloc_fix_freelist+0x234/0x480 [xfs]
[6553607.857455]  ? up+0x12/0x50
[6553607.857457]  ? xfs_buf_rele+0x57/0x370 [xfs]
[6553607.857494]  xfs_free_extent_fix_freelist+0x64/0xb0 [xfs]
[6553607.857523]  __xfs_free_extent+0x58/0x170 [xfs]
[6553607.857583]  ? xfs_defer_finish_noroll+0xb1/0x5d0 [xfs]
[6553607.857614]  xfs_trans_free_extent+0x46/0x110 [xfs]
[6553607.857694]  xfs_extent_free_finish_item+0x23/0x40 [xfs]
[6553607.857734]  xfs_defer_finish_noroll+0x1f6/0x5d0 [xfs]
[6553607.857768]  xfs_defer_finish+0x13/0x70 [xfs]
[6553607.857800]  xfs_itruncate_extents_flags+0xc6/0x240 [xfs]
[6553607.857841]  xfs_inactive_truncate+0xa3/0xf0 [xfs]
[6553607.857880]  xfs_inactive+0x15a/0x170 [xfs]
[6553607.857918]  xfs_fs_destroy_inode+0xa8/0x1c0 [xfs]
[6553607.857958]  do_unlinkat+0x250/0x2e0
[6553607.857965]  do_syscall_64+0x5b/0x1a0
[6553607.857970]  entry_SYSCALL_64_after_hwframe+0x65/0xca
[6553607.857973] RIP: 0033:0x7fab3945e60b
[6553607.857978] Code: Unable to access opcode bytes at RIP 0x7fab3945e5e1.
[6553607.857979] RSP: 002b:00007ffeb1429a58 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
[6553607.857981] RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00007fab3945e60b
[6553607.857982] RDX: 00007ffeb1429a95 RSI: 00007ffeb1428e8a RDI: 00007ffeb1429a60
[6553607.857983] RBP: 00007fab3b0c2690 R08: 00007ffeb1428e14 R09: 0000000000000000
[6553607.857985] R10: ff00ff00ff00ff00 R11: 0000000000000246 R12: 0000000000000034
[6553607.857986] R13: 0000000000000068 R14: ffffffffffffffff R15: 0000000000000003

Environment

  • Red Hat Enterprise Linux (RHEL) 8
  • Minor releases 8.5 and 8.6 as assumed to be affected
  • xfs filesystem

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content