Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3707289pxb; Tue, 17 Nov 2020 01:05:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyFCTVogFMaatpIT3fUteNW35YkLQhkhSIpFgDdXvf+61PZVd2v2WJ81ZUcxsjrFrPZIw+n X-Received: by 2002:aa7:d891:: with SMTP id u17mr11008618edq.180.1605603926214; Tue, 17 Nov 2020 01:05:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605603926; cv=none; d=google.com; s=arc-20160816; b=NblXCTSsnR+mEilgeOWZEKcLf733QRo/nOmf/Zuz9aovPUUEy0oJVJHpGYdYWtmUSI XArzgzCoQExS6xETHXjSuK3tUUMPo1kzcMUfRgXiBCGOWVmqejjvQHHqgwiMRkaEdkQr Vhl71O30LYJ20uf6UxgbAbsBKkE1kQSd7IA5Ifc1Nq2tq1+R8f+xEWYkJMGkxIIXvg46 5mSTjGJAsLNJC9REwpIjl4bQpv/gRNkcY9zT1ZgAsACYwVODqsTXfDASx1D0d8JC81qE 9BOEaGrHH8vQh9VZer5OZgFOPgYGnsDsC4mlmCQxT0o3g0mzBw050z/zq1fA5sYJOyXw omeQ== 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 :user-agent:date:message-id:subject:from:cc:to; bh=NG3XtKCeAE6kVZvTJSTZXbGG8A8lfPnSBv6kpFtx9AY=; b=RXuluuiS2A7DzV4qmZzONtJ6/pyx2WIHE4J5pSoZEkJEUvRFnto8jQMBjYbCscjbJ+ nC3zQUxq9ZHPiopYE062XqzA/sXwEPzqMnhgMlOhDXKeCMWZwO/MljTz02d9EvZ4UHoe iNO2r10fImONAkL69CCd6KKT1m+iU6t8cdleS2Q7zKriWgCfrBNFWxwl8B5L3aG3mqZC 6V6UoAJm/PIwyXYSnK39e1t6FmP23JLQX5f1OT9CAzCHyL2kZRxwah48ib18C9Vz/Ncm Bm9aWMBmm9XJzLC/W+6u0toVvSmwHvnB1h7XEQAEPyvPLjuqGHKEh3e1ZWpgE8a8R1i4 sNVg== 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 be25si13657449edb.288.2020.11.17.01.05.03; Tue, 17 Nov 2020 01:05:26 -0800 (PST) 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 S1727022AbgKQJBf (ORCPT + 99 others); Tue, 17 Nov 2020 04:01:35 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8103 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726815AbgKQJBf (ORCPT ); Tue, 17 Nov 2020 04:01:35 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Cb0Kk5RJ8zLp4d; Tue, 17 Nov 2020 17:01:14 +0800 (CST) Received: from [10.174.178.136] (10.174.178.136) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Tue, 17 Nov 2020 17:01:25 +0800 To: , , CC: , , "liuzhiqiang (I)" , linfeilong , From: Haotian Li Subject: [Question] How to deal D state on request_wait_answer? Message-ID: <5ae3557a-0b87-e6c0-be41-8441026c400c@huawei.com> Date: Tue, 17 Nov 2020 17:01:25 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.178.136] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi We recently detected a bug in virtiofs. Here, we created a virtual machine as guest with Qemu and virtiofsd. We mounted virtiofs on guest, for example /home/virtiofs. Then we killed the virtiofsd in host and accessed /home/virtiofs in guest later. This casued a process with D state which could not be killed. The stack of the process as following: wait_event_interruptible [<0>] request_wait_answer+0x9d/0x210 [fuse] [<0>] __fuse_request_send+0x75/0x80 [fuse] [<0>] fuse_simple_request+0x164/0x270 [fuse] [<0>] fuse_do_getattr+0xd5/0x2a0 [fuse] [<0>] vfs_statx+0x89/0xe0 [<0>] __do_sys_newstat+0x39/0x70 [<0>] do_syscall_64+0x55/0x1c0 [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 We have no idea to deal with the bug. Here, we have some question about that: 1. Why not use timeout mechanism? 2. If timeout mechanism is used, the process will enter wait_event after wait_event_interruptible_timeout?