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

panic: runtime error: slice bounds out of range [:496] with length 448 #53

Open
noovertime7 opened this issue Sep 24, 2024 · 4 comments
Labels
bug Something isn't working stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@noovertime7
Copy link

Describe the bug
内核版本:Centos7.9 3.10.0-1160.119.1.el7.x86_64

数组越界了
以下为详细日志:

[root@yinnuo ~]# ./kyanos stat
ERRO[0000] Not enough bytes to dissect int param.       
ERRO[0000] Not enough bytes to dissect int param.       
ERRO[0000] Not enough bytes to dissect int param.       
ERRO[0000] Not enough bytes to dissect int param.       

ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
ERRO[0005] Not enough bytes to dissect int param.       
panic: runtime error: slice bounds out of range [:496] with length 448

goroutine 15 [running]:
kyanos/agent/protocol/mysql.DissectStringParam({0xc0000d6000, 0x1c0}, 0xc000681728, 0xc000681738)
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/utils.go:196 +0xaa
kyanos/agent/protocol/mysql.ProcessTextResultsetRowPacket(0xc0000b5f40, 0x948d60?, 0xc0006818c8?)
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/handler.go:290 +0x74
kyanos/agent/protocol/mysql.HandleResultsetResponse(0xc0000b5b80, 0x0, 0x0, {0xc0000d4300, 0xe, 0x18}, 0xc0006819d0)
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/handler.go:239 +0x6db
kyanos/agent/protocol/mysql.processQuery(0xc0000b5b80, {0xc0000d4300, 0xe, 0x18}, 0xc0006819d0)
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/handler.go:115 +0x1dd
kyanos/agent/protocol/mysql.(*MysqlParser).processPackets(0xc0003100d8?, 0xc000310100?, {0xc0000d4300?, 0x4d288f?, 0xc000681a48?})
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/mysql.go:190 +0xed
kyanos/agent/protocol/mysql.(*MysqlParser).Match(0xc0000ae270, 0xc0003100d8, 0xc000310100)
        /home/runner/work/kyanos/kyanos/agent/protocol/mysql/mysql.go:68 +0xf3
kyanos/agent/conn.(*Connection4).OnSyscallEvent(0xc000310000, {0xc00002dc00?, 0x65d?, 0xc000681f88?}, 0xc00028a420, 0xc0000a81e0)
        /home/runner/work/kyanos/kyanos/agent/conn/conntrack.go:331 +0x19c
kyanos/agent/conn.(*Processor).run(0xc000149880)
        /home/runner/work/kyanos/kyanos/agent/conn/processor.go:217 +0x698
created by kyanos/agent/conn.InitProcessorManager in goroutine 1
        /home/runner/work/kyanos/kyanos/agent/conn/processor.go:31 +0x157

@hengyoush
Copy link
Owner

感谢反馈🙏,我会尽快修复

@hengyoush hengyoush added the bug Something isn't working label Sep 24, 2024
@noovertime7
Copy link
Author

能参与项目功能开发吗 我会go跟一点c语言的皮毛

@hengyoush
Copy link
Owner

当然可以👍

hengyoush added a commit that referenced this issue Oct 1, 2024
hengyoush added a commit that referenced this issue Oct 1, 2024
Copy link

dosubot bot commented Dec 24, 2024

Hi, @noovertime7. I'm Dosu, and I'm helping the kyanos team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • You reported a runtime error on CentOS 7.9 related to a slice bounds out of range in the DissectStringParam function.
  • The error occurs during the processing of MySQL protocol data.
  • The maintainer, "hengyoush," acknowledged the issue and promised a quick fix.
  • You expressed interest in contributing, and "hengyoush" welcomed your participation.

Next Steps

  • Please let me know if this issue is still relevant to the latest version of the kyanos repository by commenting here.
  • If there is no further activity, this issue will be automatically closed in 7 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 24, 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 stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants