Skip to content

xcapture-bpf error: no member named '__state' in 'struct task_struct' #51

@kevinbin

Description

@kevinbin

[root@10-35-19-16 0xtools]# uname -a
Linux 10-35-19-16 4.18.0-305.3.1.el8.x86_64 #1 SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[root@10-35-19-16 0xtools]# cat /etc/redhat-release
CentOS Linux release 8.4.2105

[root@10-35-19-16 0xtools]# ./bin/xtop
=== [0x.tools] xtop 2.0.3 BETA by Tanel Poder. Centos Linux 8 4.18.0 x86_64
=== Loading BPF...
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:2:
In file included from include/linux/compiler_types.h:74:
include/linux/compiler-clang.h:25:9: warning: '__no_sanitize_address' macro redefined [-Wmacro-redefined]
#define __no_sanitize_address
^
include/linux/compiler-gcc.h:213:9: note: previous definition is here
#define __no_sanitize_address attribute((no_sanitize_address))
^
/virtual/main.c:173:29: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
t->state = curtask->__state;
^~~~~~~
state
include/linux/sched.h:424:18: note: 'state' declared here
volatile long state;
^
/virtual/main.c:312:37: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
unsigned int prev_state = prev->__state; // ctx->args[3] won't work in older configs due to breaking change in sched_switch tracepoint
^~~~~~~
state
include/linux/sched.h:424:18: note: 'state' declared here
volatile long state;
^
/virtual/main.c:371:31: error: no member named '__state' in 'struct task_struct'; did you mean 'state'?
t_next->state = next->__state;
^~~~~~~
state
include/linux/sched.h:424:18: note: 'state' declared here
volatile long state;
^
1 warning and 3 errors generated.
Traceback (most recent call last):
File "/root/0xtools/bin/xcapture-bpf", line 474, in
b = BPF(text= ifdef + bpf_text)
File "/usr/lib/python3.6/site-packages/bcc/init.py", line 365, in init
raise Exception("Failed to compile BPF module %s" % (src_file or ""))
Exception: Failed to compile BPF module

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions