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: makeslice: len out of range #457

Closed
akamensky opened this issue Jun 9, 2020 · 1 comment
Closed

Panic: makeslice: len out of range #457

akamensky opened this issue Jun 9, 2020 · 1 comment
Labels

Comments

@akamensky
Copy link

Describe the bug
Some messages cause panic as below:

goroutine 965 [running]:
github.com/segmentio/kafka-go.(*messageSetReaderV2).readMessage(0xc00169e408, 0x7cb6, 0xc001c33af0, 0xc001c33ae0, 0x2, 0xf, 0x0, 0x1, 0x0, 0x0, ...)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/message.go:557 +0x399
github.com/segmentio/kafka-go.(*messageSetReader).readMessage(0xc00169e3f0, 0x7cb6, 0xc001c33af0, 0xc001c33ae0, 0xc001c33a84, 0xf, 0x0, 0x0, 0xc001766000, 0x0, ...)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/message.go:136 +0x75
github.com/segmentio/kafka-go.(*Batch).readMessage(0xc00064b000, 0xc001c33af0, 0xc001c33ae0, 0x2, 0x0, 0xcf3400, 0x100000001, 0xc001766000, 0xc001766000, 0xc001c33ae0)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/batch.go:222 +0x78
github.com/segmentio/kafka-go.(*Batch).ReadMessage(0xc00064b000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/batch.go:178 +0xf2
github.com/segmentio/kafka-go.(*reader).read(0xc001c33ee8, 0x9c7ea0, 0xc00032c140, 0x7cb6, 0xc001814000, 0x0, 0x0, 0x0)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1372 +0x3cb
github.com/segmentio/kafka-go.(*reader).run(0xc001c33ee8, 0x9c7ea0, 0xc00032c140, 0x0)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1191 +0x2c2
github.com/segmentio/kafka-go.(*Reader).start.func1(0xc001d541a0, 0x9c7ea0, 0xc00032c140, 0x0, 0xfffffffffffffffe, 0xc001d542c0)
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1093 +0x1c6
created by github.com/segmentio/kafka-go.(*Reader).start
        /home/akamenskiy/go/pkg/mod/github.com/segmentio/[email protected]/reader.go:1073 +0x18b

Kafka Version
2.4.1

To Reproduce
No idea how to reproduce.

Expected behavior
be able to fetch message

Additional context
compact topic, messages have no headers at all (headers not set) produced by Java application using official Kafka client libs (same version as kafka cluster).

@dominicbarnes
Copy link
Contributor

In order to debug this further, we would need some more information. If the exact root cause is not yet known, some more information about your Kafka environment and what kafka-go APIs you are using (eg: reader? consumer groups?)

It's also been a while since reported, so perhaps updating to the latest version of the API (0.4) would also be helpful. Feel free to re-open the ticket if you can provide more details for us to help diagnose with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants