liburing: events_unbound io_ring_exit_work task kworker blocked for more than 120 seconds

Follow up on the issue from #326 - but this is only triggered when SQPOLL is enabled.

This is running with https://git.kernel.dk/cgit/linux-block/commit/?h=poll-multiple&id=283fc84eaeb1031e1f2389e4e365e44cd4398b9c

I have one ring that is only deallocated by process exit, the rest is “properly” closed.

[  633.583870] ------------[ cut here ]------------
[  633.583873] WARNING: CPU: 4 PID: 6485 at fs/io_uring.c:8611 io_ring_exit_work+0xe6/0x500
[  633.583880] Modules linked in: binfmt_misc dm_multipath scsi_dh_rdac scsi_dh_emc scsi_dh_alua isst_if_common crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd cryptd rapl ppdev parport_pc ena parport serio_raw i2c_piix4 sch_fq_codel drm i2c_core ip_tables x_tables autofs4
[  633.583896] CPU: 4 PID: 6485 Comm: kworker/u16:77 Not tainted 5.12.0-rc6-5.13-uring-210407 #1
[  633.583898] Hardware name: Amazon EC2 c5.2xlarge/, BIOS 1.0 10/16/2017
[  633.583899] Workqueue: events_unbound io_ring_exit_work
[  633.583902] RIP: 0010:io_ring_exit_work+0xe6/0x500
[  633.583904] Code: 8b bb f0 fd ff ff e8 99 7d ff ff 4c 8d ab 40 fe ff ff 31 d2 31 f6 4c 89 e7 e8 b6 e9 ff ff 48 8b 05 7f 03 29 01 49 39 c7 79 02 <0f> 0b be 0c 00 00 00 4c 89 ef e8 5b 96 7c 00 48 85 c0 74 d4 4c 8d
[  633.583906] RSP: 0018:ffffb30e01bebdd0 EFLAGS: 00010297
[  633.583908] RAX: 00000001000144f7 RBX: ffff97d63d8095a8 RCX: 0000000000000008
[  633.583909] RDX: 0000000000000001 RSI: ffff97d63d809088 RDI: ffff97d63d8095a0
[  633.583910] RBP: ffffb30e01bebe50 R08: 00000093848a6640 R09: 0000000000000000
[  633.583911] R10: ffffffff9126bfa0 R11: 0000000000000000 R12: ffff97d63d809000
[  633.583912] R13: ffff97d63d8093e8 R14: 0000000000000000 R15: 00000001000144f3
[  633.583913] FS:  0000000000000000(0000) GS:ffff97d90bd00000(0000) knlGS:0000000000000000
[  633.583915] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  633.583916] CR2: 000000c00033d000 CR3: 0000000115010004 CR4: 00000000007706e0
[  633.583919] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  633.583920] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  633.583920] PKRU: 55555554
[  633.583921] Call Trace:
[  633.583925]  ? __switch_to+0x192/0x460
[  633.583930]  ? __switch_to_asm+0x36/0x70
[  633.583934]  process_one_work+0x220/0x3c0
[  633.583938]  worker_thread+0x4d/0x3f0
[  633.583940]  kthread+0x114/0x150
[  633.583943]  ? process_one_work+0x3c0/0x3c0
[  633.583945]  ? kthread_park+0x90/0x90
[  633.583947]  ret_from_fork+0x22/0x30
[  633.583950] ---[ end trace 5225fbee45c60487 ]---
[ 2840.166730] show_signal: 36 callbacks suppressed
[ 2840.166735] traps: swift-nioPackag[143299] trap invalid opcode ip:7f1d15b3c7d2 sp:7ffc59b93ea0 error:0 in libswiftCore.so[7f1d159ea000+525000]
[ 3626.789652] INFO: task kworker/u16:15:5478 blocked for more than 120 seconds.
[ 3626.792583]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.795536] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.798758] task:kworker/u16:15  state:D stack:    0 pid: 5478 ppid:     2 flags:0x00004000
[ 3626.798763] Workqueue: events_unbound io_ring_exit_work
[ 3626.798769] Call Trace:
[ 3626.798772]  __schedule+0x2de/0x890
[ 3626.798777]  ? check_preempt_wakeup+0xfd/0x210
[ 3626.798781]  schedule+0x4f/0xc0
[ 3626.798783]  schedule_timeout+0x202/0x290
[ 3626.798786]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.798789]  wait_for_completion+0x94/0x100
[ 3626.798792]  io_ring_exit_work+0x18c/0x500
[ 3626.798793]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.798798]  process_one_work+0x220/0x3c0
[ 3626.798801]  worker_thread+0x4d/0x3f0
[ 3626.798803]  kthread+0x114/0x150
[ 3626.798805]  ? process_one_work+0x3c0/0x3c0
[ 3626.798807]  ? kthread_park+0x90/0x90
[ 3626.798809]  ret_from_fork+0x22/0x30
[ 3626.798816] INFO: task kworker/u16:29:5506 blocked for more than 120 seconds.
[ 3626.801729]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.804603] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.807777] task:kworker/u16:29  state:D stack:    0 pid: 5506 ppid:     2 flags:0x00004000
[ 3626.807779] Workqueue: events_unbound io_ring_exit_work
[ 3626.807782] Call Trace:
[ 3626.807783]  __schedule+0x2de/0x890
[ 3626.807786]  ? enqueue_entity+0x115/0x660
[ 3626.807789]  schedule+0x4f/0xc0
[ 3626.807791]  schedule_timeout+0x202/0x290
[ 3626.807793]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.807797]  wait_for_completion+0x94/0x100
[ 3626.807799]  io_ring_exit_work+0x18c/0x500
[ 3626.807803]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.807806]  process_one_work+0x220/0x3c0
[ 3626.807808]  worker_thread+0x4d/0x3f0
[ 3626.807811]  kthread+0x114/0x150
[ 3626.807813]  ? process_one_work+0x3c0/0x3c0
[ 3626.807815]  ? kthread_park+0x90/0x90
[ 3626.807817]  ret_from_fork+0x22/0x30
[ 3626.807835] INFO: task kworker/u16:98:138912 blocked for more than 120 seconds.
[ 3626.810838]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.813798] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.816976] task:kworker/u16:98  state:D stack:    0 pid:138912 ppid:     2 flags:0x00004000
[ 3626.816978] Workqueue: events_unbound io_ring_exit_work
[ 3626.816980] Call Trace:
[ 3626.816981]  __schedule+0x2de/0x890
[ 3626.816983]  ? enqueue_entity+0x115/0x660
[ 3626.816986]  schedule+0x4f/0xc0
[ 3626.816987]  schedule_timeout+0x202/0x290
[ 3626.816989]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.816992]  wait_for_completion+0x94/0x100
[ 3626.816994]  io_ring_exit_work+0x18c/0x500
[ 3626.816996]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.816999]  process_one_work+0x220/0x3c0
[ 3626.817000]  worker_thread+0x4d/0x3f0
[ 3626.817002]  kthread+0x114/0x150
[ 3626.817004]  ? process_one_work+0x3c0/0x3c0
[ 3626.817005]  ? kthread_park+0x90/0x90
[ 3626.817007]  ret_from_fork+0x22/0x30
[ 3626.817015] INFO: task kworker/u16:129:227858 blocked for more than 120 seconds.
[ 3626.820039]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.822968] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.826156] task:kworker/u16:129 state:D stack:    0 pid:227858 ppid:     2 flags:0x00004000
[ 3626.826159] Workqueue: events_unbound io_ring_exit_work
[ 3626.826161] Call Trace:
[ 3626.826162]  __schedule+0x2de/0x890
[ 3626.826164]  ? enqueue_entity+0x115/0x660
[ 3626.826168]  schedule+0x4f/0xc0
[ 3626.826170]  schedule_timeout+0x202/0x290
[ 3626.826172]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.826176]  wait_for_completion+0x94/0x100
[ 3626.826179]  io_ring_exit_work+0x18c/0x500
[ 3626.826182]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.826185]  process_one_work+0x220/0x3c0
[ 3626.826187]  worker_thread+0x4d/0x3f0
[ 3626.826189]  kthread+0x114/0x150
[ 3626.826191]  ? process_one_work+0x3c0/0x3c0
[ 3626.826192]  ? kthread_park+0x90/0x90
[ 3626.826194]  ret_from_fork+0x22/0x30
[ 3626.826200] INFO: task kworker/u16:145:240639 blocked for more than 120 seconds.
[ 3626.829201]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.833454] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.839410] task:kworker/u16:145 state:D stack:    0 pid:240639 ppid:     2 flags:0x00004000
[ 3626.839413] Workqueue: events_unbound io_ring_exit_work
[ 3626.839415] Call Trace:
[ 3626.839416]  __schedule+0x2de/0x890
[ 3626.839418]  ? enqueue_entity+0x115/0x660
[ 3626.839420]  schedule+0x4f/0xc0
[ 3626.839422]  schedule_timeout+0x202/0x290
[ 3626.839424]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.839427]  wait_for_completion+0x94/0x100
[ 3626.839429]  io_ring_exit_work+0x18c/0x500
[ 3626.839431]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.839433]  process_one_work+0x220/0x3c0
[ 3626.839435]  worker_thread+0x4d/0x3f0
[ 3626.839436]  kthread+0x114/0x150
[ 3626.839439]  ? process_one_work+0x3c0/0x3c0
[ 3626.839440]  ? kthread_park+0x90/0x90
[ 3626.839442]  ret_from_fork+0x22/0x30
[ 3626.839446] INFO: task kworker/u16:157:262491 blocked for more than 120 seconds.
[ 3626.845169]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.849467] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.855352] task:kworker/u16:157 state:D stack:    0 pid:262491 ppid:     2 flags:0x00004000
[ 3626.855354] Workqueue: events_unbound io_ring_exit_work
[ 3626.855357] Call Trace:
[ 3626.855358]  __schedule+0x2de/0x890
[ 3626.855362]  ? enqueue_entity+0x115/0x660
[ 3626.855365]  schedule+0x4f/0xc0
[ 3626.855367]  schedule_timeout+0x202/0x290
[ 3626.855369]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.855374]  wait_for_completion+0x94/0x100
[ 3626.855376]  io_ring_exit_work+0x18c/0x500
[ 3626.855378]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.855381]  process_one_work+0x220/0x3c0
[ 3626.855384]  worker_thread+0x4d/0x3f0
[ 3626.855386]  kthread+0x114/0x150
[ 3626.855389]  ? process_one_work+0x3c0/0x3c0
[ 3626.855390]  ? kthread_park+0x90/0x90
[ 3626.855392]  ret_from_fork+0x22/0x30
[ 3626.855397] INFO: task kworker/u16:169:274169 blocked for more than 120 seconds.
[ 3626.861101]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.865360] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.871249] task:kworker/u16:169 state:D stack:    0 pid:274169 ppid:     2 flags:0x00004000
[ 3626.871252] Workqueue: events_unbound io_ring_exit_work
[ 3626.871254] Call Trace:
[ 3626.871255]  __schedule+0x2de/0x890
[ 3626.871257]  ? check_preempt_wakeup+0xfd/0x210
[ 3626.871259]  schedule+0x4f/0xc0
[ 3626.871261]  schedule_timeout+0x202/0x290
[ 3626.871263]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.871265]  wait_for_completion+0x94/0x100
[ 3626.871267]  io_ring_exit_work+0x18c/0x500
[ 3626.871269]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.871272]  process_one_work+0x220/0x3c0
[ 3626.871273]  worker_thread+0x4d/0x3f0
[ 3626.871275]  kthread+0x114/0x150
[ 3626.871277]  ? process_one_work+0x3c0/0x3c0
[ 3626.871278]  ? kthread_park+0x90/0x90
[ 3626.871280]  ret_from_fork+0x22/0x30
[ 3626.871283] INFO: task kworker/u16:171:274174 blocked for more than 120 seconds.
[ 3626.877023]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.881287] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.887192] task:kworker/u16:171 state:D stack:    0 pid:274174 ppid:     2 flags:0x00004000
[ 3626.887196] Workqueue: events_unbound io_ring_exit_work
[ 3626.887198] Call Trace:
[ 3626.887199]  __schedule+0x2de/0x890
[ 3626.887201]  ? check_preempt_wakeup+0xfd/0x210
[ 3626.887203]  schedule+0x4f/0xc0
[ 3626.887207]  schedule_timeout+0x202/0x290
[ 3626.887209]  ? ttwu_do_activate+0xb5/0x3f0
[ 3626.887212]  wait_for_completion+0x94/0x100
[ 3626.887216]  io_ring_exit_work+0x18c/0x500
[ 3626.887218]  ? io_uring_del_task_file+0xc0/0xc0
[ 3626.887221]  process_one_work+0x220/0x3c0
[ 3626.887222]  worker_thread+0x4d/0x3f0
[ 3626.887225]  kthread+0x114/0x150
[ 3626.887228]  ? process_one_work+0x3c0/0x3c0
[ 3626.887229]  ? kthread_park+0x90/0x90
[ 3626.887232]  ret_from_fork+0x22/0x30
[ 3626.887236] INFO: task iou-sqp-278149:278150 blocked for more than 120 seconds.
[ 3626.892947]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.897266] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.903175] task:iou-sqp-278149  state:D stack:    0 pid:278150 ppid:     1 flags:0x00004002
[ 3626.903177] Call Trace:
[ 3626.903178]  __schedule+0x2de/0x890
[ 3626.903180]  schedule+0x4f/0xc0
[ 3626.903182]  io_uring_cancel_sqpoll+0xdb/0x110
[ 3626.903184]  ? wait_woken+0x80/0x80
[ 3626.903187]  io_sqpoll_cancel_cb+0x24/0x30
[ 3626.903188]  io_run_task_work_head+0x28/0x50
[ 3626.903191]  io_sq_thread+0x4ef/0x720
[ 3626.903194]  ? wait_woken+0x80/0x80
[ 3626.903195]  ? recalc_sigpending+0x1c/0x60
[ 3626.903198]  ? io_submit_sqes+0x14c0/0x14c0
[ 3626.903200]  ret_from_fork+0x22/0x30
[ 3626.903204] INFO: task NIO-ELT-1-#0:278151 blocked for more than 120 seconds.
[ 3626.907496]       Tainted: G        W         5.12.0-rc6-5.13-uring-210407 #1
[ 3626.911758] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 3626.917652] task:NIO-ELT-1-#0    state:D stack:    0 pid:278151 ppid:     1 flags:0x00024000
[ 3626.917654] Call Trace:
[ 3626.917655]  __schedule+0x2de/0x890
[ 3626.917657]  ? free_pages_and_swap_cache+0xb9/0xd0
[ 3626.917662]  schedule+0x4f/0xc0
[ 3626.917664]  schedule_timeout+0x202/0x290
[ 3626.917667]  wait_for_completion+0x94/0x100
[ 3626.917669]  __io_uring_files_cancel+0x17d/0x2e0
[ 3626.917672]  ? blk_finish_plug+0x26/0x40
[ 3626.917676]  ? io_uring_cancel_sqpoll+0x110/0x110
[ 3626.917678]  do_exit+0xc0/0xaf0
[ 3626.917681]  ? exit_to_user_mode_prepare+0x3d/0x1a0
[ 3626.917685]  __x64_sys_exit+0x1b/0x20
[ 3626.917687]  do_syscall_64+0x38/0x90
[ 3626.917690]  entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 3626.917695] RIP: 0033:0x7f1b2570a6c6
[ 3626.917697] RSP: 002b:00007f1b22077e80 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
[ 3626.917699] RAX: ffffffffffffffda RBX: 00007f1b22078700 RCX: 00007f1b2570a6c6
[ 3626.917700] RDX: 000000000000003c RSI: 00000000007fb000 RDI: 0000000000000000
[ 3626.917701] RBP: 00007f1b21878000 R08: 0000000000000006 R09: 0000000100000000
[ 3626.917702] R10: 00007f1b257054e0 R11: 0000000000000246 R12: 00007ffd3c3f149e
[ 3626.917704] R13: 00007ffd3c3f149f R14: 00007ffd3c3f14a0 R15: 00007f1b22077f40

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19

Most upvoted comments

Ok, now this time with the right kernel - no CPU, but my processes hangs on exit. dmesg:

dmesg.txt

Ok, I’ve run tests now for 20 minutes hammering it using https://git.kernel.dk/cgit/linux-block/commit/?h=for-5.13/io_uring&id=f2a48dd09b8e933f59570692e1382b81d4fddc49 - it’s been rock solid and no dmesg output. It definitely would have had issues with earlier versions, so seems you nailed it, well done! I think we can close this. Thanks!

Sockets - read, write and both at times - it’s a big test suite…

Yes, just hangs and are not responsive - no cpu usage.