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

JoinGroupRequestData 'reason' can be too large

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 3.2.0
    • 3.3.0, 3.2.1
    • None
    • None

    Description

      We saw an exception like this: 

      ```org.apache.kafka.streams.errors.StreamsException: java.lang.RuntimeException: 'reason' field is too long to be serialized 3 at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:627) 4 at org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:551) 5Caused by: java.lang.RuntimeException: 'reason' field is too long to be serialized 6 at org.apache.kafka.common.message.JoinGroupRequestData.addSize(JoinGroupRequestData.java:465) 7 at org.apache.kafka.common.protocol.SendBuilder.buildSend(SendBuilder.java:218) 8 at org.apache.kafka.common.protocol.SendBuilder.buildRequestSend(SendBuilder.java:187) 9 at org.apache.kafka.common.requests.AbstractRequest.toSend(AbstractRequest.java:101) 10 at org.apache.kafka.clients.NetworkClient.doSend(NetworkClient.java:524) 11 at org.apache.kafka.clients.NetworkClient.doSend(NetworkClient.java:500) 12 at org.apache.kafka.clients.NetworkClient.send(NetworkClient.java:460) 13 at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.trySend(ConsumerNetworkClient.java:499) 14 at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:255) 15 at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:236) 16 at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:215) 17 at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.joinGroupIfNeeded(AbstractCoordinator.java:437) 18 at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureActiveGroup(AbstractCoordinator.java:371) 19 at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.poll(ConsumerCoordinator.java:542) 20 at org.apache.kafka.clients.consumer.KafkaConsumer.updateAssignmentMetadataIfNeeded(KafkaConsumer.java:1271) 21 at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1235) 22 at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1215) 23 at org.apache.kafka.streams.processor.internals.StreamThread.pollRequests(StreamThread.java:969) 24 at org.apache.kafka.streams.processor.internals.StreamThread.pollPhase(StreamThread.java:917) 25 at org.apache.kafka.streams.processor.internals.StreamThread.runOnce(StreamThread.java:736) 26 at org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:589) 27 ... 1 more```

      This appears to be caused by the code passing an entire stack trace in the `rejoinReason`.  See https://github.com/apache/kafka/blob/3.2.0/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L481

      Attachments

        Issue Links

          Activity

            People

              jhughes Jim Hughes
              jhughes Jim Hughes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: