neo4j / neo4j-go-driver

Neo4j Bolt Driver for Go
Apache License 2.0
485 stars 68 forks source link

Chunker buf range panic #525

Closed duongnhat closed 8 months ago

duongnhat commented 12 months ago

panic: runtime error: index out of range [1] with length 0

goroutine 456468686 [running]: encoding/binary.bigEndian.PutUint16(...) /usr/local/go/src/encoding/binary/binary.go:144 github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/bolt.(chunker).send(0xc000ef4870, {0xe817c0, 0xc00003c0e8}, {0xe7b5c0?, 0xc05e76fb50}) /home/linuxroot/go/pkg/mod/github.com/neo4j/neo4j-go-driver/v5@v5.11.0/neo4j/internal/bolt/chunker.go:72 +0x3a5 github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/bolt.(outgoing).send(0xc000ef4870, {0xe817c0?, 0xc00003c0e8?}, {0xe7b5c0?, 0xc05e76fb50?}) /home/linuxroot/go/pkg/mod/github.com/neo4j/neo4j-go-driver/v5@v5.11.0/neo4j/internal/bolt/outgoing.go:260 +0x34 github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/bolt.(messageQueue).send(...) /home/linuxroot/go/pkg/mod/github.com/neo4j/neo4j-go-driver/v5@v5.11.0/neo4j/internal/bolt/message_queue.go:134 github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/bolt.(bolt5).Close(0xc07fe26000, {0xe817c0, 0xc00003c0e8}) /home/linuxroot/go/pkg/mod/github.com/neo4j/neo4j-go-driver/v5@v5.11.0/neo4j/internal/bolt/bolt5.go:925 +0xd6 created by github.com/neo4j/neo4j-go-driver/v5/neo4j/internal/pool.(*server).removeIdleOlderThan /home/linuxroot/go/pkg/mod/github.com/neo4j/neo4j-go-driver/v5@v5.11.0/neo4j/internal/pool/server.go:187 +0x22a FAIL go-pkg/database/neo4j/test 141.206s FAIL

StephenCathcart commented 12 months ago

Hi @duongnhat, I'm assuming this is v5.11.0? Can you share an example of the client-side code you were using that caused this error?

robsdedude commented 8 months ago

I tried to track down how this unexpected state in the chunker could occur, but without luck.

To be able to locate the issue, more information would be necessary, as @StephenCathcart already wrote. Any combination of the following (preferably all of it) would help: