Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp126130imm; Thu, 2 Aug 2018 15:20:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc5XVVtD27AZe1dDfN9pohtGH+c8Tc5pyPwu58Wn3aOJOQLTJkJPdGUoVWm/3TkNrOsyrGR X-Received: by 2002:a62:1219:: with SMTP id a25-v6mr1406453pfj.104.1533248436998; Thu, 02 Aug 2018 15:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533248436; cv=none; d=google.com; s=arc-20160816; b=tD9ggf0hyLjLYjc8Oz9njRUMPjCARe1vItF2KSrCjnuK1SsOqa+5EBgM+Lia581jrK 72YVcc/kEBJI6BUxDT+vMiPVGdEEwpv7leesF0jyoRZ0pr2Kh2cX60cHp2T5VR6pXPuq WKosOlAEP4hS4PcvWVphKihczdCGn3kzkDfj73DjsDZYcDEZywJH1cEKd8ztIJiYynLX ffJOstiWdEdwHJ1jJU2rM15tl04ufFj6oALHkIJRAI2X5jm80qWsGFn+2rRSR3hVxdj6 e59mmWFXOaGcndft206ne/TRMP336XKCwYG8goGcfX451exUacCbc5c0gtK0sR4ewhBj Gghw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=xr+g2awgJSrM/QHT42/L36wiR1sNP6lBxL3j6q7Rvb8=; b=KW6ZhIqRsboVI6SSvU/4TA5joFPj9d6cB5Q8dbWBB/tLF6rQyJ13IuRgDFA5oVNpii Nf6TWfK06HW4LgUdbvSZAozvPjVLpDAO1OFI+U1MqbSvv9LYdIVE02Y/I+m3klkC7gSS XuICeTbTS914RoI+mWQsdemDOFH7wN4+7UPzNc0uwBqDgSXb1UcpRfpIF0rQpc9WffQh nVmb9EJ76EaPKUkapMgPfe7eVMbR1nk9cKYxcXdEK15A+/3Qg/sOmHzuBEF0OUziZiZE WJ1gw27qOZ5rBqxVuk+xQZwG56zmh5nf9dlgAzkhWzU7mvzL0h32QUg6B1mSr3qcrhje Wjig== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si2225079pla.35.2018.08.02.15.20.21; Thu, 02 Aug 2018 15:20:36 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729830AbeHCAL4 (ORCPT + 99 others); Thu, 2 Aug 2018 20:11:56 -0400 Received: from nautica.notk.org ([91.121.71.147]:60239 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbeHCAL4 (ORCPT ); Thu, 2 Aug 2018 20:11:56 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 3BC6DC009; Fri, 3 Aug 2018 00:18:45 +0200 (CEST) Date: Fri, 3 Aug 2018 00:18:30 +0200 From: Dominique Martinet To: Dmitry Vyukov Cc: Tetsuo Handa , Latchesar Ionkov , Eric Van Hensbergen , syzkaller-bugs , LKML , syzbot , Al Viro , v9fs-developer@lists.sourceforge.net, linux-fsdevel , Ron Minnich Subject: Re: [V9fs-developer] INFO: task hung in grab_super Message-ID: <20180802221830.GA18901@nautica> References: <0000000000002f5541057143a85e@google.com> <0adc592b-d4a3-f6da-3c5c-22490f641eb9@i-love.sakura.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dmitry Vyukov via V9fs-developer wrote on Wed, Jul 18, 2018: > >> 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. Tricky with the current way we handle this, as the normal action if wait_event_killable is interrupted is to send a tflush message (which is what you could also notice, if you just send one sigkill it'll just send a flush message and wait for that instead) There's work in progress to add refcounting to requests which would make us one step closer to being able to not wait for the flush reply (or rather, it'll give us the ability to wait for it asynchronously) ; we should be able to get rid of that loop after that. -- Dominique