Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1266977rdb; Fri, 9 Feb 2024 16:22:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX6FnzUYyOWUDQgPnvBE1RrYLzOsGZ8J+3pYE3dcpFDjzKQ4JKmVOpSEoEdMNawTPOGmx++H5bfw0sP0oU/dvYi4sdLZvFnKV1rCuTheg== X-Google-Smtp-Source: AGHT+IHpJY6gvumY5K5oxLbFySFAOIWpRFhTVOR3UgfvXOLlhVWyXTLjBp8VX96mKU13Uj9Nx3h4 X-Received: by 2002:a0d:f383:0:b0:604:9c75:626f with SMTP id c125-20020a0df383000000b006049c75626fmr840262ywf.46.1707524534151; Fri, 09 Feb 2024 16:22:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707524534; cv=pass; d=google.com; s=arc-20160816; b=0UeatGhPBPEeEfcG9N2A4sYsH3+EHWdKvxUa4usogzdCtE4u7bsPi3Q+KBahmiu/w5 Mr9PjS/5qGy7wMra5eweuj9IBA8vhmryJkHUiexAEdIf+LMbQjQ7ZvbPkojO9GaijsjG PTI9O2T/cMRarWtqu4ajvzzKk60VJlt6m01JEdu918XmmVwxTG1jbP9VjKX1JC38AyYR bWBL3opuUmSEB0n0HV0ayTPkndvjLiD6fOWNus8sEDefBpnokzywg2rYnh5phD3CfU/e c8fUL5QwH84SGKa+TgiBI1UFateR8vNEWuQo4W0ElJavVL32InjEL6LxVkB1w8NXXtSp UX8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=0GER+N6at/M+itjVzqKdSOcZKhDVYgoDwe42TsTNQd0=; fh=0c6V83Y5qmmeTnbcS7DZhSXGF86q9WegOAZrcv1qWMg=; b=NkTFtbQXRASQ+jjxqxFvo1Z7a1twBky1VhQhw6/uF92r0LxPpoCHOfEPSGiOq7GrXc FuNXIteb4VeGRuRaBWdwxsesUXzmxDgeJhWvZU5/ppW46aiLP3IQPkttOSdxz52yYEO3 ynGyhMfraRPAniyBcqt4ZicJkTSThQr7hdIjqMtpz8GmWdsdfHHE6IioT76pICZi1Uv3 NiW05zH4ez7hlpv0CSWchWSC89k13R9RC+azRESk9Ty5euZu98u9iEVZFRqboU+JPw3N oB4SRd4T4jFrsHM2J3XiNRxc3E0zLqYoyeJLeg0fmM/1efjjF+NmCKl7ocVCYMDt/Vhd 3FvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUlJU4xkWriDCtgBhn5Dj6t8T0DXRPDoC1EszomCZ89GV6oz/6/p4uRGubDU5wEniAp2TjoLhWxXhEp+DDMYrz3AMzn6DfWEoBqe/y++Q== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r21-20020a05622a035500b0042c2d3bb5a9si3219374qtw.182.2024.02.09.16.22.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 16:22:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60177-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60177-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E373C1C22163 for ; Sat, 10 Feb 2024 00:22:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD4F4110A; Sat, 10 Feb 2024 00:22:05 +0000 (UTC) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) (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 E8D44366; Sat, 10 Feb 2024 00:22:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707524525; cv=none; b=jLQz7BJ64ZAoQjwwW8LfsrrISstx9GXRhu5Kd5tz1nawNe2gpEgZPYHEDD4eFqEHvmzvWhqjMiC6p6N/+0UQXXkMT1PWWty2m7SkNCrTwgrbG+cq+AKNT63T5zNBhcIe/HTOJDNk/1UsEu/YVk5dy2LYERgg1zuJbxcocnF66Co= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707524525; c=relaxed/simple; bh=p4HJtbC7sr9+mRbDPyd1tVdbBoNEAVlwdpQ81uwZGkU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=mZfRnmRn4GV4SZrNHxlBgIHbvFOuXGG2y1tnu+YwziQsMiPsVs39qtfZ4pdCF+HKc/lV6MzFKM3G1pa8Dkm/k7InhdbZv97dLh8BgS6Hj63ZV1dJemcZw2sHUzqlJ8S6DNGjZ/i6UA48D4dhz7YrbZz5L8aFDnfluk2YPOzyv6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.216.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f46.google.com with SMTP id 98e67ed59e1d1-2970f940b7cso568132a91.2; Fri, 09 Feb 2024 16:22:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707524523; x=1708129323; h=content-transfer-encoding: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=0GER+N6at/M+itjVzqKdSOcZKhDVYgoDwe42TsTNQd0=; b=cCKia8xDGg+YbGEj4TkMQu/a0EqZ4QIlpEn2Tu8jGXBbHtvpVNIItYgcly6ji4aOij OF0AwJ3oWqeUuf1CGQ36QIciocsa37IwNRYjVcDtAeok7mI77lOBihzzl8x8AIJ9Pj0A Q1LVzBaMQT6b5ehBCnp2zYpKd+CTt268PyPogd0Rk0SrbTistRlLRX8RkdbcQe39s8TU Nu3PbVlz2Fuq/cdd21hh3vWbp5N0lpQv9uE2UogIgfF1wdYpBArO3d5Tymh9JzU4qk5/ bxnA65stUTCRgh7UN1cZzGwy7pcUXt0PQ1wZVM2kej+vey6az7aNcOwan5pKM0vlSfRZ mXwg== X-Forwarded-Encrypted: i=1; AJvYcCXbJBNv6A8Hb7Dwicbz2JBNnAv4xt4xOTWYjMsxzhDs54Wan+LyaHNTTjIdh3ZS8r8q4Yyr9nSzJUyh9kfQejmisyY6GRT6OB3yO5Tsz/NyiFJxNu4kwV0rRrAW87m53dqAfcMdb13UAC2U3aFd/w== X-Gm-Message-State: AOJu0YwLo0sqN8bFBdY7MRNb5Xvvgu0SIt+helLTWWuVZrdgBGOGPKS0 0dHfLfDRWQOD8pCrTOkYRk0RdosEE6b5Qj8oEuhE3j/Xjb6AYJzncHV0/XgdWqmUWcn966AzcS5 rsBD54VY4xJc510DrvKImh35H8aA= X-Received: by 2002:a17:90b:380e:b0:296:43a:932e with SMTP id mq14-20020a17090b380e00b00296043a932emr712507pjb.7.1707524523094; Fri, 09 Feb 2024 16:22:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240201001504.1348511-1-irogers@google.com> <20240201001504.1348511-8-irogers@google.com> In-Reply-To: <20240201001504.1348511-8-irogers@google.com> From: Namhyung Kim Date: Fri, 9 Feb 2024 16:21:51 -0800 Message-ID: Subject: Re: [PATCH v2 8/9] perf srcline: Add missed addr2line closes To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , Ravi Bangoria , James Clark , Kan Liang , John Garry , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Jan 31, 2024 at 4:15=E2=80=AFPM Ian Rogers wro= te: > > The child_process for addr2line sets in and out to -1 so that pipes > get created. It is the caller's responsibility to close the pipes, > finish_command doesn't do it. Add the missed closes. > > Fixes: b3801e791231 ("perf srcline: Simplify addr2line subprocess") > Signed-off-by: Ian Rogers > --- > tools/perf/util/srcline.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c > index 034b496df297..7addc34afcf5 100644 > --- a/tools/perf/util/srcline.c > +++ b/tools/perf/util/srcline.c > @@ -399,6 +399,8 @@ static void addr2line_subprocess_cleanup(struct child= _process *a2l) > kill(a2l->pid, SIGKILL); > finish_command(a2l); /* ignore result, we don't care */ > a2l->pid =3D -1; > + close(a2l->in); > + close(a2l->out); I was about to ask the stderr, but addr2line_subprocess_init() sets a2l->no_stderr already. I wish it could be handled in finish_command() but it seems the API allows setting external file descriptors (before calling start_command). Hmm.. Anyway it looks like an independent fix. Thanks, Namhyung > } > > free(a2l); > -- > 2.43.0.429.g432eaa2c6b-goog >