go-graphite / go-carbon

Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
MIT License
804 stars 123 forks source link

[BUG] runtime error: index out of range #595

Closed Flawlessness closed 3 months ago

Flawlessness commented 3 months ago

Describe the bug Hello, the following error occurs when the service is running, I cannot understand what is causing it. Maybe you have some ideas? Any information would be valuable to me, I would be very grateful if you help.

Logs

carbon-clickhouse[687917]: panic: runtime error: index out of range [7] with length 0
carbon-clickhouse[687917]: goroutine 38 [running]:
carbon-clickhouse[687917]: encoding/binary.littleEndian.PutUint64(...)
carbon-clickhouse[687917]:         /opt/hostedtoolcache/go/1.19.3/x64/src/encoding/binary/binary.go:108
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/helper/RowBinary.(*WriteBuffer).WriteFloat64(...)
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/helper/RowBinary/write_buffer.go:147
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/helper/RowBinary.(*WriteBuffer).WriteGraphitePoint(0xc000476000, {0xc000352000?, 0x2f2?>
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/helper/RowBinary/write_buffer.go:172 +0x279
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/receiver.(*Base).PlainParseBuffer(0xc00032c000, {0xbe5858, 0xc0002da680}, 0xc000706000,>
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/receiver/plain.go:134 +0x21f
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/receiver.(*Base).PlainParser(0x0?, {0xbe5858, 0xc0002da680?}, 0xc00009c540)
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/receiver/plain.go:166 +0x165
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/receiver.(*TCP).Listen.func1.3({0xbe5858?, 0xc0002da680?})
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/receiver/tcp.go:139 +0x39
carbon-clickhouse[687917]: github.com/lomik/carbon-clickhouse/helper/stop.(*Struct).StartFunc.func1.1()
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/helper/stop/stop.go:49 +0x2e
carbon-clickhouse[687917]: created by github.com/lomik/carbon-clickhouse/helper/stop.(*Struct).StartFunc.func1
carbon-clickhouse[687917]:         /home/runner/work/carbon-clickhouse/carbon-clickhouse/helper/stop/stop.go:48 +0xcc
systemd[1]: carbon-clickhouse.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
systemd[1]: carbon-clickhouse.service: Failed with result 'exit-code'.
deniszh commented 3 months ago

@Flawlessness : wrong project. You probably mean https://github.com/go-graphite/carbon-clickhouse if I'm reading panic stack right.