From: Yonghong Song <yonghong.song@linux.dev>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf <bpf@vger.kernel.org>, Eddy Z <eddyz87@gmail.com>,
Alexei Starovoitov <ast@kernel.org>
Subject: Re: FYI: bpf selftest verif_scale_strobemeta_subprogs failed with latest llvm19
Date: Mon, 5 Feb 2024 22:47:51 -0800 [thread overview]
Message-ID: <39e2ec12-0f38-4fec-90e8-a4e3d6b56a52@linux.dev> (raw)
In-Reply-To: <CAEf4BzZ9L9kUz--+K=D7CubSG8xWCxuw1R6tWxFC=93VbZ4ZUw@mail.gmail.com>
On 2/5/24 11:30 AM, Andrii Nakryiko wrote:
> On Sun, Feb 4, 2024 at 10:58 PM Yonghong Song <yonghong.song@linux.dev> wrote:
>> The selftest verif_scale_strobemeta_subprogs failed with latest llvm19 compiler.
>> For example,
>>
>> $ ./test_progs -n 498
>> ...
>> libbpf: prog 'on_event': BPF program load failed: Permission denied
>> libbpf: prog 'on_event': -- BEGIN PROG LOAD LOG --
>> combined stack size of 4 calls is 544. Too large
>> verification time 1417195 usec
>> stack depth 24+440+0+32
> Is it a `struct strobe_map_raw map` in read_map_var()? I think we
> should move it to a per-cpu array anyways (not saying we shouldn't fix
> Clang regression), in production we've done this already a while ago
> :)
Yes, moving 'struct strobe_map_raw map' to be a global variable
does work. I just sent a kernel patch to reduce the stack requirement
for jitted code, which fixed this regression.
https://lore.kernel.org/bpf/20240206063010.1352503-1-yonghong.song@linux.dev/
But let us keep the code as is for now, so we could use it to capture future
potential clang regressions.
>
>> processed 53561 insns (limit 1000000) max_states_per_insn 18 total_states 1457 peak_states 308 mark_read 146
>> -- END PROG LOAD LOG --
>> libbpf: prog 'on_event': failed to load: -13
>> libbpf: failed to load object 'strobemeta_subprogs.bpf.o'
>> scale_test:FAIL:expect_success unexpected error: -13 (errno 13)
>> #498 verif_scale_strobemeta_subprogs:FAIL
>> Summary: 0/0 PASSED, 0 SKIPPED, 1 FAILED
>>
>> The maximum stack size exceeded 512 bytes and caused verification failure.
>>
>> The following llvm patch caused the above regression:
>> https://github.com/llvm/llvm-project/pull/68882
>>
>> I will do some analysis and try to find a solution to resolve this failure.
>>
>> Thanks,
>>
>> Yonghong
>>
>>
prev parent reply other threads:[~2024-02-06 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-05 6:57 FYI: bpf selftest verif_scale_strobemeta_subprogs failed with latest llvm19 Yonghong Song
2024-02-05 19:30 ` Andrii Nakryiko
2024-02-06 6:47 ` Yonghong Song [this message]
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=39e2ec12-0f38-4fec-90e8-a4e3d6b56a52@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=eddyz87@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox