All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: Yonghong Song <yhs@fb.com>
Cc: KP Singh <kpsingh@chromium.org>, bpf <bpf@vger.kernel.org>,
	Andrii Nakryiko <andriin@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>
Subject: Re: Failure in test_local_storage at bpf-next
Date: Tue, 6 Oct 2020 21:44:02 -0700	[thread overview]
Message-ID: <CAEf4BzZ5WOwAkfqXpJCujkrcN-8DL2UvtiNpSiELBT7z99h5cg@mail.gmail.com> (raw)
In-Reply-To: <71e1203f-5864-f86d-e587-67d92183b89b@fb.com>

On Tue, Oct 6, 2020 at 9:31 PM Yonghong Song <yhs@fb.com> wrote:
>
>
>
> On 10/6/20 6:23 PM, Andrii Nakryiko wrote:
> > On Tue, Oct 6, 2020 at 5:31 PM KP Singh <kpsingh@chromium.org> wrote:
> >>
> >> I noticed that test_local_storage is broken due to a BTF error at
> >> bpf-next [67ed375530e2 ("samples: bpf: Driver interrupt statistics in
> >> xdpsock")]
> >>
> >> ./test_progs -t test_local_storage
> >> libbpf: prog 'socket_post_create': relo #0: parsing [28] struct socket + 0:0.1 2
> >
> > This line is truncated, btw, please make sure you post the entire
> > output next time.
> >
> > But, this seems like a bug in Clang, it produced invalid access index
> > string "0:0.1", there shouldn't be any other separator except ':' in
> > those strings.
> >
> > Yonghong, can you please take a look? This seems to be a very recent
> > regression, I had to update to
> > 6c7d713cf5d9bb188f1e73452a256386f0288bf7 sha from not-too-outdated
> > version to repro this.
>
> Sorry. This indeed is a llvm regression. The guilty patch is
> https://reviews.llvm.org/D88855 which adds NPM (new pass manager)
> support for BPF. The patch just merged this morning, thanks for catching
> the bug so fast. Since NPM is not used by default and the code
> refactoring looks okay, so I did not run selftests. But, yah, it does
> change some semantics of the code...
>
> I just put a fix at https://reviews.llvm.org/D88942.
> Hopefully to merge soon.

No worries, thanks for a quick fix!

>
> >
> >> libbpf: prog 'socket_post_create': relo #0: failed to relocate: -22
> >> libbpf: failed to perform CO-RE relocations: -22
> >> libbpf: failed to load object 'local_storage'
> >> libbpf: failed to load BPF skeleton 'local_storage': -22
> >> test_test_local_storage:FAIL:skel_load lsm skeleton failed
> >>
> >> by changing it to use vmlinux.h with:
> >>
> >
> > [...]
> >
> >>
> >> clang --version
> >> clang version 12.0.0 (https://github.com/llvm/llvm-project.git
> >> 6c7d713cf5d9bb188f1e73452a256386f0288bf7)
> >> Target: x86_64-unknown-linux-gnu
> >> Thread model: posix
> >>
> >> pahole --version
> >> v1.18
> >>
> >> This error goes away if I comment out the lsm/socket_post_create or
> >> the lsm/socket_bind which makes me think that something in
> >> bpf_core_apply_relo does not like two programs in the same object
> >> having the same BTF type in its signature (but this just a guess, I
> >> did not investigate more).  I was wondering if anyone has any ideas
> >> what could be going on here.
> >>
> >> PS: While working on task local storage, I noted that some of the
> >> checks in this test were buggy and will send a patch to fix them as
> >> well.
> >>
> >> - KP

  reply	other threads:[~2020-10-07  4:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  0:27 Failure in test_local_storage at bpf-next KP Singh
2020-10-07  1:23 ` Andrii Nakryiko
2020-10-07  4:31   ` Yonghong Song
2020-10-07  4:44     ` Andrii Nakryiko [this message]
2020-10-07  5:18     ` Alexei Starovoitov
2020-10-07  5:33       ` Yonghong Song
2020-10-07 22:04         ` KP Singh
2020-10-07 22:07           ` KP Singh

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=CAEf4BzZ5WOwAkfqXpJCujkrcN-8DL2UvtiNpSiELBT7z99h5cg@mail.gmail.com \
    --to=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kpsingh@chromium.org \
    --cc=yhs@fb.com \
    /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.