[jira] [Comment Edited] (CASSANDRA-16862) Fix flaky test DatabaseDescriptorRefTest
[ https://issues.apache.org/jira/browse/CASSANDRA-16862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416839#comment-17416839 ] Ekaterina Dimitrova edited comment on CASSANDRA-16862 at 9/17/21, 6:10 PM: --- I'll look at it and test. Marking as "NEEDS COMMITTER" in the meantime as we need second reviewer committer. was (Author: e.dimitrova): I'll look at it and test. Marking as "NEEDS COMMITTER" in the meantime as we need second reviewer. > Fix flaky test DatabaseDescriptorRefTest > > > Key: CASSANDRA-16862 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16862 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Assignee: Aleksei Zotov >Priority: Normal > Fix For: 3.11.x, 4.0.x, 4.x > > > While working on another ticket I found out that DatabaseDescriptorRefTest is > failing consistently locally for me and one more community member on 3.11, > 4.0 and trunk. > {code:java} > java.lang.AssertionError: thread started in clientInitialization > Expected :5 > Actual :8 > > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:834) > at org.junit.Assert.assertEquals(Assert.java:645) > at > org.apache.cassandra.config.DatabaseDescriptorRefTest.testDatabaseDescriptorRef(DatabaseDescriptorRefTest.java:285) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) > at > com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) > at > com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221) > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-16862) Fix flaky test DatabaseDescriptorRefTest
[ https://issues.apache.org/jira/browse/CASSANDRA-16862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17416550#comment-17416550 ] Aleksei Zotov edited comment on CASSANDRA-16862 at 9/17/21, 8:48 AM: - [~e.dimitrova] [~brandon.williams] [~sumanth.pasupuleti] I've taken a look to the test a bit closer and here is what I can see: # it sometimes (once per ~15 runs) passes in Intellij in "run" mode # it always passes in Intellij in "debug" mode # the problem is caused by "Attach Listener" which is related to [Dynamic Attach|http://openjdk.java.net/groups/hotspot/docs/Serviceability.html] feature of JVM # if I add {{-XX:+DisableAttachMechanism}} parameter then the test always pass in Intellij in "run" mode Conclusion: # the test works in "debug" mode because Intellij attaches to JVM though an agentlib, not through "Dynamic Attach": {code:java}-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59053,suspend=y,server=n{code} This is parameter is the only difference between "run" and "debug" configuration # the issue is caused by IDE (Intellij in my case) which tries to attach to the JVM. I found no details on how to disable such a behavior in Intellij for "run" mode. # {{ant}} works fine because no process tries to attach to JVM I came up with a fix and here is the summary of changes: # started ignoring "Attach Listener" thread # started ignoring Logback-related threads by names instead of having assumption that two additional threads are always Logback-related # started filtering out multiple Logback basic threads (while debugging the problem I mentioned that sometimes two threads _logback-1_ and _logback-2_ are spawned) # fixed warnings Here are the patches: * [3.11|https://github.com/alex-ninja/cassandra/commit/5bf8f1debfd547b5c8e613b294b50ea8f56a3367] * [4.0|https://github.com/alex-ninja/cassandra/commit/c7de42d70dd28bbc9049286f9db7f8b3fb2f6b7d] * [trunk|https://github.com/alex-ninja/cassandra/commit/683fea50002694bce27b3b687194f5db3ef11fd1] Could you please review them and try out on your local machines. was (Author: azotcsit): [~e.dimitrova] [~brandon.williams] [~sumanth.pasupuleti] I've taken a look to the test a bit closer and here is what I can see: # it sometimes (once per ~15 runs) passes in Intellij in "run" mode # it always passes in Intellij in "debug" mode # the problem is caused by "Attach Listener" which is related to [Dynamic Attach|http://openjdk.java.net/groups/hotspot/docs/Serviceability.html] feature of JVM # if I add {{-XX:+DisableAttachMechanism}} parameter then the test always pass in Intellij in "run" mode Conclusion: # the test works in "debug" mode because Intellij attaches to JVM though an agentlib, not through "Dynamic Attach": {code:java} -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59053,suspend=y,server=n{code} This is parameter is the only difference between "run" and "debug" configuration # the issue is caused by IDE (Intellij in my case) which tries to attach to the JVM. I found no details on how to disable such a behavior in Intellij for "run" mode. # {{ant}} works fine because no process tries to attach to JVM I came up with a fix and here is the summary of changes: # started ignoring "Attach Listener" thread # started ignoring Logback-related threads by names instead of having assumption that two additional threads are always Logback-related # started filtering out multiple Logback basic threads (while debugging the problem I mentioned that sometimes two threads _logback-1_ and _logback-2_ are spawned) # fixed warnings Here are the patches: * [3.11|https://github.com/alex-ninja/cassandra/commit/5bf8f1debfd547b5c8e613b294b50ea8f56a3367] * [4.0|https://github.com/alex-ninja/cassandra/commit/c7de42d70dd28bbc9049286f9db7f8b3fb2f6b7d] * [trunk|https://github.com/alex-ninja/cassandra/commit/683fea50002694bce27b3b687194f5db3ef11fd1] Could you please review them and try out on your local machines. > Fix flaky test DatabaseDescriptorRefTest > > > Key: CASSANDRA-16862 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16862 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Assignee: Aleksei Zotov >Priority: Normal > Fix For: 3.11.x, 4.0.x, 4.x > > > While working on another ticket I found out that DatabaseDescriptorRefTest is > failing consistently locally for me and one more community member on 3.11, > 4.0 and trunk. > {code:java} > java.lang.AssertionError: thread started in clientInitialization > Expected :5 > Actual :8 > > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:834) > at org.junit.Assert.assertEquals(Assert.java:645) > at >
[jira] [Comment Edited] (CASSANDRA-16862) Fix flaky test DatabaseDescriptorRefTest
[ https://issues.apache.org/jira/browse/CASSANDRA-16862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17415432#comment-17415432 ] Aleksei Zotov edited comment on CASSANDRA-16862 at 9/15/21, 10:30 AM: -- JFYI. The test passed via {{ant}}, however, failed in IDE: {code:java} java.lang.AssertionError: thread started in clientInitialization Expected :5 Actual :8 {code} Environment: * Intellij Idea 2021.2.2 * JDK 8u281 * Ant 1.10.10 * Ubuntu 20.04 was (Author: azotcsit): JFYI. The test passed via {{ant,}}however{{,f}}ailed in IDE: {code:java} java.lang.AssertionError: thread started in clientInitialization Expected :5 Actual :8 {code} Environment: * Intellij Idea 2021.2.2 * JDK 8u281 * Ant 1.10.10 * Ubuntu 20.04 > Fix flaky test DatabaseDescriptorRefTest > > > Key: CASSANDRA-16862 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16862 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Priority: Normal > Fix For: 3.11.x, 4.0.x, 4.x > > > While working on another ticket I found out that DatabaseDescriptorRefTest is > failing consistently locally for me and one more community member on 3.11, > 4.0 and trunk. > {code:java} > java.lang.AssertionError: thread started in clientInitialization > Expected :5 > Actual :8 > > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:834) > at org.junit.Assert.assertEquals(Assert.java:645) > at > org.apache.cassandra.config.DatabaseDescriptorRefTest.testDatabaseDescriptorRef(DatabaseDescriptorRefTest.java:285) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) > at > com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) > at > com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221) > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-16862) Fix flaky test DatabaseDescriptorRefTest
[ https://issues.apache.org/jira/browse/CASSANDRA-16862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17400681#comment-17400681 ] Ekaterina Dimitrova edited comment on CASSANDRA-16862 at 8/18/21, 12:28 AM: Yes, that works actually. I am surprised because I am 100% sure that some time ago I was working on that class and everything was passing(in the IDE). Also, it was failing for two of us but not for [~brandon.williams]. [~brandonwilliams], did you actually run it from IDE or the command line? Do you know what is the reason so I can add a comment in the test for example? For others so they don't troubleshoot and raise tickets :D And thank you for the quick response, appreciate it :) was (Author: e.dimitrova): Yes, that works actually. I am surprised because I am 100% sure that some time ago I was working on that class and everything was passing. Also, it was failing for two of us but not for [~brandon.williams]. [~brandonwilliams], did you actually run it from IDE or the command line? Do you know what is the reason so I can add a comment in the test for example? For others so they don't troubleshoot and raise tickets :D And thank you for the quick response, appreciate it :) > Fix flaky test DatabaseDescriptorRefTest > > > Key: CASSANDRA-16862 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16862 > Project: Cassandra > Issue Type: Bug > Components: CI >Reporter: Ekaterina Dimitrova >Priority: Normal > Fix For: 3.11.x, 4.0.x, 4.x > > > While working on another ticket I found out that DatabaseDescriptorRefTest is > failing consistently locally for me and one more community member on 3.11, > 4.0 and trunk. > {code:java} > java.lang.AssertionError: thread started in clientInitialization > Expected :5 > Actual :8 > > at org.junit.Assert.fail(Assert.java:88) > at org.junit.Assert.failNotEquals(Assert.java:834) > at org.junit.Assert.assertEquals(Assert.java:645) > at > org.apache.cassandra.config.DatabaseDescriptorRefTest.testDatabaseDescriptorRef(DatabaseDescriptorRefTest.java:285) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) > at org.junit.runners.ParentRunner.run(ParentRunner.java:363) > at org.junit.runner.JUnitCore.run(JUnitCore.java:137) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) > at > com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) > at > com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221) > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org