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 panic #269

Open
dream110fly opened this issue Jan 15, 2025 · 2 comments
Open

run panic #269

dream110fly opened this issue Jan 15, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@dream110fly
Copy link

dream110fly commented Jan 15, 2025

Describe the bug
We exec ./kyanos watch with version v1.4.3 on Anolis OS release 8.8 with kernel version 5.10.134-13.an8.x86_64, it panic with the following error:

` ./kyanos watch
WARN[0000] Your terminal does not support 256 colors, ui may display incorrectly

⣷ 🦜 Kyanos Loading...

..............................
🍩 Kyanos starting... 1ns
🍎 Loaded eBPF maps & programs. 488.662001ms
🍓 Setup traffic filters 129.82µs
🍆 Attached base eBPF programs. 560.739146ms

Press ctrl+c to exit
panic: interface conversion: interface {} is []uint8, not int64

                                                           goroutine 371 [running]:
                                                                                   kyanos/agent/uprobe/dwarf_reader.GetMemberOffset(0xc005253a50?)
                                                                                                                                                  	/home/runner/work/kyanos/kyanos/agent/uprobe/dwarf_reader/reader.go:204 +0xee
                                                                                                                                                                                                                                 kyanos/agent/uprobe/dwarf_reader.GetStructMemberInfo({0x1517850, 0x10}, 0x13, {0x14fbaf3, 0x5}, 0xd, 0xc005253a50)
                                                                                      	/home/runner/work/kyanos/kyanos/agent/uprobe/dwarf_reader/reader.go:187 +0x305
                                                                                                                                                                          kyanos/agent/uprobe/dwarf_reader.GetStructMemberOffset({0x1517850?, 0x1529a36?}, {0x14fbaf3?, 0xc004dbf928?}, 0xc004dbf928?)
                                         	/home/runner/work/kyanos/kyanos/agent/uprobe/dwarf_reader/reader.go:151 +0x31
                                                                                                                         kyanos/agent/uprobe.UpdateCommonSymAddrs(0xb0c, 0xc004452be0, {0x1305120, 0xc0040f6000})
                                                                                                                                                                                                                 	/home/runner/work/kyanos/kyanos/agent/uprobe/gotls.go:274 +0x114
                       kyanos/agent/uprobe.AttachGoTlsProbes(0xb0c)
                                                                   	/home/runner/work/kyanos/kyanos/agent/uprobe/gotls.go:89 +0x1dc
                                                                                                                                   kyanos/bpf/loader.attachOpenSslUprobes(0xc002fd0330, 0xc00026b8c8, 0xc00069c280?, {0xc00026b8c8?, 0xc000433388?})
                                                                                                                                                                                                                                                        /home/runner/work/kyanos/kyanos/bpf/loader/loader.go:547 +0x657
                                                          kyanos/bpf/loader.(*BPF).AttachProgs(0xc000230560, 0xc00026b8c8)
                                                                                                                          	/home/runner/work/kyanos/kyanos/bpf/loader/loader.go:139 +0x9e
                                                                                                                                                                                          kyanos/agent.SetupAgent.func3(0xc000230560)
                                                                                                                                                                                                                                     	/home/runner/work/kyanos/kyanos/agent/agent.go:128 +0x63e
                                        created by kyanos/agent.SetupAgent in goroutine 1
                                                                                         	/home/runner/work/kyanos/kyanos/agent/agent.go:89 +0x60c

`

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Information (please complete the following information):

  • OS: [e.g. use uname -ar]
Copy link

dosubot bot commented Jan 15, 2025

Hey there, @dream110fly! I'm here to help you with any bugs, questions, or contributions you may have. Let's tackle this together!

The panic you're encountering is due to a type assertion error in the GetMemberOffset function within the dwarf_reader package. The error message indicates that the code is attempting to convert an interface to int64, but the actual type is []uint8. This suggests that the DWARF attribute dwarf.AttrDataMemberLoc is returning a slice of bytes instead of the expected int64.

Here are a few steps you can take to address this issue:

  1. Check DWARF Data Handling: Review the GetMemberOffset function to ensure it correctly handles the data type returned by the DWARF attribute. You might need to add logic to handle []uint8 if this is a valid return type for your use case.

  2. Kernel and DWARF Compatibility: Since you're running on Anolis OS with a specific kernel version, ensure that the DWARF data generated by your compiler is compatible with the expectations of the dwarf_reader package. There might be differences in how DWARF data is structured across different compilers or kernel versions.

  3. Update or Patch: Check if there are any updates or patches available for Kyanos that address this issue. It's possible that this is a known issue that has been fixed in a later version.

  4. Debugging: Add debugging statements to log the actual type and value of attr.Val in the GetMemberOffset function to better understand what data is being returned.

If these steps do not resolve the issue, you may need to further investigate the specific DWARF data being processed and how it interacts with the dwarf_reader package.

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 Jan 15, 2025
@hengyoush
Copy link
Owner

Thanks for the feedback. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants