[
https://issues.apache.org/jira/browse/KAFKA-4856?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16134012#comment-16134012
]
ASF GitHub Bot commented on KAFKA-4856:
---
GitHub user omkreddy opened a pull request:
https://github.com/apache/kafka/pull/3696
KAFKA-4856: make unregisterAppInfo method to synchronized
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/omkreddy/kafka KAFKA-4856
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3696.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3696
commit 27b350e542edb1035962fc51366a5a50e9820a0f
Author: Manikumar Reddy
Date: 2017-08-19T07:41:04Z
KAFKA-4856: make unregisterAppInfo method to synchronized
> Calling KafkaProducer.close() from multiple threads may cause spurious error
>
>
> Key: KAFKA-4856
> URL: https://issues.apache.org/jira/browse/KAFKA-4856
> Project: Kafka
> Issue Type: Bug
> Components: clients
>Affects Versions: 0.9.0.0, 0.10.0.0, 0.10.2.0
>Reporter: Xavier Léauté
>Priority: Minor
>
> Calling {{KafkaProducer.close()}} from multiple threads simultaneously may
> cause the following harmless error message to be logged. There appears to be
> a race-condition in {{AppInfoParser.unregisterAppInfo}} that we don't guard
> against.
> {noformat}
> WARN Error unregistering AppInfo mbean
> (org.apache.kafka.common.utils.AppInfoParser:71)
> javax.management.InstanceNotFoundException:
> kafka.producer:type=app-info,id=
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
> at
> com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
> at
> org.apache.kafka.common.utils.AppInfoParser.unregisterAppInfo(AppInfoParser.java:69)
> at
> org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:735)
> at
> org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:686)
> at
> org.apache.kafka.clients.producer.KafkaProducer.close(KafkaProducer.java:665)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)