Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp732303pxf; Thu, 25 Mar 2021 12:44:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvf97eh/teqt9ik+BYJgMS1A/QgTSROk9BPLoAuFovveGUm4UJUPoVz8/rtBCyvBD8dkVa X-Received: by 2002:a05:6402:30a2:: with SMTP id df2mr10770124edb.29.1616701453023; Thu, 25 Mar 2021 12:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616701453; cv=none; d=google.com; s=arc-20160816; b=JrHbm0TLOnOGsXMZMVmgAYGQc19mcmchSmyYyT3Vjfjr6XNsv+bTUmmZH3CUHTOyhA Ms6ItEMN8c4wAxoRsHgN5Fvj/Mn+dsQxhpv2QlNJXKQwm52dcId0QvpqqXwaksxNaXpp IBg64fSECWyi5zluRdSQYjCDYMxYEIjypwlXFRD8MxVCzJMiV7Fn9/UwLv7iutbFQb4Y VlOPnDWaQxdC8LqUhJE0ZerT1P2rXxKQVZzoaAOBE6fl0BeMpt/Q+Za2GMe0LKEiW63W T9DZFBEmpgEQGkGlu32gNvp0ajx/Ps8IktHTrxsrPFqjYwvxA23KENEDEQCx+M8kDho+ c21w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=inE7F0TbtrpX8JhWXnKNGugnhF2L+PECbmtt7gVIrNk=; b=JYG9tlV/mhmnVG3pdXlTn0MssdGpkpfd83eZDCe1hhS/eMe7RxDCp1V13nchNdGarI NFmyMybsbIBd14OHLJkJOTuHkr62GnYAWI58wkxTQr1XCL8utmkNfUiheLmjYYPZitr6 M8C88zB2gB0TrVjph6hSWButPQQRE2vLb92M0t2Thu69KTda+Qs/PFBIzh8lyqyJguFz idNoYsTa9xEqVyxIuH0UDX6zUJOeLYE78BnDD2pku1mU5DXJjlXiqLQ1S15J71Lh7qAI h+g78gkJQpz3TkLmagiezyxvU1WJXUopfVuJFYfjMcvkcSNPFY6g6kLX5+ZNYUTLqiOI lqrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="Mg/wYEQj"; 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 r1si4881450edp.303.2021.03.25.12.43.48; Thu, 25 Mar 2021 12:44:13 -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; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="Mg/wYEQj"; 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 S230195AbhCYTku (ORCPT + 99 others); Thu, 25 Mar 2021 15:40:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbhCYTkm (ORCPT ); Thu, 25 Mar 2021 15:40:42 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00982C06174A for ; Thu, 25 Mar 2021 12:40:41 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id z3so3052076ioc.8 for ; Thu, 25 Mar 2021 12:40:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=inE7F0TbtrpX8JhWXnKNGugnhF2L+PECbmtt7gVIrNk=; b=Mg/wYEQjME+yzX7+3mkuMjdSLrX/JGvsUCKXrIae//Ay5yL5UYIy8y9AVBv5/dcGOk uDtZzT1e10HzygsnZfrpKarfxRAOEootSTGmhvkghYKYInbwMGu8KrH3CkYTMsElNTfT IEpM0RB1CG77nBcX3WXALA1PzIrtF4mkWDtVEo2VuEq9UHXr2lJnctgyLC+49r71XQ+6 bi7iEVuDQv1fW654yjPoEo3ESfYiCBe/Re68wjyAR+ZlF3/GoiJljPZNHmPPQxgF8GkU KZAPKgKsqhLUi86ysbmFXgBTMWEa5FSENTrtDWEFRy9G8or+3/Y8z3w1beVco/3IFSWI EBbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=inE7F0TbtrpX8JhWXnKNGugnhF2L+PECbmtt7gVIrNk=; b=C+/8QqZQ+u1U+/vjyf+gFy5oprNUjWHcUw+XVOi06wCxCTR4CZXXjiu6QEOSYn+kW+ shT/cVaT8oi166HWQer59plnlGbnTtoGGRBeLwrByH7v5LfXgkvnmX9QzbDmjSQMKgvA /twH195sSNJli/IV1v+ImseUawU89Rw8xe1PK7qQ6wCRBbz7ue2CLlw6qP1QvEQH6W1a xfLa9aHSkVI06JBD+I4nSMyJofK2AVCr81cFJUCk7KgJrjG2rxw4nviit2927dJoVW4Z E8dRx74eWctRCZ9lJEjcpXTqm6YeCpRpbF1ENtRI2kwCDxqH/zClDGaDph2alyi2eBB8 Eheg== X-Gm-Message-State: AOAM531n2EAFlvD9ibNCPL13rZ8tfkx80tz9fOaR4KJJfNOXHh2X13sF iHgFrGHWWIbzkOd6gSXeCrZmYA== X-Received: by 2002:a05:6602:2048:: with SMTP id z8mr7822623iod.143.1616701235726; Thu, 25 Mar 2021 12:40:35 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id y20sm3116004ioy.10.2021.03.25.12.40.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Mar 2021 12:40:35 -0700 (PDT) Subject: Re: [PATCH 0/2] Don't show PF_IO_WORKER in /proc//task/ To: "Eric W. Biederman" Cc: io-uring@vger.kernel.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, oleg@redhat.com, metze@samba.org References: <20210325164343.807498-1-axboe@kernel.dk> From: Jens Axboe Message-ID: <5ee8ad82-e145-3ed6-1421-eede1ada0d7e@kernel.dk> Date: Thu, 25 Mar 2021 13:40:34 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/21 1:33 PM, Eric W. Biederman wrote: > Jens Axboe writes: > >> Hi, >> >> Stefan reports that attaching to a task with io_uring will leave gdb >> very confused and just repeatedly attempting to attach to the IO threads, >> even though it receives an -EPERM every time. This patchset proposes to >> skip PF_IO_WORKER threads as same_thread_group(), except for accounting >> purposes which we still desire. >> >> We also skip listing the IO threads in /proc//task/ so that gdb >> doesn't think it should stop and attach to them. This makes us consistent >> with earlier kernels, where these async threads were not related to the >> ring owning task, and hence gdb (and others) ignored them anyway. >> >> Seems to me that this is the right approach, but open to comments on if >> others agree with this. Oleg, I did see your messages as well on SIGSTOP, >> and as was discussed with Eric as well, this is something we most >> certainly can revisit. I do think that the visibility of these threads >> is a separate issue. Even with SIGSTOP implemented (which I did try as >> well), we're never going to allow ptrace attach and hence gdb would still >> be broken. Hence I'd rather treat them as separate issues to attack. > > A quick skim shows that these threads are not showing up anywhere in > proc which appears to be a problem, as it hides them from top. > > Sysadmins need the ability to dig into a system and find out where all > their cpu usage or io's have gone when there is a problem. I general I > think this argues that these threads should show up as threads of the > process so I am not even certain this is the right fix to deal with gdb. That's a good point, overall hiding was not really what I desired, just getting them out of gdb's hands. And arguably it _is_ a gdb bug, but... -- Jens Axboe