)]}'
{
  "commit": "1fcdf578088cf1b5e67273419d44774d3d1f2a03",
  "tree": "022ce9ea6d946f5038da1a75b131790ed0e978a3",
  "parents": [
    "7b5681f82bf53b42afc7cb35482036559d5bad42"
  ],
  "author": {
    "name": "Ammar Faizi",
    "email": "ammar.faizi@students.amikom.ac.id",
    "time": "Sat Nov 06 18:49:42 2021 +0700"
  },
  "committer": {
    "name": "Jens Axboe",
    "email": "axboe@kernel.dk",
    "time": "Tue Nov 09 07:48:00 2021 -0700"
  },
  "message": "test: Add kworker-hang test\n\nThis is the reproducer for the kworker hang bug.\n\nReproduction Steps:\n  1) A user task calls io_uring_queue_exit().\n\n  2) Suspend the task with SIGSTOP / SIGTRAP before the ring exit is\n     finished (do it as soon as step (1) is done).\n\n  3) Wait for `/proc/sys/kernel/hung_task_timeout_secs` seconds\n     elapsed.\n\n  4) We get a complaint from the khungtaskd because the kworker is\n     stuck in an uninterruptible state (D).\n\nThe kworkers waiting on ring exit are not progressing as the task\ncannot proceed. When the user task is continued (e.g. get SIGCONT\nafter SIGSTOP, or continue after SIGTRAP breakpoint), the kworkers\nthen can finish the ring exit.\n\nWe need a special handling for this case to avoid khungtaskd\ncomplaint. Currently we don\u0027t have the fix for this.\n\nThe dmesg says:\n\n  [247390.432294] INFO: task kworker/u8:2:358488 blocked for more than 10 seconds.\n  [247390.432314]       Tainted: G           OE     5.15.0-stable #5\n  [247390.432322] \"echo 0 \u003e /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n  [247390.432329] task:kworker/u8:2    state:D stack:    0 pid:358488 ppid:     2 flags:0x00004000\n  [247390.432341] Workqueue: events_unbound io_ring_exit_work\n  [247390.432354] Call Trace:\n  [247390.432368]  __schedule+0x453/0x1850\n  [247390.432388]  ? lock_acquire+0xc8/0x2d0\n  [247390.432404]  ? usleep_range+0x90/0x90\n  [247390.432412]  schedule+0x59/0xc0\n  [247390.432420]  schedule_timeout+0x1aa/0x1f0\n  [247390.432429]  ? mark_held_locks+0x49/0x70\n  [247390.432439]  ? lockdep_hardirqs_on_prepare+0xff/0x180\n  [247390.432445]  ? _raw_spin_unlock_irq+0x24/0x40\n  [247390.432456]  __wait_for_common+0xc2/0x170\n  [247390.432473]  io_ring_exit_work+0x1d9/0x750\n  [247390.432486]  ? io_uring_del_tctx_node+0xe0/0xe0\n  [247390.432502]  ? verify_cpu+0xf0/0x100\n  [247390.432520]  process_one_work+0x23b/0x550\n  [247390.432540]  worker_thread+0x55/0x3c0\n  [247390.432546]  ? process_one_work+0x550/0x550\n  [247390.432556]  kthread+0x140/0x160\n  [247390.432564]  ? set_kthread_struct+0x40/0x40\n  [247390.432574]  ret_from_fork+0x1f/0x30\n  [247390.432605] INFO: task kworker/u8:0:359615 blocked for more than 10 seconds.\n  [247390.432613]       Tainted: G           OE     5.15.0-stable #5\n  [247390.432620] \"echo 0 \u003e /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n  [247390.432626] task:kworker/u8:0    state:D stack:    0 pid:359615 ppid:     2 flags:0x00004000\n  [247390.432635] Workqueue: events_unbound io_ring_exit_work\n  [247390.432643] Call Trace:\n  [247390.432653]  __schedule+0x453/0x1850\n  [247390.432676]  ? usleep_range+0x90/0x90\n  [247390.432684]  schedule+0x59/0xc0\n  [247390.432691]  schedule_timeout+0x1aa/0x1f0\n  [247390.432700]  ? mark_held_locks+0x49/0x70\n  [247390.432710]  ? lockdep_hardirqs_on_prepare+0xff/0x180\n  [247390.432717]  ? _raw_spin_unlock_irq+0x24/0x40\n  [247390.432728]  __wait_for_common+0xc2/0x170\n  [247390.432744]  io_ring_exit_work+0x1d9/0x750\n  [247390.432758]  ? io_uring_del_tctx_node+0xe0/0xe0\n  [247390.432772]  ? verify_cpu+0xf0/0x100\n  [247390.432788]  process_one_work+0x23b/0x550\n  [247390.432807]  worker_thread+0x55/0x3c0\n  [247390.432813]  ? process_one_work+0x550/0x550\n  [247390.432824]  kthread+0x140/0x160\n  [247390.432830]  ? set_kthread_struct+0x40/0x40\n  [247390.432839]  ret_from_fork+0x1f/0x30\n  [247390.432870]\n                  Showing all locks held in the system:\n  [247390.432877] 1 lock held by khungtaskd/40:\n  [247390.432880]  #0: ffffffff82976700 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x15/0x174\n  [247390.432911] 1 lock held by in:imklog/922:\n  [247390.432915]  #0: ffff8881041cfcf0 (\u0026f-\u003ef_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x4a/0x60\n  [247390.432977] 2 locks held by pager/318088:\n  [247390.432981]  #0: ffff8881208d4898 (\u0026tty-\u003eldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x24/0x50\n  [247390.433001]  #1: ffffc900010fd2e8 (\u0026ldata-\u003eatomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x49e/0x660\n  [247390.433024] 1 lock held by htop/341462:\n  [247390.433032] 2 locks held by kworker/u8:2/358488:\n  [247390.433035]  #0: ffff888100106938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550\n  [247390.433053]  #1: ffffc90003797e70 ((work_completion)(\u0026ctx-\u003eexit_work)){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550\n  [247390.433071] 2 locks held by kworker/u8:0/359615:\n  [247390.433075]  #0: ffff888100106938 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550\n  [247390.433092]  #1: ffffc90003597e70 ((work_completion)(\u0026ctx-\u003eexit_work)){+.+.}-{0:0}, at: process_one_work+0x1c1/0x550\n  [247390.433110] 1 lock held by dmesg/361178:\n  [247390.433113]  #0: ffff88810b5300d0 (\u0026user-\u003elock){+.+.}-{3:3}, at: devkmsg_read+0x4b/0x230\n\n  [247390.433134] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nCc: Pavel Begunkov \u003casml.silence@gmail.com\u003e\nLink: https://github.com/axboe/liburing/issues/448\nSigned-off-by: Ammar Faizi \u003cammar.faizi@students.amikom.ac.id\u003e\nSigned-off-by: Jens Axboe \u003caxboe@kernel.dk\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fb3a8595812724bf1b0442dd82fb1c4148b792d7",
      "old_mode": 33188,
      "old_path": ".gitignore",
      "new_id": "b0f5edf134c9b6fadb88c7cbcbca5286d269d007",
      "new_mode": 33188,
      "new_path": ".gitignore"
    },
    {
      "type": "modify",
      "old_id": "f7eafad45aa3d4e961a763ebfd1156d0286e41de",
      "old_mode": 33188,
      "old_path": "test/Makefile",
      "new_id": "2af684a90ddc7fc0c04c9ac37696d3fcaef66d71",
      "new_mode": 33188,
      "new_path": "test/Makefile"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "15147c645bf0d0904e1d90e73c8fff74855465f8",
      "new_mode": 33188,
      "new_path": "test/kworker-hang.c"
    }
  ]
}
