Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp576293imm; Wed, 18 Jul 2018 07:13:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpet0K+ZvbhNcdxgJMYRQNAtnKbTtbZOsJsVngDbgN0t1mnsB7V+zW2rjiAePA2gR/7ChXb/ X-Received: by 2002:a17:902:18a:: with SMTP id b10-v6mr6228223plb.62.1531923197224; Wed, 18 Jul 2018 07:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531923197; cv=none; d=google.com; s=arc-20160816; b=AEryCi36Q98OKUzjWa7lchF8+2+ik5S1dE3ed/I+Zren6EWp6p6YKMBJ1vuGsob+XQ ikUTPViruOOpkjHRQ7SFGf1mdIf1nMplBMx01o6y51UD0ru+kiy/+u3RTk9vJplmaySG 9LP1b0b0jOAscVrh6BhDIabWL331RjEh7Pgz22s0f0hUZZw38ODbi0sqhHw/jUJDoBNm wdUBYH5Q0YYLRSgMh0+/bpCKAkXT1Pus0QtN1U+hpxchvY8lgctkzprZn/ZTHprUEsit 4HM8/djiOAhMYadfsgDYbqjDQUMBIAkHUi2kvbcyax4QDDw3Sjnzx9dJk7wTaTeiwr9O 5bLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=hm0GfILnPdVZ55zrW5t1PKask/NBpNc3HziUVobAoO4=; b=tlgkBlzMxSXLlhb2YLsicqtnSCnlbSEFeISHlIrzxFkpIhTMyW5lFOCAQWkCZYD5GB j2L3FWxEKWAQh3zVtRqtAUr1MBGaJbS7P6O5mm1ilG4h6jrmTL8jJuY1My/y+cvZs71h egP7ilKy80uf61N4TkJALMpsOidSgCMBuydOXXWd0op6DJnJuR4l9nbYLqpOxL089tig wD59nazf8Ll3X97Gr6TbPJFR/yCHPHg+edPYa9ILAZKuwihcG2LrTUu+NRk3X083sdFj XENQWHNBbB1wEHOMOBx8Z5zpBoQKEJB/XtEly+x9QlZPEIcNApB7f7IN6pCVdXXti3tN +lug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nqdj9fFC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7-v6si3037122pln.145.2018.07.18.07.13.02; Wed, 18 Jul 2018 07:13:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Nqdj9fFC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730986AbeGROuG (ORCPT + 99 others); Wed, 18 Jul 2018 10:50:06 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:37522 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730521AbeGROuF (ORCPT ); Wed, 18 Jul 2018 10:50:05 -0400 Received: by mail-pl0-f65.google.com with SMTP id 31-v6so2109264plc.4 for ; Wed, 18 Jul 2018 07:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hm0GfILnPdVZ55zrW5t1PKask/NBpNc3HziUVobAoO4=; b=Nqdj9fFC+kcqPSq8h9q/j6cEEm7qgnrSO9p57iquFiuQLjDdcEPjS6c2n3uTDz8o8T KxYfHXcghsM+wPmMShmCqf89OsBjl7sv4WHMxqxXBQzPpdjhNI3TQrSeZnDrn4DqJXjX mWz6TCk0cGNOvjV9amxbNROB0tGjTq3IKQfXJ4HS3BOt3M6fczSPDkD+hwveYdSeDJ6w OxJX/F4Pn6lh0WZNDvFaULL2LghHlJui7Jv7mG7o5H82Kx5KrldmOVXWRbkkOu49liSB SJjtB8i7zqZa9Eqyy3vRZcZotnneDN2qHQ+JafmUFlMZI+M5ajWsQuBuNhQ3FG7/GA3Q 7N4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hm0GfILnPdVZ55zrW5t1PKask/NBpNc3HziUVobAoO4=; b=IDxYhv01xCi8nzpu2TmZhVxZK0uPmcoTn889M62AcLl4+2vw7NjItvmSLavHK2HoqA zRNxpULZvircJsd/QrzY36EGH3J/VdQxe6nHML2W2RgPifW7FTF1VPz2jDHi3WXqHQqQ pTE0IvMnLaQKJfwpmUrirv4gIyPhFsnzOAps7/HxLSOh6oFqarOL7QExCyRuY2BmlkcM 55SouSC2FVDPeJn7EIDRmJ7bAHBGj6eR99fjhtaw/bKzn2HuBQ22C1sSh/Qmd0hHXVC+ jJptkSIOHIfdlBTBuwbQVnfhi+6X+QRe+KGkZ/HMuDrB+DorwfQlWniTLiFPav7qgZEW IYiA== X-Gm-Message-State: AOUpUlFdUh5Nj9lOIgQSYd2fQBeEKOzcGdbYdoC9QF84l5/B+sPsxV4r AL9WnLSYTIWQrMs1yj3dhCeh7ABwlFZImFqdvG4pQA== X-Received: by 2002:a17:902:8c88:: with SMTP id t8-v6mr6062203plo.117.1531923118965; Wed, 18 Jul 2018 07:11:58 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac14:0:0:0:0 with HTTP; Wed, 18 Jul 2018 07:11:38 -0700 (PDT) In-Reply-To: References: <0000000000002f5541057143a85e@google.com> <0adc592b-d4a3-f6da-3c5c-22490f641eb9@i-love.sakura.ne.jp> From: Dmitry Vyukov Date: Wed, 18 Jul 2018 16:11:38 +0200 Message-ID: Subject: Re: INFO: task hung in grab_super To: Tetsuo Handa Cc: Eric Van Hensbergen , Ron Minnich , Latchesar Ionkov , v9fs-developer@lists.sourceforge.net, syzbot , linux-fsdevel , LKML , syzkaller-bugs , Al Viro Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 18, 2018 at 3:35 PM, Tetsuo Handa wrote: >>>> This seems to be related to 9p. After rerunning the log I got: >>>> >>>> root@syzkaller:~# ps afxu | grep syz >>>> root 18253 0.0 0.0 0 0 ttyS0 Zl 10:16 0:00 \_ >>>> [syz-executor] >>>> root@syzkaller:~# cat /proc/18253/task/*/stack >>>> [<0>] p9_client_rpc+0x3a2/0x1400 >>>> [<0>] p9_client_flush+0x134/0x2a0 >>>> [<0>] p9_client_rpc+0x122c/0x1400 >>>> [<0>] p9_client_create+0xc56/0x16af >>>> [<0>] v9fs_session_init+0x21a/0x1a80 >>>> [<0>] v9fs_mount+0x7c/0x900 >>>> [<0>] mount_fs+0xae/0x328 >>>> [<0>] vfs_kern_mount.part.34+0xdc/0x4e0 >>>> [<0>] do_mount+0x581/0x30e0 >>>> [<0>] ksys_mount+0x12d/0x140 >>>> [<0>] __x64_sys_mount+0xbe/0x150 >>>> [<0>] do_syscall_64+0x1b9/0x820 >>>> [<0>] entry_SYSCALL_64_after_hwframe+0x49/0xbe >>>> [<0>] 0xffffffffffffffff >>>> >>>> There is a bunch of hangs in 9p, so let's do: >>>> >>>> #syz dup: INFO: task hung in flush_work >>>> >>> Then, is dumping all threads when khungtaskd fires a candidate >>> for CONFIG_DEBUG_AID_FOR_SYZBOT=y path? >> >> Perhaps would be useful. But maybe only tasks that are blocked for >> more than timeout/2? and/or unkillable tasks? killable tasks are not a >> problem. > > TASK_KILLABLE waiters are not reported by khungtaskd, are they? > > /* use "==" to skip the TASK_KILLABLE tasks waiting on NFS */ > if (t->state == TASK_UNINTERRUPTIBLE) > check_hung_task(t, timeout); > > And TASK_KILLABLE waiters can become a problem because > >> >> Btw, I see that p9_client_rpc uses wait_event_killable, why wasn't it >> killed along with the whole process? >> > > wait_event_killable() would return -ERESTARTSYS if got SIGKILL. > But if (c->status == Connected) && (type == P9_TFLUSH) is also true, > it ignores SIGKILL by retrying the loop... > > again: > err = wait_event_killable(*req->wq, req->status >= REQ_STATUS_RCVD); > if ((err == -ERESTARTSYS) && (c->status == Connected) && (type == P9_TFLUSH)) { > sigpending = 1; > clear_thread_flag(TIF_SIGPENDING); > goto again; > } > > I wish they don't ignore SIGKILL (by e.g. offloading operations to a kernel thread). I guess that's the problem, right? SIGKILL-ed task must not ignore SIGKILL and hang in infinite loop. This would explain a bunch of hangs in 9p.