iovisor / iovisor/bcc

wqlat.py fails for 6.7 kernel with -w workqueue selection

Open
#4,909 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Linux remerge 6.7.0 #2 SMP PREEMPT_DYNAMIC Sun Jan 28 10:05:56 PST 2024 x86_64 GNU/Linux
Kernel compiled from commit v6.7. Kconfig is attached; most unusual change is NR_CPUS=8
[6.7-Kconfig.txt](https://github.com/iovisor/bcc/files/14275188/6.7-Kconfig.txt)

wqlat works fine with no flags:
```
alison@remerge:~/gitsrc/bcc$ sudo python3 tools/wqlat.py -T -W 1 2
In file included from /virtual/main.c:2:
In file included from include/uapi/linux/ptrace.h:183:
In file included from arch/x86/include/asm/ptrace.h:5:
In file included from arch/x86/include/asm/segment.h:7:
arch/x86/include/asm/ibt.h:77:8: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]
extern __noendbr u64 ibt_save(bool disable);
^
arch/x86/include/asm/ibt.h:32:34: note: expanded from macro '__noendbr'
#define __noendbr __attribute__((nocf_check))
^
arch/x86/include/asm/ibt.h:78:8: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]
extern __noendbr void ibt_restore(u64 save);
^
arch/x86/include/asm/ibt.h:32:34: note: expanded from macro '__noendbr'
#define __noendbr __attribute__((nocf_check))
^
2 warnings generated.
Tracing work queue request latency time... Hit Ctrl-C to end.

20:16:59

wqname = events_unbound
usecs : count distribution
0 -> 1 : 0 | |
2 -> 3 : 1 |******************** |
4 -> 7 : 0 | |
8 -> 15 : 1 |******************** |
16 -> 31 : 0 | |
32 -> 63 : 0 | |
64 -> 127 : 2 |****************************************|
```
It fails to load the bytecode with -w no matter which workqueue is designated:
```
alison@remerge:~/gitsrc/bcc$ sudo python3 tools/wqlat.py -w nvmet_tcp_wq 1
In file included from /virtual/main.c:2:
In file included from include/uapi/linux/ptrace.h:183:
In file included from arch/x86/include/asm/ptrace.h:5:
In file included from arch/x86/include/asm/segment.h:7:
arch/x86/include/asm/ibt.h:77:8: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]
extern __noendbr u64 ibt_save(bool disable);
^
arch/x86/include/asm/ibt.h:32:34: note: expanded from macro '__noendbr'
#define __noendbr __attribute__((nocf_check))
^
arch/x86/include/asm/ibt.h:78:8: warning: 'nocf_check' attribute ignored; use -fcf-protection to enable the attribute [-Wignored-attributes]
extern __noendbr void ibt_restore(u64 save);
^
arch/x86/include/asm/ibt.h:32:34: note: expanded from macro '__noendbr'
#define __noendbr __attribute__((nocf_check))
^
2 warnings generated.
bpf: Failed to load program: Invalid argument
jump out of range from insn 18 to 32683
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0

Traceback (most recent call last):
File "/home/alison/gitsrc/bcc/tools/wqlat.py", line 161, in
b = BPF(text=bpf_text)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 487, in __init__
self._trace_autoload()
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 1465, in _trace_autoload
fn = self.load_func(func_name, BPF.TRACEPOINT)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 526, in load_func
raise Exception("Failed to load BPF program %s: %s" %
Exception: Failed to load BPF program b'tracepoint__workqueue__workqueue_queue_work': Invalid argument
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.