Jason Gustafson created KAFKA-9947:
--------------------------------------
Summary: TransactionsBounceTest may leave threads running
Key: KAFKA-9947
URL: https://issues.apache.org/jira/browse/KAFKA-9947
Project: Kafka
Issue Type: Bug
Reporter: Jason Gustafson
Assignee: Jason Gustafson
I saw this failure recently:
```
14:28:23 kafka.api.TransactionsBounceTest > testWithGroupId FAILED
14:28:23 org.scalatest.exceptions.TestFailedException: Consumed 0 records
before timeout instead of the expected 200 records
14:28:23 at
org.scalatest.Assertions.newAssertionFailedException(Assertions.scala:530)
14:28:23 at
org.scalatest.Assertions.newAssertionFailedException$(Assertions.scala:529)
14:28:23 at
org.scalatest.Assertions$.newAssertionFailedException(Assertions.scala:1389)
14:28:23 at org.scalatest.Assertions.fail(Assertions.scala:1091)
14:28:23 at org.scalatest.Assertions.fail$(Assertions.scala:1087)
14:28:23 at org.scalatest.Assertions$.fail(Assertions.scala:1389)
14:28:23 at
kafka.utils.TestUtils$.pollUntilAtLeastNumRecords(TestUtils.scala:843)
14:28:23 at
kafka.api.TransactionsBounceTest.testWithGroupId(TransactionsBounceTest.scala:110)
```
This was followed by a bunch of test failures such as the following:
```
14:28:38 kafka.api.TransactionsBounceTest > classMethod FAILED
14:28:38 java.lang.AssertionError: Found unexpected threads during
@AfterClass, allThreads=HashSet(controller-event-thread,
ExpirationReaper-0-topic, ExpirationReaper-0-ElectLeader,
ExpirationReaper-0-Heartbeat, metrics-meter-tick-thread-2, main,
metrics-meter-tick-thread-1,
data-plane-kafka-socket-acceptor-ListenerName(PLAINTEXT)-PLAINTEXT-41287,
scala-execution-context-global-246, transaction-log-manager-0, Reference
Handler, scala-execution-context-global-24107, /127.0.0.1:35460 to
/127.0.0.1:42451 workers Thread 2, /127.0.0.1:35460 to /127.0.0.1:42451 workers
Thread 3, kafka-log-cleaner-thread-0, ExpirationReaper-0-Fetch,
scala-execution-context-global-12253, ExpirationReaper-0-Rebalance,
Common-Cleaner, daemon-broker-bouncer-EventThread, Signal Dispatcher,
SensorExpiryThread, daemon-broker-bouncer-SendThread(127.0.0.1:32919),
kafka-scheduler-0, kafka-scheduler-3, kafka-scheduler-4, kafka-scheduler-1,
kafka-scheduler-2, kafka-scheduler-7, ExpirationReaper-0-DeleteRecords,
kafka-scheduler-8, kafka-scheduler-5, kafka-scheduler-6,
scala-execution-context-global-4200, kafka-scheduler-9, LogDirFailureHandler,
TxnMarkerSenderThread-0, /config/changes-event-process-thread,
ExpirationReaper-0-AlterAcls, group-metadata-manager-0, Test worker, Finalizer,
scala-execution-context-global-4199, ThrottledChannelReaper-Produce,
data-plane-kafka-request-handler-3, data-plane-kafka-request-handler-2,
Controller-0-to-broker-0-send-thread, data-plane-kafka-request-handler-1,
data-plane-kafka-network-thread-0-ListenerName(PLAINTEXT)-PLAINTEXT-1,
data-plane-kafka-request-handler-0,
data-plane-kafka-network-thread-0-ListenerName(PLAINTEXT)-PLAINTEXT-0,
data-plane-kafka-network-thread-0-ListenerName(PLAINTEXT)-PLAINTEXT-2,
scala-execution-context-global-572, scala-execution-context-global-573,
data-plane-kafka-request-handler-7, data-plane-kafka-request-handler-6,
data-plane-kafka-request-handler-5, scala-execution-context-global-137,
data-plane-kafka-request-handler-4, ThrottledChannelReaper-Request,
ExpirationReaper-0-Produce, ThrottledChannelReaper-Fetch),
unexpected=HashSet(controller-event-thread, daemon-broker-bouncer-EventThread)
```
The test case needs to ensure that `BounceScheduler` gets shutdown properly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)