Received: by 2002:ab2:6f44:0:b0:1fd:c486:4f03 with SMTP id l4csp229244lqq; Thu, 13 Jun 2024 00:59:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXFVC1il7GjnvEJIpJJNVEF5eo64/myRL25gcC0Zp5kIMysC1MEuJ8SmQ2MFi3Bzi+OeOmU0sroXo57v63UCiQxkPkAHx/QpUp8ZRlRbg== X-Google-Smtp-Source: AGHT+IECvzK9iyJDLqgxslykZMbZTO9wkqQ/KDCIF8gh02+S3ZfNy59MHWUS6hoTzmkN5Ixn9ruu X-Received: by 2002:a17:902:e74b:b0:1f7:2739:36f5 with SMTP id d9443c01a7336-1f83b5f3fa4mr54325995ad.26.1718265570723; Thu, 13 Jun 2024 00:59:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718265570; cv=pass; d=google.com; s=arc-20160816; b=U6Sl+t5K35aa/ZwR6DtFbAa4rz0YGwbLWH6oImWvuaxDhed0BRWgR34YIVtOQyw4xf 3I9rqxuZwILp+2qISolkh4pHsgWROxyefPCd9QqiBRJHS/LgjedG/gg8j4h1mvJoMv+1 WihN9qpXN8pjSw131A5kgkJ0IK8kuSnnUFR5H+jOq8XeoULPYxMfET++NXZhxpOtbkLI hvpe8gp6DUMIxea0amX0GS6Yq0e1EPzqtxDbZO2WHHLDgA6yiIHOymSSIySwxbEIfGzT lQ1hZrbRFbuENHq7vEUodZ5TlPGN5569AuMiDqxK3MGkSBN6QRAgZ3aarQRWorspXjrF 6uig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=VwSchH8vw115gFFiyiM0sISl9GzhL9ClIo782HZvRYc=; fh=B9s+/DSxGXFT9+pXgQ8TuUkqWvVAiZAH+4Qe667+XtI=; b=tFrHYFsxdd7nEDPL8uJD3ayRN3y2llfm8oGw+87XyqTc10oiLGyrCk0bogS184Dihz 7q3OJK7VmMZZ6EATLbHtc1q+vnmWobyOKz0LflTw08bG6atj/o56lYJjFAJIERlZu3+K 4csq+k64SM/1iJ2RZoJr0XzUjKEi8qEtXxEPVANaxh/3DwLKdinJr07Quvm+80qX/I2S SxIxiAIsYYYnwrt5/oPac2WZc8RQideDvbbR3iDZAhU6yoUYiUMt4DUa87gnHMgNWJ5j 8zm8/S2Foa+GXs1z5pj0mW/VnZ6lIlIVZ1U6cj8WFzI2DIIb6CcoI9HYol6qEEf5pcPs l9sQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b="Dx69/VWi"; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-212758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f855ee5271si8004145ad.348.2024.06.13.00.59.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 00:59:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b="Dx69/VWi"; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-212758-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212758-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id D53AFB21523 for ; Thu, 13 Jun 2024 07:56:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 60CFC13D284; Thu, 13 Jun 2024 07:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="Dx69/VWi" Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B976013D244 for ; Thu, 13 Jun 2024 07:56:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718265363; cv=none; b=IK1olYZCoexNN7tTz57SGlDZv79Cim8zBOuOWNXrAxhfZm/e8ZAUYyY0yzhEQZDovRoMBFK4gI6lkRf4YiQFRdXUOsP46NJkkdn9nyikmh/EXUpbUyQMyu+J4QZRw06lMeBadjrCUZjE1fNTAeB/YwTrwWTdYuhQ/8E2QIPIGho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718265363; c=relaxed/simple; bh=VwSchH8vw115gFFiyiM0sISl9GzhL9ClIo782HZvRYc=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=I60ddzP+QJdUQouHZelhbwp1ApwD3SDtpVLyKxLae60nj9jOoN//yRsA0QSIQi/5rg3Xrlrwcu55RbeDKTfppPjxcTE854NvPOMb9XN7ytZU4ct6ukzj8Ub24b6K/18rFK3C+qqZMNiGCgaA8bwYllCoCGgMBLEimAGM2cuV99A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=Dx69/VWi; arc=none smtp.client-ip=209.85.218.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a6266ffdba8so69717066b.1 for ; Thu, 13 Jun 2024 00:56:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1718265359; x=1718870159; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VwSchH8vw115gFFiyiM0sISl9GzhL9ClIo782HZvRYc=; b=Dx69/VWibJWW4zZhdTKxPJZrAJIyuvG/fSV55OgHm8s1zdr/heWBEEE65fYh0h6EbS IKwEEjiokYtcr5aiPIUWygE/u/m0FUvfhu+2x/YQCgS8eHFwz8h0nMmja61FtF/7AdA5 3o35KtByhGUe1elrIcM9SPespGkuQJwTKaNtI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718265359; x=1718870159; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VwSchH8vw115gFFiyiM0sISl9GzhL9ClIo782HZvRYc=; b=nuKUFgvi14Rz8lYqaC72iWTJ3Kv1NvHx5nN0C+gmIfAbXD3vruoi6VzcaUgfZGCLFc XxZjEjMsc/37g3U6WtL6JaAmEtpv+IY8GmXERRu55oabKe2colkyo58BsqmJAFTs8DJP jg50xvqlcZZUn40m2yaUGnH6OyY3PVXzvlmfJdbWUivV/lkgQUOAFyIfbRJhPAN3xM9K GtIFhJZsSRzVFvf2z47TEYhvisW1EcER92e3w3+82ZSukVlX+qGtTSiPHF17JDmQsQj6 WChF6+DwzTVohIB989ILlYUB3kjoXPrPYSVpQRpAHFE/zRU4OgR96WOBvR8V9L9djeUI bO2A== X-Forwarded-Encrypted: i=1; AJvYcCUi9ydC2VBvW0ARqiSJtJCZwan0MwvjhWlYAAx4B/6/+cTXNgVLMIT1ABWTk/Sy/r72EclapTIqVw0B9oJHbcomHwJUp28utoMhPLmf X-Gm-Message-State: AOJu0YxOQAYyhhLfCzOmOGLxDO/ZeUcYAObout5dOtxC4xMlmMuoHMTc E1/Bw06GZeTNnIBhI4y5kKhTGo7/dknFsmsSLgBVSj6OCee/r3SeWRniTgq+LNPv3V2B86e3cGs uvEF8nfEJNaRXtyMBzAQP3F0+ZkVj+emqoOWKAkTOIwVJq1Tl X-Received: by 2002:a17:907:9445:b0:a6e:f869:dfcd with SMTP id a640c23a62f3a-a6f47f52d65mr309255266b.6.1718265358828; Thu, 13 Jun 2024 00:55:58 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240613040147.329220-1-haifeng.xu@shopee.com> In-Reply-To: <20240613040147.329220-1-haifeng.xu@shopee.com> From: Miklos Szeredi Date: Thu, 13 Jun 2024 09:55:47 +0200 Message-ID: Subject: Re: [RFC] fuse: do not generate interrupt requests for fatal signals To: Haifeng Xu Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Thu, 13 Jun 2024 at 06:02, Haifeng Xu wrote: > > When the child reaper of a pid namespace exits, it invokes > zap_pid_ns_processes() to send SIGKILL to all processes in the > namespace and wait them exit. But one of the child processes get > stuck and its call trace like this: > > [<0>] request_wait_answer+0x132/0x210 [fuse] > [<0>] fuse_simple_request+0x1a8/0x2e0 [fuse] > [<0>] fuse_flush+0x193/0x1d0 [fuse] > [<0>] filp_close+0x34/0x70 > [<0>] close_fd+0x38/0x50 > [<0>] __x64_sys_close+0x12/0x40 > [<0>] do_syscall_64+0x59/0xc0 > [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xae Which process is this? In my experience such lockups are caused by badly written fuse servers. > The flags of fuse request is (FR_ISREPLY | FR_FORCE | FR_WAITING > | FR_INTERRUPTED | FR_SENT). For interrupt requests, fuse_dev_do_write() > doesn't invoke fuse_request_end() to wake the client thread, so it will > get stuck forever and the child reaper can't exit. > > In order to write reply to the client thread and make it exit the > namespace, so do not generate interrupt requests for fatal signals. Interrupt request must be generated for all signals. Not generating them for SIGKILL would break existing filesystems. Thanks, Miklos