We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug failed to watch mysql To Reproduce Steps to reproduce the behavior:
WARN[0006] Could not find PREPARE statement for this EXECUTE command. Query not decoded. WARN[0006] Unknown command -1. panic: runtime error: slice bounds out of range [1:0] goroutine 29 [running]: kyanos/agent/protocol/mysql.HandleStmtCloseRequest(0xc0003f7a78?, 0x942fc5?, 0x476058?) /home/runner/work/kyanos/kyanos/agent/protocol/mysql/handler.go:432 +0x23a kyanos/agent/protocol/mysql.(*MysqlParser).ProcessStmtClose(0xc000000000?, 0xc0004064c0, {0xc0000d62f0, 0x0, 0xd}, 0xc0003f7b00) /home/runner/work/kyanos/kyanos/agent/protocol/mysql/handler.go:44 +0x3b kyanos/agent/protocol/mysql.(*MysqlParser).processPackets(0xc000a4d2e0?, 0xc000a4d308?, {0xc0000d62f0?, 0x0?, 0xc000000000?}) /home/runner/work/kyanos/kyanos/agent/protocol/mysql/mysql.go:202 +0x285 kyanos/agent/protocol/mysql.(*MysqlParser).Match(0xc004b04100, 0xc000a4d2e0, 0xc000a4d308) /home/runner/work/kyanos/kyanos/agent/protocol/mysql/mysql.go:68 +0xf3 kyanos/agent/conn.(*Connection4).OnSyscallEvent(0xc000a4d1e0, {0xc000f9a810?, 0x180d9de4c23e2203?, 0x0?}, 0xc0003d0850?, 0xc000182540) /home/runner/work/kyanos/kyanos/agent/conn/conntrack.go:423 +0x10e kyanos/agent/conn.(*Processor).run(0xc00013a3f0) /home/runner/work/kyanos/kyanos/agent/conn/processor.go:259 +0x8fa created by kyanos/agent/conn.InitProcessorManager in goroutine 1 /home/runner/work/kyanos/kyanos/agent/conn/processor.go:32 +0x157
Screenshots
Desktop (please complete the following information):
Linux localhost.localdomain 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 x86_64 x86_64 GNU/Linu
Additional context the panic code is here
func HandleStmtCloseRequest(reqPacket *MysqlPacket, prepareMap map[int]PreparedStatement, record *Record) ParseState { if len(reqPacket.msg) < 1+kStmtIDBytes { common.ProtocolParserLog.Warnln("Insufficient number of bytes for STMT_CLOSE") return Invalid } record.Req = &(*reqPacket) record.Req.(*MysqlPacket).msg = "" stmt_id, _ := common.LEndianBytesToKInt[int32]([]byte(reqPacket.msg[kStmtIDStartOffset:]), kStmtIDBytes) _, ok := prepareMap[int(stmt_id)] if ok { delete(prepareMap, int(stmt_id)) } else { common.ProtocolParserLog.Warnf("Could not find prepare statement for this close command [stmt_id=%d].", stmt_id) } return Success }
也许这里是想值拷贝?
record.Req = &(*reqPacket) record.Req.(*MysqlPacket).msg = ""
类似以下代码
tmp := *reqPacket record.Req = &tmp record.Req.(*MysqlPacket).msg = ""
The text was updated successfully, but these errors were encountered:
Thank you for your feedback. I will take a look.
Sorry, something went wrong.
hengyoush
No branches or pull requests
Describe the bug
failed to watch mysql
To Reproduce
Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):
Additional context
the panic code is here
也许这里是想值拷贝?
类似以下代码
The text was updated successfully, but these errors were encountered: