You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "divijvaidya (via GitHub)" <gi...@apache.org> on 2023/06/15 10:24:50 UTC

[GitHub] [kafka] divijvaidya opened a new pull request, #13858: MINOR: Add more information in assertion failure for non daemon threads

divijvaidya opened a new pull request, #13858:
URL: https://github.com/apache/kafka/pull/13858

   ## Problem
   Sometimes we have flaky test failures with a stack trace such as:
   ```
   org.opentest4j.AssertionFailedError: expected: <0> but was: <1>
   	at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
   	at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
   	at app//org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
   	at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
   	at app//org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
   	at app//org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:528)
   	at app//kafka.utils.TestUtils$.assertNoNonDaemonThreads(TestUtils.scala:1347)
   	at app//kafka.server.ReplicaManagerTest.testDeltaFollowerRemovedTopic(ReplicaManagerTest.scala:3965)
   	at java.base@11.0.19/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base@11.0.19/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base@11.0.19/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base@11.0.19/java.lang.reflect.Method.invoke(Method.java:566)
   ```
   
   This stack trace tells us that there were unexpected non daemon threads running but it doesn't tell us the name of those thread.
   
   ## Solution
   This code change adds the names of the unexpected threads which can help in debugging. Note that the names are only printed if the assertion on count fails.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya merged pull request #13858: MINOR: Add more information in assertion failure for non daemon threads

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya merged PR #13858:
URL: https://github.com/apache/kafka/pull/13858


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [kafka] divijvaidya commented on pull request #13858: MINOR: Add more information in assertion failure for non daemon threads

Posted by "divijvaidya (via GitHub)" <gi...@apache.org>.
divijvaidya commented on PR #13858:
URL: https://github.com/apache/kafka/pull/13858#issuecomment-1594662486

   Unrelated test failures:
   ```
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationExactlyOnceTest.testReplicateTargetDefault()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationExactlyOnceTest/Build___JDK_8_and_Scala_2_12___testReplicateTargetDefault__/)
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.controller.QuorumControllerTest.testBalancePartitionLeaders()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.controller/QuorumControllerTest/Build___JDK_8_and_Scala_2_12___testBalancePartitionLeaders__/)
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.controller.QuorumControllerTest.testBalancePartitionLeaders()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.controller/QuorumControllerTest/Build___JDK_8_and_Scala_2_12___testBalancePartitionLeaders___2/)
   [Build / JDK 11 and Scala 2.13 / kafka.api.ConsumerBounceTest.testCloseDuringRebalance()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/kafka.api/ConsumerBounceTest/Build___JDK_11_and_Scala_2_13___testCloseDuringRebalance__/)
   [Build / JDK 11 and Scala 2.13 / kafka.api.ConsumerBounceTest.testCloseDuringRebalance()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/kafka.api/ConsumerBounceTest/Build___JDK_11_and_Scala_2_13___testCloseDuringRebalance___2/)
   [Build / JDK 11 and Scala 2.13 / kafka.api.TransactionsTest.testSendOffsetsToTransactionTimeout(String).quorum=kraft](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/kafka.api/TransactionsTest/Build___JDK_11_and_Scala_2_13___testSendOffsetsToTransactionTimeout_String__quorum_kraft/)
   [Build / JDK 11 and Scala 2.13 / org.apache.kafka.streams.integration.EosV2UpgradeIntegrationTest.shouldUpgradeFromEosAlphaToEosV2[true]](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.streams.integration/EosV2UpgradeIntegrationTest/Build___JDK_11_and_Scala_2_13___shouldUpgradeFromEosAlphaToEosV2_true_/)
   [Build / JDK 17 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_17_and_Scala_2_13___testReplication__/)
   [Build / JDK 17 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_17_and_Scala_2_13___testReplication___2/)
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_8_and_Scala_2_12___testReplication__/)
   [Build / JDK 8 and Scala 2.12 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_8_and_Scala_2_12___testReplication___2/)
   [Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_11_and_Scala_2_13___testReplication__/)
   [Build / JDK 11 and Scala 2.13 / org.apache.kafka.connect.mirror.integration.MirrorConnectorsIntegrationTransactionsTest.testReplication()](https://ci-builds.apache.org/job/Kafka/job/kafka-pr/job/PR-13858/3/testReport/junit/org.apache.kafka.connect.mirror.integration/MirrorConnectorsIntegrationTransactionsTest/Build___JDK_11_and_Scala_2_13___testReplication___2/)
   ```
   
   The MirrorMaker failures are newly introduced in trunk.
   Existing ticket https://issues.apache.org/jira/browse/KAFKA-15052  for testBalancePartitionLeaders()
   Existing ticket https://issues.apache.org/jira/browse/KAFKA-8529 for testCloseDuringRebalance()
   Added new ticket https://issues.apache.org/jira/browse/KAFKA-15095 for shouldUpgradeFromEosAlphaToEosV2()


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org