Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp13623353pxu; Sun, 3 Jan 2021 22:59:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOvaNU5YAOezCfoJTXcqyAOrf12qYoRaNL2fU2xtWClNoAvgqEl70IDdBZuwcqcCKvEi/0 X-Received: by 2002:a17:906:68d1:: with SMTP id y17mr66005384ejr.447.1609743564338; Sun, 03 Jan 2021 22:59:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609743564; cv=none; d=google.com; s=arc-20160816; b=0VNqHOey14F/E1LU8iT1P9t2wPpRkNQzuixrsYuVoRBKcgJ2nB7g9kqJYhsCoGG5cO +wZmbi/HUX1EMzfJHKOwvdjD4ZbUoIZL2P1qo2yBVJwgnIs5M/ER1iR2gZmrbOe67nDv nVITm4Bx6V1MwcUthx0OggqS940hiYAsP7qE7LkiPmpd9cOytIkCNCNO06JAB0U2bt1O 9njmMjjk2UmqNDl5qnua3Ev2QnF+JhYYQ6G9tZcwAu3mnkxWbDDTwNj+u5DDQV6DqtMT SbOZxy9Xfn008lPadQBSC3AJyWpXC/NJFviZpNqxsz3n4mHuNstpAXPADLEGhFEfwM5P 8WVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xtfLC+93w3itoyz4P7sF0tQMz1DxxHp2FUnJwDzp3Gk=; b=C/waKnDsv3T/IlcszEHsSKcHlj/aL9USn1d28khAgBI8/VJfLnaBOJNYuKM8I7WLmC IkGl1OGAmFKOXJNEjB1IdxlCTzt9sJ1fauIIsJHcdFGzhFq4IHHas8Kns4EKhtt+AfUH ZtQv/NwQyDe9R7R6dc4m2OCArgfak0NtP3vNGqDxmO4rxDF9ZaRWqpeT3NSjfojKpZxn wkcSRa5Mr+DubfUGfdJYoQyr1lQ/Uk+C28XqpsBCaRSmYS9/K75xYsxInsh9hZQTCiuk o7z5XbLFkzDS4nDmjxS5XGfwJhO57FrYysprWJeG2lQtBO0XgCokkfD/R5MetuPvETc0 ZYTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BBT9h33S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r2si31656202eds.180.2021.01.03.22.59.01; Sun, 03 Jan 2021 22:59:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BBT9h33S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727702AbhADFYP (ORCPT + 99 others); Mon, 4 Jan 2021 00:24:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727676AbhADFYP (ORCPT ); Mon, 4 Jan 2021 00:24:15 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C6BCC061574; Sun, 3 Jan 2021 21:23:34 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id o13so61669828lfr.3; Sun, 03 Jan 2021 21:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xtfLC+93w3itoyz4P7sF0tQMz1DxxHp2FUnJwDzp3Gk=; b=BBT9h33S2l3iEDMxLrX0iowTroll+rFiqGgK8g9PRQ05cc9mznHyRXzPXIC+3QXoEm 46wwMyzAtc9RDHl4T/FDMJGYJ9KQnZn5AMgGHQKTnZOpEwIFr9etfrlhRFQUsI8almbB TjXiMK0TOYr5+gMcoEkZrBD4XFmlSYjcVqBAFrHqCP4bzo6c1vDHVqOzVyYh16/tprEB tp3Bu96D6W2BMPqJFppVzgrgk3ZL+qT7PXRJrpXrlKSSA+iu1fUz1d8R3qVP+VuW37GJ Xz3CPn3fO3WWuwJQJNf3h5+CzdINSHZCjG7m/TVqAOjlIyTw9NUQiCbAIAf2kNv4BNsg HPxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xtfLC+93w3itoyz4P7sF0tQMz1DxxHp2FUnJwDzp3Gk=; b=iltADJ0eWW75yY/bzypSZMPAzTsb6B/mRe0ArvPc2YktHfu9U0oAmOPjbfyDEN9bxW fVl1LPt0yFwsBgiJMm4/2iEj1v1dr6/3HujVabGFbjcF80TxpxXqyXdJONynRwlu6n0+ LjvzWKrEgGodTdryC/ymJUq6/dnW9d0eWrFiHztP8wRWIazqIG5fLjhquujqbsyYuBtx fZLAMdZWLdo5djHotX0EGjGGCxkpGI7bievOC4CgiMepZxSxfY5ujloXVjmREirIbQCk cmQLF48H49CrFAT/6xO5eU2qxmFDx9jnURjUr4lZ/ei73gaKw1vHJNdMgLf0zyMbMpjR aduQ== X-Gm-Message-State: AOAM533Jctfa7nZqCiyuePxeymy32Uv4yTt42T8/C9wTTWFO0GvDPxSW +AbePqeAZRmE+NAwH2BCZuh78bHpvI6PISbADhk= X-Received: by 2002:ac2:5c08:: with SMTP id r8mr31137914lfp.12.1609737811095; Sun, 03 Jan 2021 21:23:31 -0800 (PST) MIME-Version: 1.0 References: <20210103123701.1500-1-hdanton@sina.com> In-Reply-To: <20210103123701.1500-1-hdanton@sina.com> From: Palash Oswal Date: Mon, 4 Jan 2021 10:53:20 +0530 Message-ID: Subject: Re: INFO: task hung in __io_uring_task_cancel To: Hillf Danton , axboe@kernel.dk Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, Pavel Begunkov , viro@zeniv.linux.org.uk, will@kernel.org, rostedt@goodmis.org, peterz@infradead.org, mingo@redhat.com, mingo@kernel.org, linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hillf - > Can you reproduce it again against 5.11-rc1 with the tiny diff applied > to see if there is a missing wakeup in the mainline? Hey Hillf, thanks for sharing the diff. It seems like the reproducer that I had sent did not work on 5.11-rc1 itself, so I'm trying to get an updated reproducer for that. I'm not well versed with the io_uring code yet, and therefore it'll take me longer to get the reproducer going for 5.11-rc1. Jens - > Can you see if this helps? The reproducer is pretty brutal, it'll fork > thousands of tasks with rings! But should work of course. I think this > one is pretty straight forward, and actually an older issue with the > poll rewaiting. Hey Jens, I applied your diff to 5.10.4 ( b1313fe517ca3703119dcc99ef3bbf75ab42bcfb ), and unfortunately, I'm still seeing the task being hung. Here's the console log if this helps further - root@syzkaller:~# [ 242.840696] INFO: task repro:395 blocked for more than 120 seconds. [ 242.846353] Not tainted 5.10.4+ #9 [ 242.849951] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 242.857665] task:repro state:D stack: 0 pid: 395 ppid: 394 flags:0x00000004 [ 242.867346] Call Trace: [ 242.870521] __schedule+0x28d/0x7e0 [ 242.873597] ? __percpu_counter_sum+0x75/0x90 [ 242.876794] schedule+0x4f/0xc0 [ 242.878803] __io_uring_task_cancel+0xad/0xf0 [ 242.880952] ? wait_woken+0x80/0x80 [ 242.882330] bprm_execve+0x67/0x8a0 [ 242.884142] do_execveat_common+0x1d2/0x220 [ 242.885610] __x64_sys_execveat+0x5d/0x70 [ 242.886708] do_syscall_64+0x38/0x90 [ 242.887727] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 242.889298] RIP: 0033:0x7ffabedd6469 [ 242.890265] RSP: 002b:00007ffc56b8bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000142 [ 242.892055] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffabedd6469 [ 242.893776] RDX: 0000000000000000 RSI: 0000000020000180 RDI: 00000000ffffffff [ 242.895400] RBP: 00007ffc56b8bc90 R08: 0000000000000000 R09: 00007ffc56b8bc90 [ 242.896879] R10: 0000000000000000 R11: 0000000000000246 R12: 0000559c19400bf0 [ 242.898335] R13: 00007ffc56b8bdb0 R14: 0000000000000000 R15: 0000000000000000 [ 363.691144] INFO: task repro:395 blocked for more than 241 seconds. [ 363.693724] Not tainted 5.10.4+ #9 [ 363.695513] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 363.700543] task:repro state:D stack: 0 pid: 395 ppid: 394 flags:0x00000004 [ 363.705747] Call Trace: [ 363.707359] __schedule+0x28d/0x7e0 [ 363.709603] ? __percpu_counter_sum+0x75/0x90 [ 363.712900] schedule+0x4f/0xc0 [ 363.715002] __io_uring_task_cancel+0xad/0xf0 [ 363.718026] ? wait_woken+0x80/0x80 [ 363.720137] bprm_execve+0x67/0x8a0 [ 363.721992] do_execveat_common+0x1d2/0x220 [ 363.723997] __x64_sys_execveat+0x5d/0x70 [ 363.725857] do_syscall_64+0x38/0x90 [ 363.727501] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 363.729510] RIP: 0033:0x7ffabedd6469 [ 363.730913] RSP: 002b:00007ffc56b8bc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000142 [ 363.733747] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ffabedd6469 [ 363.736138] RDX: 0000000000000000 RSI: 0000000020000180 RDI: 00000000ffffffff [ 363.738431] RBP: 00007ffc56b8bc90 R08: 0000000000000000 R09: 00007ffc56b8bc90 [ 363.740504] R10: 0000000000000000 R11: 0000000000000246 R12: 0000559c19400bf0 [ 363.742560] R13: 00007ffc56b8bdb0 R14: 0000000000000000 R15: 0000000000000000