From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: Re: linux-next: build failure after merge of the perf tree
Date: Fri, 23 Feb 2024 16:50:47 -0300 [thread overview]
Message-ID: <Zdj3FyPjE5ezyfsM@x1> (raw)
In-Reply-To: <20240222100656.0a644254@canb.auug.org.au>
On Thu, Feb 22, 2024 at 10:06:56AM +1100, Stephen Rothwell wrote:
> Hi all,
>
> After merging the perf tree, today's linux-next build (native perf)
> failed like this:
>
> util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid application of 'sizeof' to an incomplete type 'struct timespec64'
> __u32 size = sizeof(struct timespec64);
> ^ ~~~~~~~~~~~~~~~~~~~
> util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declaration of 'struct timespec64'
> __u32 size = sizeof(struct timespec64);
> ^
>
> Caused by commit
>
> 29d16de26df1 ("perf augmented_raw_syscalls.bpf: Move 'struct timespec64' to vmlinux.h")
>
> This is a ppc64 le build.
>
> I have used the perf tree from next-20240221 for today.
Ok, finally I managed to secure a ppc64 machine to test this and
sometimes I reproduce just like you reported, but sometimes I can't do
it, didn't manage to isolate what is that makes it fail sometimes, make
-C tools/perf clean, nuking the O= target directory, etc, when I
reproduce it:
GENSKEL /tmp/build/perf-tools-next/util/bpf_skel/lock_contention.skel.h
util/bpf_skel/augmented_raw_syscalls.bpf.c:329:15: error: invalid application of 'sizeof' to an incomplete type 'struct timespec64'
329 | __u32 size = sizeof(struct timespec64);
| ^ ~~~~~~~~~~~~~~~~~~~
util/bpf_skel/augmented_raw_syscalls.bpf.c:329:29: note: forward declaration of 'struct timespec64'
329 | __u32 size = sizeof(struct timespec64);
| ^
1 error generated.
make[2]: *** [Makefile.perf:1161: /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile.perf:264: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf'
$ cat /etc/redhat-release
Red Hat Enterprise Linux release 9.5 Beta (Plow)
$
Linux host 5.14.0-425.el9.ppc64le #1 SMP Wed Feb 21 15:29:04 EST 2024 ppc64le ppc64le ppc64le GNU/Linux
$ clang -v
clang version 17.0.6 (Red Hat, Inc. 17.0.6-5.el9)
Target: ppc64le-redhat-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /opt/rh/gcc-toolset-13/root/usr/lib/gcc/ppc64le-redhat-linux/13
Selected GCC installation: /opt/rh/gcc-toolset-13/root/usr/lib/gcc/ppc64le-redhat-linux/13
Candidate multilib: .;@m64
Selected multilib: .;@m64
But this is an elusive bug, its not always that it fails :-\
$ git log --oneline -1
659663f0bccc (HEAD -> perf-tools-next, perf-tools-next/perf-tools-next) perf: script: prefer capstone to XED
$ file /tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o
/tmp/build/perf-tools-next/util/bpf_skel/.tmp/augmented_raw_syscalls.bpf.o: ELF 64-bit LSB relocatable, eBPF, version 1 (SYSV), with debug_info, not stripped
$
That "incomplete" type is defined in:
$ grep timespec64 -B10 -A3 tools/perf/util/bpf_skel/vmlinux/vmlinux.h
typedef __u8 u8;
typedef __u32 u32;
typedef __u64 u64;
typedef __s64 s64;
typedef int pid_t;
typedef __s64 time64_t;
struct timespec64 {
time64_t tv_sec;
long int tv_nsec;
};
$
But it is used only on this sizeof expression, that is used only by
clang and for the BPF target...
$ grep timespec64 tools/perf/util/bpf_skel/augmented_raw_syscalls.bpf.c
__u32 size = sizeof(struct timespec64);
$
Stephen, can you try to reproduce this again? And if it fails, try
reproducing that 'sizeof(struct timespec64)' with 16, which is, in
ppc64:
$ uname -m
ppc64le
$ pahole timespec64
struct timespec64 {
time64_t tv_sec; /* 0 8 */
long int tv_nsec; /* 8 8 */
/* size: 16, cachelines: 1, members: 2 */
/* last cacheline: 16 bytes */
};
$
And on x86_64:
acme@x1:~$ uname -m
x86_64
acme@x1:~$ pahole timespec64
struct timespec64 {
time64_t tv_sec; /* 0 8 */
long int tv_nsec; /* 8 8 */
/* size: 16, cachelines: 1, members: 2 */
/* last cacheline: 16 bytes */
};
acme@x1:~$
- Arnaldo
next prev parent reply other threads:[~2024-02-23 19:50 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 23:06 linux-next: build failure after merge of the perf tree Stephen Rothwell
2024-02-23 19:50 ` Arnaldo Carvalho de Melo [this message]
2024-02-23 20:11 ` [solved] " Arnaldo Carvalho de Melo
2024-02-23 20:34 ` Namhyung Kim
2024-02-24 15:05 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2025-03-26 23:22 Stephen Rothwell
2025-03-28 6:40 ` Namhyung Kim
2025-02-14 4:20 Stephen Rothwell
2025-01-09 23:05 Stephen Rothwell
2025-01-09 23:31 ` Charlie Jenkins
2025-01-10 14:01 ` Arnaldo Carvalho de Melo
2025-01-10 17:32 ` Arnaldo Carvalho de Melo
2025-01-10 18:59 ` Charlie Jenkins
2025-01-10 19:22 ` Charlie Jenkins
2024-10-10 23:23 Stephen Rothwell
2024-09-05 1:55 Stephen Rothwell
2024-04-01 22:41 Stephen Rothwell
2024-04-02 20:17 ` Arnaldo Carvalho de Melo
2024-04-12 15:22 ` Arnaldo Carvalho de Melo
2024-04-13 2:43 ` Stephen Rothwell
2024-03-21 21:41 Stephen Rothwell
2024-03-21 23:18 ` Arnaldo Carvalho de Melo
2024-03-21 23:19 ` Arnaldo Carvalho de Melo
2024-03-21 23:32 ` Stephen Rothwell
2024-03-22 2:13 ` Stephen Rothwell
2024-03-22 14:32 ` Arnaldo Carvalho de Melo
2024-03-21 23:36 ` Stephen Rothwell
2024-03-21 23:40 ` arnaldo.melo
2024-03-21 23:48 ` Arnaldo Carvalho de Melo
2024-02-06 23:40 Stephen Rothwell
2024-02-07 0:02 ` Ian Rogers
2023-10-24 23:26 Stephen Rothwell
2023-10-25 0:34 ` Namhyung Kim
2023-05-29 23:05 Stephen Rothwell
2023-05-30 2:16 ` Ian Rogers
2023-03-16 22:50 Stephen Rothwell
2023-03-16 23:11 ` Arnaldo Carvalho de Melo
2023-03-16 23:55 ` Stephen Rothwell
2023-03-17 3:23 ` Ian Rogers
2023-03-21 21:39 ` Stephen Rothwell
2023-03-22 18:37 ` Ian Rogers
2023-03-22 22:54 ` Stephen Rothwell
2023-03-23 13:27 ` Arnaldo Carvalho de Melo
2023-03-27 20:31 ` Ian Rogers
2023-03-28 1:33 ` Stephen Rothwell
2023-03-28 19:47 ` Arnaldo Carvalho de Melo
2023-03-28 23:06 ` Stephen Rothwell
2023-03-29 12:28 ` Arnaldo Carvalho de Melo
2023-04-03 5:15 ` Stephen Rothwell
2022-08-30 22:34 Stephen Rothwell
2022-09-01 5:11 ` Anshuman Khandual
2022-09-06 19:05 ` Stephen Rothwell
2022-09-07 2:31 ` Anshuman Khandual
2022-09-07 3:00 ` Stephen Rothwell
2022-09-07 4:22 ` Anshuman Khandual
2022-09-08 15:21 ` Arnaldo Carvalho de Melo
2022-07-20 23:05 Stephen Rothwell
2022-07-21 2:35 ` Ian Rogers
2022-07-21 3:55 ` Stephen Rothwell
2022-07-21 5:33 ` Ian Rogers
2022-01-05 22:19 Stephen Rothwell
2022-01-07 8:58 ` kajoljain
2022-01-11 21:45 ` Stephen Rothwell
2022-01-11 22:01 ` Arnaldo Carvalho de Melo
2022-01-12 5:30 ` kajoljain
2022-01-12 6:16 ` Stephen Rothwell
2022-01-14 12:03 ` Michael Ellerman
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=Zdj3FyPjE5ezyfsM@x1 \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=arnaldo.melo@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).