Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp380202pxu; Thu, 15 Oct 2020 06:24:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9fbkcOS4QbHBIJhGkzBA2P+YXws+CRZUj09ilqKvezxh8XrI7hsGb6Meh0T+YcZdmXdJK X-Received: by 2002:a17:906:3e4e:: with SMTP id t14mr4431469eji.242.1602768265140; Thu, 15 Oct 2020 06:24:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602768265; cv=none; d=google.com; s=arc-20160816; b=yhl7H3cVN02h+uPyxQW0A+So2R99fDLQLgUMtofZqSZspz3jRfU7nDLwqh5MCE4+LX Wh7WvE4nhQr+j9s5ReKO8rFNtpdiez61o86kCosrOjgHgIgwhQk4apv6/uMsEtCSdxVy 3ZpEfEfjONkbklzMvkKBqwBx9QGeQbUGgIl+HZjirdjz5jMwynv3X4DIX2imDLBUZb8u pxoubVGKesqsK9zSCTsBfRVZS+uOjP6vPliUkdOtnQHwcTjr1FyWs0AA+Ely313/KdfO I34DBzRhe/fhvAbqm48brbNoR4SzpCsKuG4IqWfRLRGslSEudvbNBWjHcxt1+DPdpl59 x2Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=mkA2Z/H6u7ZsAzp2sEmUmpv8BdOmK7LDFTxAywQGYSA=; b=ZjLOtrZ73u6cC1rywV62SuVqApf7KQq6qII2HHHGy9/oJVl+biG/beMXOEbqPbph2a 8jt/QdB5HuyIaYFG1pCvjGz9dH2NSA4nwgTMLo5XuTI+HZsMSFrUePqjHTRIMLUygt8L xJfGe3SuJkCO661zDSiMm9eVxkP0ToSmYFFMBiNanHBcipKpDQepeZBN492I1WEi99w5 NkTTlBmLyZQglue1f0mtGOIMiaYSa87PFwD/q1PHMdP52JPpuPL2tj8O7UfGNFIfzceo J7Eq8LrdQBVEs+0neDxZa7wczUpGMsqNZMoEQYHpDq+jWSKkuFu556eIatlwboSh5UBQ /leQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si2153674ejr.107.2020.10.15.06.23.55; Thu, 15 Oct 2020 06:24:25 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729009AbgJONSw convert rfc822-to-8bit (ORCPT + 99 others); Thu, 15 Oct 2020 09:18:52 -0400 Received: from us-smtp-delivery-44.mimecast.com ([205.139.111.44]:22484 "EHLO us-smtp-delivery-44.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728418AbgJONSw (ORCPT ); Thu, 15 Oct 2020 09:18:52 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-510-tbMKmALHMZan0v96HjDSeQ-1; Thu, 15 Oct 2020 09:18:46 -0400 X-MC-Unique: tbMKmALHMZan0v96HjDSeQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2123C18A822D; Thu, 15 Oct 2020 13:18:44 +0000 (UTC) Received: from ovpn-112-177.rdu2.redhat.com (ovpn-112-177.rdu2.redhat.com [10.10.112.177]) by smtp.corp.redhat.com (Postfix) with ESMTP id 329766EF52; Thu, 15 Oct 2020 13:18:36 +0000 (UTC) Message-ID: Subject: Re: Unbreakable loop in fuse_fill_write_pages() From: Qian Cai To: Vivek Goyal , Miklos Szeredi Cc: Alexander Viro , Stefan Hajnoczi , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, virtio-fs@redhat.com Date: Thu, 15 Oct 2020 09:18:36 -0400 In-Reply-To: <20201013184026.GC142988@redhat.com> References: <7d350903c2aa8f318f8441eaffafe10b7796d17b.camel@redhat.com> <20201013184026.GC142988@redhat.com> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: lca.pw Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-10-13 at 14:40 -0400, Vivek Goyal wrote: > > == the thread is stuck in the loop == > > [10813.290694] task:trinity-c33 state:D stack:25888 pid:254219 ppid: > > 87180 > > flags:0x00004004 > > [10813.292671] Call Trace: > > [10813.293379] __schedule+0x71d/0x1b50 > > [10813.294182] ? __sched_text_start+0x8/0x8 > > [10813.295146] ? mark_held_locks+0xb0/0x110 > > [10813.296117] schedule+0xbf/0x270 > > [10813.296782] ? __lock_page_killable+0x276/0x830 > > [10813.297867] io_schedule+0x17/0x60 > > [10813.298772] __lock_page_killable+0x33b/0x830 > > This seems to suggest that filemap_fault() is blocked on page lock and > is sleeping. For some reason it never wakes up. Not sure why. > > And this will be called from. > > fuse_fill_write_pages() > iov_iter_fault_in_readable() > > So fuse code will take inode_lock() and then looks like same process > is sleeping waiting on page lock. And rest of the processes get blocked > behind inode lock. > > If we are woken up (while waiting on page lock), we should make forward > progress. Question is what page it is and why the entity which is > holding lock is not releasing lock. FYI, it was mentioned that this is likely a deadlock in FUSE: https://lore.kernel.org/linux-fsdevel/CAHk-=wh9Eu-gNHzqgfvUAAiO=vJ+pWnzxkv+tX55xhGPFy+cOw@mail.gmail.com/