Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5740444imm; Mon, 23 Jul 2018 05:23:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfU5uB1o4inZ3XcK1kzTGt1zlIcrGbA0Yf31k6jvKCa7Y/3NSAxJcyo9RVZiZbAIJQ1uEY4 X-Received: by 2002:aa7:8307:: with SMTP id t7-v6mr13061703pfm.81.1532348620140; Mon, 23 Jul 2018 05:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532348620; cv=none; d=google.com; s=arc-20160816; b=EunWhEk74j87+2ZiqkzP4dYYVKUAdXuiJM/7OrqFmLlT933kK2hPRTeVnkyr3RnWUT VZdbfG0vSpNCyMWMvEbEWcV9XaxApbnZe5r7kRV0Fk2Mwe4nQfNM0pUoNE76b55VwkzV m4LrsXUBOp++xyJFg8aeiP3b/WInLEhAu1kSl1jgr205xsDbdzcTNTWDX2lgomwBm7/7 7Ec4a3jdE1cGqxPRfe3+zxEZbniy8W65RjTKfudV74WTreldqC6kr8JOVSvxkEYr7GDY /XowA0CQnu9uBWPX+g+7437Ff3A+r4jkiqnfukOgVruyMQ0hNhNB126Ge8Gtme4lR27H SE9g== 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=UhpfyV0vupGIAoVBD4WxS43npYMzWVhRjU2QYbmw3wE=; b=q1XGTvJr9lWlCy77YuBeSlufoO3dpi9PShiSqZUV2/kRb2r/bCLYD18TEHzogrHGrU dW/WLozWFwideK6XQ9XJZubNtXOsE2qU5RsB59CvrP/v5pcXtzlKYZa9BmnGvON4V9vs lgA+TCtpKYabhsmlzvpnGnPzYrPA5EpZMmuRwrjFY0Bo4gV/ZiXaFsTRCJ1XDp2Bc1nE nan67xjqVLnh560MxV9DyD6UkJ2dD4VNdY0q2+e1I/N7WCvYZBi8b+D0x6trjch/DS85 Ufy8vOPOPVqPgUT7ily3db5JyuVbJwKldpCYbTqJHm9MUOIGDmupszehm5SGkr3EBG0k VL5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="p8gts/QA"; 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 q13-v6si8784766pgc.670.2018.07.23.05.23.25; Mon, 23 Jul 2018 05:23:40 -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="p8gts/QA"; 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 S2388042AbeGWNX2 (ORCPT + 99 others); Mon, 23 Jul 2018 09:23:28 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:46299 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387801AbeGWNX2 (ORCPT ); Mon, 23 Jul 2018 09:23:28 -0400 Received: by mail-pg1-f193.google.com with SMTP id p23-v6so257436pgv.13 for ; Mon, 23 Jul 2018 05:22:32 -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=UhpfyV0vupGIAoVBD4WxS43npYMzWVhRjU2QYbmw3wE=; b=p8gts/QAWugczV1k6vm5EmNdZNklNNMVkDmajaJb3Nc8RNKIELgtViNgTFs+IVI4ba U0wmAtI1+6aqP1w53lQOd1LiKwRAXjOlOfbeo9s2fJ9MRSSZTlCDa4Fbq1XDbncUdwGh Ga7bIFVcKRF2OwixfqO1lWmiB3ZfRH28SaxJ2TdghO5t1K8lFRcLieYXXXtYFLX5yyZO NI1kJvwryASR/a5lIt1LHu1kXf3njjycW2TWkZpJmbpK++YIroaXuozMw7og1PDxIkLU OMKgr3FATLzu7tzC2b6M0hf4M0pESL8Jdy26LJFzoqZy9osDGHbVrMe+DxQqI0+MxLQT C04A== 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=UhpfyV0vupGIAoVBD4WxS43npYMzWVhRjU2QYbmw3wE=; b=LQL0Mxw8d39haxtFG4Svs4kEbN+ks77KLQOUcKUx+3W2rRv15gRWk17Pxtekb+vGuA hLGDMEmnH5zDlLNiV2nfF7bdaLQUHHTypxhk9MZjOViHfS2XOZo/5DA0Uka39mo1HK9T L/C+RsCDzDI0xEVMl/JILyj69AY+wxeWLGrV0LtF1gx3gpKKOkzW2RjJBl3aOkxP93Yo qbTAsCiSWdbFQasidH3TKf+Nsxu5pMzLTMocshmq2s7cNlo5y5Zhr3zF6S/G6UnHyMq1 +M4azu+ZoAGpgmdREi1r16mvBi9Da2DJcLlR0RrzrNXxvkdSh2w+u/6B+co7IF8mIUfQ nkjQ== X-Gm-Message-State: AOUpUlEj8htJnCc3FpiNaHcySzAYR/dWiDa032/ueY9XUcgeVOydxjLt OkhGwvX1EB667HmfQWWMPRrrnFDUu1RF5ayKUzT0onlu X-Received: by 2002:a65:58c8:: with SMTP id e8-v6mr11890029pgu.96.1532348551603; Mon, 23 Jul 2018 05:22:31 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:ac14:0:0:0:0 with HTTP; Mon, 23 Jul 2018 05:22:11 -0700 (PDT) In-Reply-To: References: <000000000000bc17b60571a60434@google.com> From: Dmitry Vyukov Date: Mon, 23 Jul 2018 14:22:11 +0200 Message-ID: Subject: Re: INFO: task hung in fuse_reverse_inval_entry To: Miklos Szeredi Cc: linux-fsdevel , LKML , syzkaller-bugs , syzbot 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 Mon, Jul 23, 2018 at 2:12 PM, Miklos Szeredi wrote: > On Mon, Jul 23, 2018 at 10:11 AM, Dmitry Vyukov wrote: >> On Mon, Jul 23, 2018 at 9:59 AM, syzbot >> wrote: >>> Hello, >>> >>> syzbot found the following crash on: >>> >>> HEAD commit: d72e90f33aa4 Linux 4.18-rc6 >>> git tree: upstream >>> console output: https://syzkaller.appspot.com/x/log.txt?x=1324f794400000 >>> kernel config: https://syzkaller.appspot.com/x/.config?x=68af3495408deac5 >>> dashboard link: https://syzkaller.appspot.com/bug?extid=bb6d800770577a083f8c >>> compiler: gcc (GCC) 8.0.1 20180413 (experimental) >>> syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=11564d1c400000 >>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16fc570c400000 >> >> >> Hi fuse maintainers, >> >> We are seeing a bunch of such deadlocks in fuse on syzbot. As far as I >> understand this is mostly working-as-intended (parts about deadlocks >> in Documentation/filesystems/fuse.txt). The intended way to resolve >> this is aborting connections via fusectl, right? > > Yes. Alternative is with "umount -f". > >> The doc says "Under >> the fuse control filesystem each connection has a directory named by a >> unique number". The question is: if I start a process and this process >> can mount fuse, how do I kill it? I mean: totally and certainly get >> rid of it right away? How do I find these unique numbers for the >> mounts it created? > > It is the device number found in st_dev for the mount. Other than > doing stat(2) it is possible to find out the device number by reading > /proc/$PID/mountinfo (third field). Thanks. I will try to figure out fusectl connection numbers and see if it's possible to integrate aborting into syzkaller. >> Taking into account that there is usually no >> operator attached to each server, I wonder if kernel could somehow >> auto-abort fuse on kill? > > Depends on what the fuse server is sleeping on. If it's trying to > acquire an inode lock (e.g. unlink(2)), which is classical way to > deadlock a fuse filesystem, then it will go into an uninterruptible > sleep. There's no way in which that process can be killed except to > force a release of the offending lock, which can only be done by > aborting the request that is being performed while holding that lock. I understand that it is not killed today, but I am asking if we can make it killable. It's all code that we can change, and if a human operator can do it, it can be done pure programmatically on kill too, right?