linkedin / linkedin/Burrow

kafka client processConsumerOffsetsMessage panic error

Open
#497 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
4k
Forks
818
Avg merge
1h 14m
Merged PRs (30d)
1

Description

```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xabb7da]

goroutine 14695 [running]:
github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).processConsumerOffsetsMessage(0xc0002d6360, 0x0)
/home/titustian/go/src/github.com/linkedin/Burrow/core/internal/consumer/kafka_client.go:234 +0x3a
github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).partitionConsumer(0xc0002d6360, 0xe58ca0, 0xc00afd81b0)
/home/titustian/go/src/github.com/linkedin/Burrow/core/internal/consumer/kafka_client.go:171 +0x595
created by github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).startKafkaConsumer
/home/titustian/go/src/github.com/linkedin/Burrow/core/internal/consumer/kafka_client.go:226 +0x91a
```
```golang
func (module *KafkaClient) processConsumerOffsetsMessage(msg *sarama.ConsumerMessage) {
logger := module.Log.With(
zap.String("offset_topic", msg.Topic),
zap.Int32("offset_partition", msg.Partition),
zap.Int64("offset_offset", msg.Offset),
)

if len(msg.Value) == 0 {
// Tombstone message - we don't handle them for now
logger.Debug("dropped tombstone")
return
}
```
when the msg is nil ,the logger initialize cause a panic。

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with core/internal/consumer/kafka_client.go at processConsumerOffsetsMessage around line 234, then inspect its callers at partitionConsumer and startKafkaConsumer. Reproduce or test the nil-message path and verify that processing a nil message no longer panics while the existing tombstone handling remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kafka
Domain
stream-processing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.