[
https://issues.apache.org/jira/browse/KAFKA-524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13578104#comment-13578104
]
David Arthur commented on KAFKA-524:
------------------------------------
I have seen this as well. Particularly this is an issue with slf4j and the
LoggerFactory deadlocking. When the appender is initializing, it creates a
Producer which in turn connects to ZooKeeper. The ZooKeeper client attempts to
open a logger with slf4j LoggerFactory which causes the deadlock.
One possible solution would be to defer the Producer initialization until after
log4j was all setup.
> Kafka Appender causes Log4j Deadlock
> ------------------------------------
>
> Key: KAFKA-524
> URL: https://issues.apache.org/jira/browse/KAFKA-524
> Project: Kafka
> Issue Type: Sub-task
> Reporter: nicu marasoiu
>
> If you remove all log4j.properties from classpath (and prvent any log4j
> intialization previous to the one which involves kafka appender), and put
> KAFKA appender on rootLogger, then, even if you exclude the KAFKA appender
> from logger.kafka and logger.org, you get a Log4j deadlock when zookeeper
> send thread tries to issue a LOG.info, and for that it locks the root
> category (as its correct category, say org, is not yet set up in log4j, who
> is still in activateOptions on kafka appender).
> please read comments on the parent and ask any questions to [email protected]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira