1. 29 Oct, 2021 2 commits
    • Pavel Begunkov's avatar
      io-wq: remove worker to owner tw dependency · 1d5f5ea7
      Pavel Begunkov authored
      INFO: task iou-wrk-6609:6612 blocked for more than 143 seconds.
            Not tainted 5.15.0-rc5-syzkaller #0
      "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
      task:iou-wrk-6609    state:D stack:27944 pid: 6612 ppid:  6526 flags:0x00004006
      Call Trace:
       context_switch kernel/sched/core.c:4940 [inline]
       __schedule+0xb44/0x5960 kernel/sched/core.c:6287
       schedule+0xd3/0x270 kernel/sched/core.c:6366
       schedule_timeout+0x1db/0x2a0 kernel/time/timer.c:1857
       do_wait_for_common kernel/sched/completion.c:85 [inline]
       __wait_for_common kernel/sched/completion.c:106 [inline]
       wait_for_common kernel/sched/completion.c:117 [inline]
       wait_for_completion+0x176/0x280 kernel/sched/completion.c:138
       io_worker_exit fs/io-wq.c:183 [inline]
       io_wqe_worker+0x66d/0xc40 fs/io-wq.c:597
       ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
      
      io-wq worker may submit a task_work to the master task and upon
      io_worker_exit() wait for the tw to get executed. The problem appears
      when the master task is waiting in coredump.c:
      
      468                     freezer_do_not_count();
      469                     wait_for_completion(&core_state->startup);
      470                     freezer_count();
      
      Apparently having some dependency on children threads getting everything
      stuck. Workaround it by cancelling the taks_work callback that causes it
      before going into io_worker_exit() waiting.
      
      p.s. probably a better option is to not submit tw elevating the refcount
      in the first place, but let's leave this excercise for the future.
      
      Cc: stable@vger.kernel.org
      Reported-and-tested-by: syzbot+27d62ee6f256b186883e@syzkaller.appspotmail.com
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Link: https://lore.kernel.org/r/142a716f4ed936feae868959059154362bfa8c19.1635509451.git.asml.silence@gmail.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      1d5f5ea7
    • Jens Axboe's avatar
      io_uring: harder fdinfo sq/cq ring iterating · f75d1183
      Jens Axboe authored
      The ring iteration is racy, which isn't necessarily a problem except it
      can cause us to iterate the whole thing. That isn't desired or ideal,
      and it can lead to excessive runtimes of reading fdinfo.
      
      Cap the iteration at tail - head OR the ring size. While in there, clean
      up the ring masking and just dump the raw values along with the masks.
      That provides more useful debug info.
      
      Fixes: 83f84356 ("io_uring: add more uring info to fdinfo for debug")
      Reported-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      f75d1183
  2. 26 Oct, 2021 1 commit
  3. 25 Oct, 2021 7 commits
  4. 23 Oct, 2021 2 commits
  5. 20 Oct, 2021 2 commits
  6. 19 Oct, 2021 26 commits