Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4722940ybv; Tue, 11 Feb 2020 02:07:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxnNNnYOOa3Q3il2nk3ceQx+/P9uIJSsQPxo5t03TYN3BmOUJ2o3Bop4E0FjXoMTMzNwlJV X-Received: by 2002:a05:6830:1e30:: with SMTP id t16mr4636517otr.220.1581415644050; Tue, 11 Feb 2020 02:07:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581415644; cv=none; d=google.com; s=arc-20160816; b=ttdoY/boB27xA1bzXHVAdS068WjgqAGAsWZP5YKcrZJ4BZb1YwMr71ljSqUNDAz83g DSxCY/+7tOUF6imNuP21PiJYXUipG/8vJmWAUidEZyjmsaxYL7Nhh9wNn2owuZHf2BWK Ob9E8TaARv7uUYzDKus5hC4vqfeMKmppR8CVASdA+2Jora7xYVIdPDpAZObFevd56Zw1 OdO8gXiAGyjRmk1+eVob09JuUYFpSaxaFQws86mmKtdC0kut5A79STwH12F0xFJnUFvh VUfilKJWnMTggHvll10FP2MtgPzr6G/MQTKmbyfYYLVKSBZA1P1lV9wTUtF4tNrRlnlW UKyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FhWcZb4/vDUUKrqNOiBWVX9k45dIhS2uPcoT5/+VJdk=; b=pvGSWNDLezzT+xmL7WYrukS4rrYLrp9LBvM9R02xRqShQDDAzXPoZlQ+2JFeokZ3HI IvPq5KTZQPr/nKMPEtFUofHIDJ/VQs9h1PG+m1OuHke+BILbAaV+BDSYeHr69cvXjBXZ 5G2RQt9sBV9sEIS0yHPMZsWrrL7w0PXrweQDBnkGQ2+gmUAs7aVMCv/9siONnI1pxU9D CBoEmHVoWRWGKZZjpOIMJslrSfVHZih3hWdTFU4rOvJtOohAka62EScVhBBIigCyPFRo j1pATREE2ub0kM87MmtQ6AIDWy4uBIrahoXdMrHndRGiAxKcya4s5aSGIp6d4MxkwT45 aFzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=qftOSpm6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b126si1605361oii.72.2020.02.11.02.07.11; Tue, 11 Feb 2020 02:07:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cloudflare.com header.s=google header.b=qftOSpm6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cloudflare.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728091AbgBKKGq (ORCPT + 99 others); Tue, 11 Feb 2020 05:06:46 -0500 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43978 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727264AbgBKKGq (ORCPT ); Tue, 11 Feb 2020 05:06:46 -0500 Received: by mail-qt1-f196.google.com with SMTP id d18so7457226qtj.10 for ; Tue, 11 Feb 2020 02:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FhWcZb4/vDUUKrqNOiBWVX9k45dIhS2uPcoT5/+VJdk=; b=qftOSpm6devyYeZL7hFoKhny/GyTfM7ivFBXO4L4B35swa60u8djtiglSUOK6b0t0+ g96TifieG5DdeZcPGgGKcw7FLIKGJ9eTpvVmrffsOM0SNGYTVnDlrm+idu+hURZbSCTL bJR27nkFP6K7egNCl0UO6RdRXTq8daK9x2C10= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FhWcZb4/vDUUKrqNOiBWVX9k45dIhS2uPcoT5/+VJdk=; b=CWztYAZXCgqhNzHJ8Qeyfk5odE1urDz4Pdzfwqmoc0QOByoJPflwVGroGJbAfd4UDH PCtJWr/tRXGe9Co8tHsDaNz+jXjE/uKwZ0qc06dI9rRcOT/yC55CxfB7wUqOEJJ3dKSc hf+WUogG963X68NskxqqZuoYPW2vjnKAf+BhZm0fTSk4PmQxiIpwjyCzSLU6MIu0g2hu Y5cGIPY4GkeBSc3OWJSSvUxuhn6iDCwCjZIdL1e/DPws04ZRxtZtFEbF+ba4k2BQiYzX kp4juT1JyV9OimR7K0koK1bvj0xSJ/NzJa9O8DuVg6Ohj/5648PH7ObYhYfpv3+DaXJM QZCw== X-Gm-Message-State: APjAAAWnQDQr/SorjaIvFuGVkUYCP0KfNftJg7aF55JXkRoi2foSem9F ahwU9l9+ojl1PwibykhNzZqUmC8kzcSfAAPGRlDoDQ== X-Received: by 2002:ac8:8d6:: with SMTP id y22mr1583188qth.85.1581415603366; Tue, 11 Feb 2020 02:06:43 -0800 (PST) MIME-Version: 1.0 References: <20191205123302.GA25750@kernel.org> <20200204192657.GB1554679@krava> In-Reply-To: <20200204192657.GB1554679@krava> From: Marek Majkowski Date: Tue, 11 Feb 2020 10:06:35 +0000 Message-ID: Subject: Re: perf not picking up symbols for namespaced processes To: Jiri Olsa Cc: Ivan Babrou , kernel-team , Arnaldo Carvalho de Melo , linux-kernel , Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Namhyung Kim , sashal@kernel.org, Kenton Varda Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jirka, On Tue, Feb 4, 2020 at 7:27 PM Jiri Olsa wrote: > > 11913 openat(AT_FDCWD, "/proc/9512/ns/mnt", O_RDONLY) = 197 > > 11913 setns(197, CLONE_NEWNS) = 0 > > 11913 stat("/home/marek/bin/runsc-debug", 0x7fffffff8480) = -1 ENOENT > > (No such file or directory) > > 11913 setns(196, CLONE_NEWNS) = 0 > > hi, > could you guys please share more details on what you run exactly, > and perhaps that change you mentioned? I was debugging gvisor (runsc), which does execve(/proc/self/exe), and then messes up with its mount namespace. The effect is that the binary running doesn't exist in the mount namespace. This confuses perf, which fails to load symbols for that process. To my understanding, by default, perf looks for the binary in the process mount namespace. In this case clearly the binary wasn't there. Ivan wrote a rough patch [1], which I just confirmed works. The patch attempts, after a failure to load binary from pids mount namespace, to load binary from the default mount namespace (the one running perf). [1] https://lkml.org/lkml/2019/12/5/878 Marek