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

async producer panic: slice bounds out of range #1233

Closed
danmia opened this issue Dec 7, 2018 · 1 comment
Closed

async producer panic: slice bounds out of range #1233

danmia opened this issue Dec 7, 2018 · 1 comment

Comments

@danmia
Copy link

danmia commented Dec 7, 2018

Versions

Sarama Version: cebb584
Kafka Version: 2.0.0
Go Version: 1.11

Configuration

What configuration values are you using for Sarama and Kafka?
Producer.Return.Errors = true
Producer.Return.Successes = true
Producer.RequiredAcks = sarama.WaitForLocal
ClientID = "prod"
Version = sarama.V2_0_0_0

Logs

I don't see any logs

Problem Description

I see a panic. I haven't been able to reproduce this reliably. Perhaps related to 1225 ?

Dec  5 08:09:52  : panic: runtime error: slice bounds out of range
Dec  5 08:09:52  : goroutine 220 [running]:
Dec  5 08:09:52  : github.com/Shopify/sarama.(*realEncoder).putVarint(0xc0299a2af0, 0x9)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/real_encoder.go:39 +0x8a
Dec  5 08:09:52  : github.com/Shopify/sarama.(*realEncoder).putVarintBytes(0xc0299a2af0, 0xc00793a5e0, 0x9, 0x10, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/real_encoder.go:77 +0x47
Dec  5 08:09:52  : github.com/Shopify/sarama.(*RecordHeader).encode(0xc0004523c0, 0x1245bc0, 0xc0299a2af0, 0x500, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/record.go:22 +0xb1
Dec  5 08:09:52  : github.com/Shopify/sarama.(*Record).encode(0xc024ca1dc0, 0x1245bc0, 0xc0299a2af0, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/record.go:61 +0x1e5
Dec  5 08:09:52  : github.com/Shopify/sarama.recordsArray.encode(0xc002b7f240, 0x8, 0x8, 0x1245bc0, 0xc0299a2af0, 0x1, 0xc003688a80)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/record_batch.go:20 +0x63
Dec  5 08:09:52  : github.com/Shopify/sarama.encode(0x122d180, 0xc001767da0, 0x0, 0x0, 0xc00793f120, 0x10, 0x444ad1, 0xc025a41b40, 0xc001767d80)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/encoder_decoder.go:35 +0x233
Dec  5 08:09:52  : github.com/Shopify/sarama.(*RecordBatch).encodeRecords(0xc002b56dc0, 0x1245b00, 0xc001767d60, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/record_batch.go:217 +0xd8
Dec  5 08:09:52  : github.com/Shopify/sarama.(*RecordBatch).encode(0xc002b56dc0, 0x1245b00, 0xc001767d60, 0x1, 0x1)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/record_batch.go:87 +0x36f
Dec  5 08:09:52  : github.com/Shopify/sarama.(*Records).encode(0xc007223b30, 0x1245b00, 0xc001767d60, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/records.go:63 +0xbb
Dec  5 08:09:52  : github.com/Shopify/sarama.(*ProduceRequest).encode(0xc001767d20, 0x1245b00, 0xc001767d60, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/produce_request.go:106 +0x2b7
Dec  5 08:09:52  : github.com/Shopify/sarama.(*request).encode(0xc008364330, 0x1245b00, 0xc001767d60, 0x40da4f, 0xc033b469c0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/request.go:32 +0x13c
Dec  5 08:09:52  : github.com/Shopify/sarama.encode(0x122bd80, 0xc008364330, 0x123f1c0, 0xc0004562c0, 0x0, 0xb, 0x0, 0x0, 0x40e201)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/encoder_decoder.go:24 +0x90
Dec  5 08:09:52  : github.com/Shopify/sarama.(*Broker).send(0xc0002eedc0, 0x123a500, 0xc001767d20, 0xc001767d01, 0x0, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/broker.go:581 +0x24e
Dec  5 08:09:52  : github.com/Shopify/sarama.(*Broker).sendAndReceive(0xc0002eedc0, 0x123a500, 0xc001767d20, 0x122bd00, 0xc001767d40, 0x3000106, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/broker.go:612 +0x6a
Dec  5 08:09:52  : github.com/Shopify/sarama.(*Broker).Produce(0xc0002eedc0, 0xc001767d20, 0xc001767c01, 0x0, 0x0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/broker.go:278 +0xe8
Dec  5 08:09:52  : github.com/Shopify/sarama.(*asyncProducer).newBrokerProducer.func1()
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/async_producer.go:629 +0xb4
Dec  5 08:09:52  : github.com/Shopify/sarama.withRecover(0xc0017a88a0)
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/utils.go:45 +0x43
Dec  5 08:09:52  : created by github.com/Shopify/sarama.(*asyncProducer).newBrokerProducer
Dec  5 08:09:52  : /go/src/github.com/Shopify/sarama/async_producer.go:625 +0x1f5
@d1egoaz
Copy link
Contributor

d1egoaz commented Aug 22, 2019

seems related to #1225

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

No branches or pull requests

2 participants