All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Marek Majkowski <marek@cloudflare.com>
Cc: Jiri Olsa <jolsa@redhat.com>, Ivan Babrou <ivan@cloudflare.com>,
	kernel-team <kernel-team@cloudflare.com>,
	Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Namhyung Kim <namhyung@kernel.org>,
	sashal@kernel.org, Kenton Varda <kenton@cloudflare.com>
Subject: Re: perf not picking up symbols for namespaced processes
Date: Tue, 11 Feb 2020 10:46:24 -0300	[thread overview]
Message-ID: <20200211134624.GA32066@kernel.org> (raw)
In-Reply-To: <CAJPywTKuu+RPsspAT4Z_243KvtchTe7p7c4DpvG07Nv5A67fnw@mail.gmail.com>

Em Tue, Feb 11, 2020 at 10:06:35AM +0000, Marek Majkowski escreveu:
> Jirka,
> 
> On Tue, Feb 4, 2020 at 7:27 PM Jiri Olsa <jolsa@redhat.com> 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

That is a fallback that works in this specific case, and, with a warning
or some explicitely specified option makes perf work with this specific
usecase, but either a warning ("fallback to root namespace binary
/foo/bar") or the explicit option, please, is that what that patch does?

- Arnaldo

  reply	other threads:[~2020-02-11 13:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05  3:46 perf not picking up symbols for namespaced processes Ivan Babrou
2019-12-05 12:33 ` Arnaldo Carvalho de Melo
2019-12-06  2:17   ` Ivan Babrou
2020-02-04 15:09     ` Marek Majkowski
2020-02-04 19:26       ` Jiri Olsa
2020-02-11 10:06         ` Marek Majkowski
2020-02-11 13:46           ` Arnaldo Carvalho de Melo [this message]
2020-02-11 13:54             ` Marek Majkowski
2020-02-11 14:28               ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200211134624.GA32066@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=ivan@cloudflare.com \
    --cc=jolsa@redhat.com \
    --cc=kenton@cloudflare.com \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marek@cloudflare.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sashal@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.