Open HQ1363 opened 1 day ago
I have multiple producers who send messages to different kafka cluster instances, and their topic names are the same. After the program runs for a period of time, it will suddenly panic.
c := sarama.NewConfig() c.Producer.RequiredAcks = sarama.WaitForAll c.Producer.Return.Successes = true c.Producer.Return.Errors = true c.Producer.Flush.Messages = 10 c.Producer.Flush.Frequency = 500 * time.Millisecond
``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xe2589d] goroutine 1599 [running] : github.com/Shopify/sarama.(*produceSet).wouldOverflow(0xc0004d1440, 0xc000576fa0) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/produce_set.go:249 +0x19d github.com/Shopify/sarama.(*brokerProducer).run(0xc0007e7ce0) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/async_producer.go:960 +0x63e github.com/Shopify/sarama.withRecover(0x0?) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/utils.go:43 +0x33 created by github.com/Shopify/sarama.(*asyncPreoducer).newBroker Producer in goroutine 190 /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/async_producer.go:790 +0x225 ```
It’s unclear what the problem is, but a number of fixes have happened since 1.38.1. Have you tried upgrading to v1.43.3 already?
Description
I have multiple producers who send messages to different kafka cluster instances, and their topic names are the same. After the program runs for a period of time, it will suddenly panic.
Versions
Configuration
Logs
logs: CLICK ME
``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xe2589d] goroutine 1599 [running] : github.com/Shopify/sarama.(*produceSet).wouldOverflow(0xc0004d1440, 0xc000576fa0) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/produce_set.go:249 +0x19d github.com/Shopify/sarama.(*brokerProducer).run(0xc0007e7ce0) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/async_producer.go:960 +0x63e github.com/Shopify/sarama.withRecover(0x0?) /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/utils.go:43 +0x33 created by github.com/Shopify/sarama.(*asyncPreoducer).newBroker Producer in goroutine 190 /go/pkg/mod/github.com/!shopify/sarama@v1.38.1/async_producer.go:790 +0x225 ```
Additional Context