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

More graceful ErrOffsetOutOfRange handling #634

Open
tormoder opened this issue May 27, 2020 · 1 comment
Open

More graceful ErrOffsetOutOfRange handling #634

tormoder opened this issue May 27, 2020 · 1 comment

Comments

@tormoder
Copy link

Go version: 1.14.2
Burrow version: github.com/linkedin/Burrow v1.3.4-0.20200506150011-4ce194fea01a

We have lately been seeing (seemingly random) ErrOffsetOutOfRange errors for two specific partitions of the __consumer_offsets topic and the internal Burrow consumer. This has started happening after upgrading our cluster to Kafka version 2.4.

We have not found the reason for this, and it may be related to our cluster setup. But the error, ErrOffsetOutOfRange, causes a nil-pointer in Burrow after the error is logged.

{"level":"ERROR","@timestamp":"2020-05-27T08:14:04.090Z","caller":"runtime/asm_amd64.s:1373","message":"consume error","@version":"1","type":"module","coordinator":"consumer","class":"kafka","name":"prod","topic":"__consumer_offsets","partition":9,"error":"kafka server: The requested offset is outside the range of offsets maintained by the server for the given topic/partition.","stacktrace":"github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).partitionConsumer\n\t/go/pkg/mod/github.com/linkedin/!burrow@v1.3.4-0.20200506150011-4ce194fea01a/core/internal/consumer/kafka_client.go:261"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x9ca109]

goroutine 393 [running]:
github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).partitionConsumer(0xc00042edc0, 0xdf2b40, 0xc000ddb4a0, 0x0)
        /go/pkg/mod/github.com/linkedin/!burrow@v1.3.4-0.20200506150011-4ce194fea01a/core/internal/consumer/kafka_client.go:262 +0x5e9
created by github.com/linkedin/Burrow/core/internal/consumer.(*KafkaClient).startKafkaConsumer
        /go/pkg/mod/github.com/linkedin/!burrow@v1.3.4-0.20200506150011-4ce194fea01a/core/internal/consumer/kafka_client.go:314 +0x968

The underlying Sarama partition consumer considers the error fatal, and require user action:
https://github.com/Shopify/sarama/blob/b5764af1c47d0f6718dba3be6a3d75e8c97b351a/consumer.go#L826-L828

I would be nice if Burrow could handle the error more gracefully, and possibly restart the partition consumer at OffsetNewest.

@tormoder
Copy link
Author

It looks like we're hitting
https://issues.apache.org/jira/browse/KAFKA-9543,
which is causing the ErrOffsetOutOfRange errors.

The question still remains if Burrow should handle the error more gracefully than crashing.

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

1 participant