Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2466

ConsoleConsumer throws ConcurrentModificationException on termination

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.9.0.0
    • tools
    • None

    Description

      ConsoleConsumer throws ConcurrentModificationException on termination.

      ST:

      Exception in thread "Thread-1" java.util.ConcurrentModificationException: KafkaConsumer is not safe for multi-threaded access
      	at org.apache.kafka.clients.consumer.KafkaConsumer.acquire(KafkaConsumer.java:1169)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:1087)
      	at kafka.consumer.NewShinyConsumer.close(BaseConsumer.scala:50)
      	at kafka.tools.ConsoleConsumer$$anon$1.run(ConsoleConsumer.scala:74)
      

      Other thread which constantly tries to consume is

      "main" prio=10 tid=0x00007f3aa800c000 nid=0x1314 runnable [0x00007f3aae37d000]
         java.lang.Thread.State: RUNNABLE
      	at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
      	at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
      	at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
      	at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:87)
      	- locked <0x00000000dd1df130> (a sun.nio.ch.Util$2)
      	- locked <0x00000000dd1df120> (a java.util.Collections$UnmodifiableSet)
      	- locked <0x00000000dd0af720> (a sun.nio.ch.EPollSelectorImpl)
      	at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:98)
      	at org.apache.kafka.common.network.Selector.select(Selector.java:440)
      	at org.apache.kafka.common.network.Selector.poll(Selector.java:263)
      	at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:221)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:274)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:182)
      	at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:172)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:779)
      	at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:730)
      	at kafka.consumer.NewShinyConsumer.receive(BaseConsumer.scala:43)
      	at kafka.tools.ConsoleConsumer$.process(ConsoleConsumer.scala:87)
      	at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:54)
      	at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:39)
      	at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            singhashish Ashish Singh
            singhashish Ashish Singh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment