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

Kafka client panic: assignment to entry in nil map #2681

Closed
CharlesCheung96 opened this issue Oct 23, 2023 · 3 comments
Closed

Kafka client panic: assignment to entry in nil map #2681

CharlesCheung96 opened this issue Oct 23, 2023 · 3 comments
Labels
stale Issues and pull requests without any recent activity

Comments

@CharlesCheung96
Copy link

CharlesCheung96 commented Oct 23, 2023

Description
Versions
Sarama Kafka Go
1.38.1 kafka_2.11-1.1.1 go1.19.9
Configuration
Logs
logs: CLICK ME

goroutine 54946562 [running]:
github.com/eapache/go-resiliency/breaker.(*Breaker).doWork(0xc0114a373b?, 0x0, 0x0?)
github.com/eapache/go-resiliency/breaker.(*Breaker).Run(...)
github.com/eapache/go-resiliency@v1.3.0/breaker/breaker/breeaker.go:100 +0xa5
github.com/eapache/go-resiliency@v1.3.0/breaker/breakergo:55
github.com/Shopify/sarama@v1.38.1/async_producer.go:755 +0x54
github.com/Shopify/sarama@v1.38.1/async_producer.go0:618 +0x35
github.com/Shopify/sarama@v1.38.1/async_producer.go:688 +0x570
github.com/Shopify/sarama@v1.38.1/utils.go:43 +0x3e 
github.com/Shopify/sarama.(*partitionProducer).updateLeader(x3a3ํ76bc?)
github.com/Shopify/sarama.(*partitionProducer).updateLeaderIfBrokerProducerIsNil(0xc39560a240, 0xc064f11180)
github.com/Shopify/sarama.(*partitionProducer).dispatch(0xc39560a240)
github.com/Shopify/sarama.withRecover(0xc0a540cf98?)
created
by github.com/Shopify/sarama.(*asyncProducer).newPaartitionProducer
github.com/Shopify/sarama@v1.38.1/async producer.go:599 +0x1ea

Additional Context
@dnwe
Copy link
Collaborator

dnwe commented Nov 9, 2023

Unfortunately because of the go-resiliency wrapper here recovering and then rethrowing the panic, we lose the original stack trace info that indicates where the assignment to a nil map occurred. I'd guess that it might be around github.com/Shopify/sarama.(*client).registerBroker as that is where we've seen a panic (such as #1920) in the past

However, v1.38.1 is quite old now, and we have made numerous improvements. Would you be able to look at upgrading your app to use github.com/IBM/sarama@v1.42.0?

Copy link

github-actions bot commented Feb 8, 2024

Thank you for taking the time to raise this issue. However, it has not had any activity on it in the past 90 days and will be closed in 30 days if no updates occur.
Please check if the main branch has already resolved the issue since it was raised. If you believe the issue is still valid and you would like input from the maintainers then please comment to ask for it to be reviewed.

@github-actions github-actions bot added the stale Issues and pull requests without any recent activity label Feb 8, 2024
@dnwe
Copy link
Collaborator

dnwe commented Feb 11, 2024

Closing, assumed as fixed — feel free to re-open if you still think this is an issue

@dnwe dnwe closed this as completed Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues and pull requests without any recent activity
Projects
None yet
Development

No branches or pull requests

2 participants