-
Notifications
You must be signed in to change notification settings - Fork 136
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
5.4.x 运行报错 #159
Comments
Hey @xj1988! I'm here to help you with any bugs, questions, or contributions you may have. Let's squash those bugs together! 🤖 The error you're encountering, a "nil pointer dereference," typically occurs when the code attempts to access a memory location that hasn't been initialized. In the context of the Kyanos application, this issue is happening in the Here are a few steps you can take to troubleshoot and potentially resolve this issue:
By following these steps, you should be able to identify the root cause of the nil pointer dereference and address it accordingly. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
1、执行 kyanos watch http 后一直卡在这里。 [bs@VM-1-46-tencentos /opt/kyanos]$ ./kyanos watch http ⣻ 🦜 Kyanos Loading... .............................. Press ctrl+c to exit 2、执行 ctrl+c 后出现表格 ⣷ Events received: 0/100 ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ 3、手动执行 curl http://www.baidu.com ,表格中并没有显示任何信息。 4、再次执行 ctrl+c 后出现上次评论的异常信息。 |
Can you execute this command: |
Oh, you should add |
谢谢,可以了 |
有两个其他的问题(ps:ip进行了脱敏) 1、 ┌────────────────────────────────────────────────────────────────────────────── Net/Internal ReadSocketTime 为横线的请求我查看应用日志,是进行了网络请求的,所以这里横线代表什么含义? 2、 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ [conn] [pid=6493][local addr]=172.9.2.46:50936 [remote addr]=151.241.97.138:80 [side]=client [ssl]=false 这里响应到eth0网卡的耗时为什么会是负数? |
|
fix: fix #159 stuck when load bpf failed
[bs@VM-1-46-tencentos /opt/kyanos]$ ./kyanos watch http
⣻ 🦜 Kyanos Loading...
Kyanos exited.
..............................
..............................
..............................
🍩 Kyanos starting... 1ns
🍎 Loaded eBPF maps & programs. 184.972835ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7a222e]
goroutine 1 [running]:
kyanos/bpf.(*AgentObjects).Close(0x7f5a877cf108?)
/home/runner/work/kyanos/kyanos/bpf/agent_x86_bpfel.go:327 +0xe
kyanos/bpf/loader.(*BPF).Close(0xc00004e0d0)
/home/runner/work/kyanos/kyanos/bpf/loader/loader.go:33 +0x25
kyanos/agent.SetupAgent.func4()
/home/runner/work/kyanos/kyanos/agent/agent.go:116 +0x17
kyanos/agent.SetupAgent({0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, {0x17f2880, ...}, ...})
/home/runner/work/kyanos/kyanos/agent/agent.go:149 +0x8c3
kyanos/cmd.startAgent()
/home/runner/work/kyanos/kyanos/cmd/common.go:99 +0x5dd
kyanos/cmd.init.func1(0xc000348f08, {0x14f5323?, 0x4?, 0x14f51c3?})
/home/runner/work/kyanos/kyanos/cmd/http.go:32 +0x26f
github.com/spf13/cobra.(*Command).execute(0xc000348f08, {0x24cc800, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:989 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x2185e60)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
kyanos/cmd.Execute()
/home/runner/work/kyanos/kyanos/cmd/root.go:114 +0x1a
main.main()
/home/runner/work/kyanos/kyanos/main.go:6 +0xf
执行命令后没有捕获到任何数据,退出后报错了,打印的日志如上。
内核版本如下:
[bs@VM-1-46-tencentos /opt/kyanos]$ uname -a
Linux VM-1-46-tencentos 5.4.119-19.0009.44 #1 SMP Tue May 7 20:09:33 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: