Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run kyanos on WSL failed #172

Open
maxy19 opened this issue Dec 12, 2024 · 7 comments
Open

Run kyanos on WSL failed #172

maxy19 opened this issue Dec 12, 2024 · 7 comments
Assignees
Labels
bug Something isn't working feature-request

Comments

@maxy19
Copy link

maxy19 commented Dec 12, 2024

⣟ 🦜 Kyanos Loading...

..............................
..............................
🍩 Kyanos starting... 1ns
🍎 Loaded eBPF maps & programs. 307.178028ms
🍓 Setup traffic filters 46.04µs

Press ctrl+c to exit
2024/12/12 17:31:18 kprobe2 failed: security_socket_recvmsg, creating perf_kprobe PMU (arch-specific fallback for "security_socket_recvmsg"): token __x64_security_socket_recvmsg: not found: no such file or directory, fallbacking..

内核
Linux maxy 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
使用权限
root
使用操作系统
win11 ,wsl2

Copy link

dosubot bot commented Dec 12, 2024

Hello @maxy19! I'm here to help you with any bugs, questions, or contributions. Let's tackle this together!

The error message indicates that the kprobe failed to attach to the security_socket_recvmsg function, and the system attempted to use an architecture-specific fallback using the perf_kprobe PMU. The specific error "token __x64_security_socket_recvmsg: not found" suggests that the fallback mechanism couldn't find the necessary token or symbol for the function on your architecture.

Here are a few things you can check or try:

  1. Kernel Version and Configuration: Ensure that your kernel version supports the security_socket_recvmsg function and that it is configured to allow kprobes. Some functions may not be available or may have different names in different kernel versions.

  2. Symbol Availability: Verify that the symbol __x64_security_socket_recvmsg is available in your kernel. You can check this by examining the kernel's symbol table using tools like nm or objdump.

  3. Fallback Mechanism: If the fallback mechanism is not working, you might need to manually specify an alternative function or method to probe, if available.

  4. Permissions: Ensure that you have the necessary permissions to attach kprobes, as this operation typically requires root privileges.

If these steps do not resolve the issue, you may need to investigate further based on your specific system configuration and kernel version.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot dosubot bot added the bug Something isn't working label Dec 12, 2024
@hengyoush
Copy link
Owner

Thanks for your feedback! What your os version, please execute uname -ar.

@maxy19
Copy link
Author

maxy19 commented Dec 12, 2024

Thanks for your feedback! What your os version, please execute uname -ar.

Linux maxy 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

@maxy19
Copy link
Author

maxy19 commented Dec 12, 2024

执行 :grep CONFIG_DEBUG_INFO_BTF "/boot/config-$(uname -r)"
输出:grep: /boot/config-5.15.167.4-microsoft-standard-WSL2: No such file or directory

@hengyoush
Copy link
Owner

hengyoush commented Dec 12, 2024

Currently validated to run only on Linux; WSL adaptation will be supported in further(And also windows/macos).

@hengyoush hengyoush changed the title 运行报错 命令:watch Run watch subcommand on WSL failed Dec 12, 2024
@maxy19
Copy link
Author

maxy19 commented Dec 12, 2024

Currently validated to run only on Linux; WSL adaptation will be supported in further(And also windows/macos).

我用的是wsl的 Ubuntu系统 24版本的 这个目前支持吗?

@hengyoush hengyoush self-assigned this Dec 12, 2024
@hengyoush
Copy link
Owner

hengyoush commented Dec 12, 2024

Currently validated to run only on Linux; WSL adaptation will be supported in further(And also windows/macos).

我用的是wsl的 Ubuntu系统 24版本的 这个目前支持吗?

In theory it is possible, but the Linux distributions on WSL do not come with Linux headers by default, which are required by kyanos.
You need to recompile the kernel, refer to some solutions like this: https://gist.github.com/MarioHewardt/5759641727aae880b29c8f715ba4d30f

@maxy19

@hengyoush hengyoush changed the title Run watch subcommand on WSL failed Run kyanos on WSL failed Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature-request
Projects
None yet
Development

No branches or pull requests

2 participants