Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2398915pxy; Sun, 2 May 2021 21:43:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfhFJeKIIitIgMEApnwGMg0zMjyFGBR6+bfUofCJzY8TWeaAH86g5NUhLe2BAoWwBK2rzB X-Received: by 2002:a62:e50f:0:b029:214:8e4a:ae46 with SMTP id n15-20020a62e50f0000b02902148e4aae46mr17510018pff.73.1620016988879; Sun, 02 May 2021 21:43:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620016988; cv=none; d=google.com; s=arc-20160816; b=MKYvg8ke5KX50ykDzmnEBf4WM1RjVwsmn3hcW6AAIh0cFJCIulWZxa4FomH4+HKgjB gVOphldgU5UXQoNTdgR/odnDIBqDLQSFcd0/tDMJlQXQzOvZPHNZ27ExBKecSuQlwbP/ h1GcYDn+MYlcXzXxAcsaJZK0PxaGwJr1npFaEFfb1x+oYUe6ZD8AgwPzasqQulL5vsjc MKOw93mkUMWHZIKAkBqkh8Z6BsYZxsCwmGPVFKLCN3zP04Kp/lIJPeK2MAaR0CtPcjRG nN5VCdI0tnuQJaGloTFw2UVlyalCK2POfpjfBPeMQesIlfSY4B5VmxCYTGJI/Um0Lfbk Ou3A== 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=qo2BsYbsMhgjSCd6k5aYFeXWyFkz8QXbNT/3uoIXeFM=; b=UweCNObeJWji+IzRi6tq0iAXGsVxWQ7eO8Cn88idc78lEiMHp7qHOJYnc8wjR2CyjS l/bqvmP0tEbI5bz03QdfeMV2UrbzRLGt+wlULstEq9wrNutrSrs+Tc9KsciDMvhmx2Q6 a18O2zHvsPea+rJwzR6W295nh/2pj9GjGleoKf6fqt3PUKCxYnIpe38NOGz9lb/0f9kZ ScYZg4jv6nZbiS/FTinHBh/4ikl20XpKlEA4mzWAvWCEeJbmjEDUmhzPaUUykmmx/Q6Y 6q6PcGw8EmXVoAVZutHUw2Aeheyy4YE7jeKOvz3u3myT6MR1cvHyRdCLjqQAUvcaA8F3 OMVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=gjRF6T5N; 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 j21si11741912pfn.127.2021.05.02.21.42.55; Sun, 02 May 2021 21:43:08 -0700 (PDT) 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=gjRF6T5N; 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 S229887AbhECEmn (ORCPT + 99 others); Mon, 3 May 2021 00:42:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229462AbhECEmm (ORCPT ); Mon, 3 May 2021 00:42:42 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5E56C06174A; Sun, 2 May 2021 21:41:48 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2so6237393lft.4; Sun, 02 May 2021 21:41:48 -0700 (PDT) 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=qo2BsYbsMhgjSCd6k5aYFeXWyFkz8QXbNT/3uoIXeFM=; b=gjRF6T5NJ65eN0A5IEdIL3N8xOOk+JePSpak4E+pxJKEa5Bq7CY9N7Pk5opQrpmd5R O1mgcaatULcYYzb+QpzwU0Hpt/wzSla/bqcetXHBniIKp+B39/obcuw4R9eaw0K72Gll RnWBTpTgVDPGGfA7ABprmQkyI7I8qT2T16zAYD1KAKvqpKU07AsPscCGe0ToM/pmLxso l+kbYNdV6Z59SzTLUOBHYM8bFH5pMXhVBDqJ1WcO4vuHjSmNCZsVrv4mpAkyz64Fcv5m 2FDWoC4u2S9QiCo89EQNZyYc2SI+QyNoJkvZ/vAjxXiC0MjLySVImj42IL5oIxI7bsgS bvDw== 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=qo2BsYbsMhgjSCd6k5aYFeXWyFkz8QXbNT/3uoIXeFM=; b=iZNfk/Eq0ViGrWHswDCRpyYP9jDGpFopSTlFLbHIcBs27g5wnyb2xcpyhYw5qOvHky RoDT33HAjJNGhLti5u8LatEgVFMoDUqoxrBSSfmt1WJGalTVl1BcJsiTXBcSd7WC3cnU vK1b/APo6t01QJAgXoLUFEalALjGHsb84ZVHQ5N9g0LCA3iwQP8Zs++hG1D7NcqwpuX7 pLzcMvX+ys2EfQqxby16OJpA7x48q2JtFsTP1GSEIHQGO7R146IBWTsOHCLRSeBjxD1H mkUPtrgvh7OCyqEaWYHto5jHmBCOs2tPoTDqgWHNLSdbn/oIta38uTohPhi2gqSZyvi3 V37Q== X-Gm-Message-State: AOAM530irg/hCXtG14em79q/xdNYDXkYoT2f8V8c5VJZSJdQ39xGq26U pX8pw9MZfC9pVUPoosVxbekUN0NbDnhncnaEnb0= X-Received: by 2002:ac2:50c2:: with SMTP id h2mr3872158lfm.499.1620016907066; Sun, 02 May 2021 21:41:47 -0700 (PDT) MIME-Version: 1.0 References: <0000000000000c97e505bdd1d60e@google.com> <53a22ab4-7a2d-4ebd-802d-9d1b4ce4e087n@googlegroups.com> In-Reply-To: From: Palash Oswal Date: Mon, 3 May 2021 10:11:35 +0530 Message-ID: Subject: Re: INFO: task hung in io_uring_cancel_sqpoll To: Pavel Begunkov Cc: Jens Axboe , io-uring@vger.kernel.org, LKML , syzbot+11bf59db879676f59e52@syzkaller.appspotmail.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 3, 2021 at 3:42 AM Pavel Begunkov wrote: > > On 4/30/21 3:21 PM, Palash Oswal wrote: > > On Thursday, March 18, 2021 at 9:40:21 PM UTC+5:30 syzbot wrote: > >> > >> Hello, > >> > >> syzbot found the following issue on: > >> > >> HEAD commit: 0d7588ab riscv: process: Fix no prototype for arch_dup_tas.. > >> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes > >> console output: https://syzkaller.appspot.com/x/log.txt?x=12dde5aed00000 > >> kernel config: https://syzkaller.appspot.com/x/.config?x=81c0b708b31626cc > >> dashboard link: https://syzkaller.appspot.com/bug?extid=11bf59db879676f59e52 > >> userspace arch: riscv64 > >> CC: [asml.s...@gmail.com ax...@kernel.dk io-u...@vger.kernel.org linux-...@vger.kernel.org] > >> > >> Unfortunately, I don't have any reproducer for this issue yet. > >> > >> IMPORTANT: if you fix the issue, please add the following tag to the commit: > >> Reported-by: syzbot+11bf59...@syzkaller.appspotmail.com > >> > >> INFO: task iou-sqp-4867:4871 blocked for more than 430 seconds. > >> Not tainted 5.12.0-rc2-syzkaller-00467-g0d7588ab9ef9 #0 > >> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. > >> task:iou-sqp-4867 state:D stack: 0 pid: 4871 ppid: 4259 flags:0x00000004 > >> Call Trace: > >> [] context_switch kernel/sched/core.c:4324 [inline] > >> [] __schedule+0x478/0xdec kernel/sched/core.c:5075 > >> [] schedule+0x64/0x166 kernel/sched/core.c:5154 > >> [] io_uring_cancel_sqpoll+0x1de/0x294 fs/io_uring.c:8858 > >> [] io_sq_thread+0x548/0xe58 fs/io_uring.c:6750 > >> [] ret_from_exception+0x0/0x14 > > The test might be very useful. Would you send a patch to > liburing? Or mind the repro being taken as a test? > > Pavel, I'm working on a PR for liburing with this test. Do you know how I can address this behavior? root@syzkaller:~/liburing/test# ./runtests.sh sqpoll-cancel-hang Running test sqp[ 15.310997] Running test sqpoll-cancel-hang: oll-cancel-hang: [ 15.333348] sqpoll-cancel-h[305]: segfault at 0 ip 000055ad00e265e3 sp] [ 15.334940] Code: 89 d8 8d 34 90 8b 45 04 ba 03 00 00 00 c1 e0 04 03 46 All tests passed root@syzkaller:~/liburing/test# ./sqpoll-cancel-hang [ 13.572639] sqpoll-cancel-h[298]: segfault at 0 ip 00005634c4a455e3 sp] [ 13.576506] Code: 89 d8 8d 34 90 8b 45 04 ba 03 00 00 00 c1 e0 04 03 46 [ 23.350459] random: crng init done [ 23.352837] random: 7 urandom warning(s) missed due to ratelimiting [ 243.090865] INFO: task iou-sqp-298:299 blocked for more than 120 secon. [ 243.095187] Not tainted 5.12.0 #142 [ 243.099800] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disable. [ 243.105928] task:iou-sqp-298 state:D stack: 0 pid: 299 ppid: 4 [ 243.111044] Call Trace: [ 243.112855] __schedule+0xb1d/0x1130 [ 243.115549] ? __sched_text_start+0x8/0x8 [ 243.118328] ? io_wq_worker_sleeping+0x145/0x500 [ 243.121790] schedule+0x131/0x1c0 [ 243.123698] io_uring_cancel_sqpoll+0x288/0x350 [ 243.125977] ? io_sq_thread_unpark+0xd0/0xd0 [ 243.128966] ? mutex_lock+0xbb/0x130 [ 243.132572] ? init_wait_entry+0xe0/0xe0 [ 243.135429] ? wait_for_completion_killable_timeout+0x20/0x20 [ 243.138303] io_sq_thread+0x174c/0x18c0 [ 243.140162] ? io_rsrc_put_work+0x380/0x380 [ 243.141613] ? init_wait_entry+0xe0/0xe0 [ 243.143686] ? _raw_spin_lock_irq+0xa5/0x180 [ 243.145619] ? _raw_spin_lock_irqsave+0x190/0x190 [ 243.147671] ? calculate_sigpending+0x6b/0xa0 [ 243.149036] ? io_rsrc_put_work+0x380/0x380 [ 243.150694] ret_from_fork+0x22/0x30 Palash