[
https://issues.apache.org/jira/browse/KAFKA-17263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109066#comment-18109066
]
Ramu edited comment on KAFKA-17263 at 8/28/26 5:25 AM:
-------------------------------------------------------
Hi @kuradeon, I’m looking into this issue and wanted to understand whether it
is still reproducible on the latest Kafka trunk.
Since Kafka 4.x has both the classic and the newer consumer group protocol,
could you please try your existing reproducer against the latest trunk with
both:
1. `group.protocol=classic`
2. `group.protocol=consumer`
For the classic protocol, please also keep static membership enabled with
`group.instance.id`, as in your original scenario.
If possible, could you share:
* the reproducer or detailed reproduction steps
* the relevant consumer configuration
* the Kafka/client version and commit used for the test
* the thread dump when the issue occurs
This would help determine whether the issue is still present on current trunk
and whether it is specific to the classic consumer protocol.
Thanks!
was (Author: ramu11):
Hi @Kuradeon, I’m looking into this issue and wanted to check whether you’re
able to reproduce it on the current Kafka trunk.
If possible, could you please confirm whether the `KafkaConsumer.close()` hang
with static membership is still reproducible on the latest trunk? A minimal
reproducer or any updated reproduction steps would also be very helpful.
Thanks!
> Sometimes static KafkaConsumer.close will block the thread
> ----------------------------------------------------------
>
> Key: KAFKA-17263
> URL: https://issues.apache.org/jira/browse/KAFKA-17263
> Project: Kafka
> Issue Type: Bug
> Components: clients, consumer
> Affects Versions: 2.8.2, 3.9.0, 3.9.1
> Environment: Java 8
> Reporter: Kuradeon
> Priority: Major
> Attachments: image-2024-08-07-16-50-15-701.png,
> image-2024-08-07-18-03-46-042.png, image-2024-08-07-18-06-05-222.png,
> screenshot-1.png, screenshot-2.png, screenshot-3.png, screenshot-4.png,
> screenshot-5.png
>
>
> Sometimes, the thread will be blocked and never continue (state: waiting)
> after invoke KafkaConsumer.close(). Here are the related thread dump:
> {code:java}
> Thread 73 (pool-5-thread-1):
> State: WAITING
> Blocked count: 25
> Waited count: 22
> Waiting on
> org.apache.kafka.clients.consumer.internals.AbstractCoordinator$HeartbeatThread@565a2927
> Stack:
> java.lang.Object.wait(Native Method)
> java.lang.Thread.join(Thread.java:1257)
> java.lang.Thread.join(Thread.java:1331)
>
> org.apache.kafka.clients.consumer.internals.AbstractCoordinator.closeHeartbeatThread(AbstractCoordinator.java:385)
>
> org.apache.kafka.clients.consumer.internals.AbstractCoordinator.close(AbstractCoordinator.java:1010)
>
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.close(ConsumerCoordinator.java:926)
>
> org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:2366)
>
> org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:2333)
>
> org.apache.kafka.clients.consumer.KafkaConsumer.close(KafkaConsumer.java:2283)
> Thread 687 (kafka-coordinator-heartbeat-thread | XXXX-st-c35):
> State: WAITING
> Blocked count: 0
> Waited count: 1
> Waiting on
> org.apache.kafka.clients.consumer.internals.ConsumerCoordinator@51f1e632
> Stack:
> java.lang.Object.wait(Native Method)
> java.lang.Object.wait(Object.java:502)
>
> org.apache.kafka.clients.consumer.internals.AbstractCoordinator$HeartbeatThread.run(AbstractCoordinator.java:1360)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)