You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/24 11:21:13 UTC

[GitHub] [pulsar] lhotari opened a new issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

lhotari opened a new issue #11032:
URL: https://github.com/apache/pulsar/issues/11032


   ZKSessionTest is flaky. The testReacquireLeadershipAfterSessionLost test method fails sporadically.
   
   [example failure](https://github.com/apache/pulsar/pull/11026/checks?check_run_id=2889407530#step:9:4861)
   
   ```
   Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 4, Time elapsed: 31.46 s <<< FAILURE! - in org.apache.pulsar.metadata.ZKSessionTest
   Error:  testReacquireLeadershipAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 15.396 s  <<< FAILURE!
   org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.apache.pulsar.metadata.ZKSessionTest that uses org.apache.pulsar.metadata.api.coordination.LeaderElection expected [Leading] but found [NoLeader] within 10 seconds.
   	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
   	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
   	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
   	at org.apache.pulsar.metadata.ZKSessionTest.testReacquireLeadershipAfterSessionLost(ZKSessionTest.java:174)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.AssertionError: expected [Leading] but found [NoLeader]
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
   	at org.testng.Assert.assertEquals(Assert.java:122)
   	at org.testng.Assert.assertEquals(Assert.java:617)
   	at org.apache.pulsar.metadata.ZKSessionTest.lambda$testReacquireLeadershipAfterSessionLost$1(ZKSessionTest.java:175)
   	at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:222)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:209)
   	... 4 more
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari closed issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari closed issue #11032:
URL: https://github.com/apache/pulsar/issues/11032


   


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] mattisonchao commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-867304248


   I want to fix it. :)


-- 
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.

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-904551935


   This test remains flaky. Reopening this issue
   
   Here's a recent failure:
   ```
   Error:  testReacquireLocksAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 17.782 s  <<< FAILURE!
   org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.apache.pulsar.metadata.ZKSessionTest that uses org.apache.pulsar.metadata.api.coordination.ResourceLock expected [false] but found [true] within 10 seconds.
   	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
   	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
   	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
   	at org.apache.pulsar.metadata.ZKSessionTest.testReacquireLocksAfterSessionLost(ZKSessionTest.java:130)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.AssertionError: expected [false] but found [true]
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   	at org.testng.Assert.assertFalse(Assert.java:67)
   	at org.testng.Assert.assertFalse(Assert.java:77)
   	at org.apache.pulsar.metadata.ZKSessionTest.lambda$testReacquireLocksAfterSessionLost$0(ZKSessionTest.java:131)
   	at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:222)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:209)
   	... 4 more
   ```
   
   this happened in https://github.com/apache/pulsar/pull/11758/checks?check_run_id=3408040594#step:8:4706


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-905216663


   there's a mitigation for this flaky test in #11771 by using a solution which cleans up state between test retries.


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-904554941


   There's also `expected [SessionReestablished] but found [Reconnected]` type of assertion failures
   ```
   Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 43.614 s <<< FAILURE! - in org.apache.pulsar.metadata.ZKSessionTest
   Error:  testReacquireLocksAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 8.149 s  <<< FAILURE!
   java.lang.AssertionError: expected [SessionReestablished] but found [Reconnected]
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   	at org.testng.Assert.assertEqualsImpl(Assert.java:140)
   	at org.testng.Assert.assertEquals(Assert.java:122)
   	at org.testng.Assert.assertEquals(Assert.java:617)
   	at org.apache.pulsar.metadata.ZKSessionTest.testReacquireLocksAfterSessionLost(ZKSessionTest.java:128)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   ```
   in https://github.com/apache/pulsar/pull/11758/checks?check_run_id=3408040594#step:8:3079


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-866547026


   [Another exception in the same test](https://github.com/apache/pulsar/pull/11026/checks?check_run_id=2889407530#step:9:3196)
   
   ```
   Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 4, Time elapsed: 17.285 s <<< FAILURE! - in org.apache.pulsar.metadata.ZKSessionTest
   Error:  testReacquireLeadershipAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 3.037 s  <<< FAILURE!
   java.lang.AssertionError: expected [null] but found [NoLeader]
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotSame(Assert.java:1033)
   	at org.testng.Assert.assertNull(Assert.java:965)
   	at org.testng.Assert.assertNull(Assert.java:953)
   	at org.apache.pulsar.metadata.ZKSessionTest.testReacquireLeadershipAfterSessionLost(ZKSessionTest.java:179)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   ```


-- 
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.

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-904594535


   [also](https://github.com/apache/pulsar/pull/11737/checks?check_run_id=3410256416#step:8:1454) 
   ```
   Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 30.201 s <<< FAILURE! - in org.apache.pulsar.metadata.ZKSessionTest
   Error:  testReacquireLocksAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 12.986 s  <<< FAILURE!
   org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.apache.pulsar.metadata.ZKSessionTest that uses org.apache.pulsar.metadata.api.coordination.ResourceLock expected [false] but found [true] within 10 seconds.
   	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
   	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
   	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
   	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
   	at org.apache.pulsar.metadata.ZKSessionTest.testReacquireLocksAfterSessionLost(ZKSessionTest.java:130)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
   	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:45)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:73)
   	at org.testng.internal.InvokeMethodRunnable.call(InvokeMethodRunnable.java:11)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: java.lang.AssertionError: expected [false] but found [true]
   	at org.testng.Assert.fail(Assert.java:99)
   	at org.testng.Assert.failNotEquals(Assert.java:1037)
   	at org.testng.Assert.assertFalse(Assert.java:67)
   	at org.testng.Assert.assertFalse(Assert.java:77)
   	at org.apache.pulsar.metadata.ZKSessionTest.lambda$testReacquireLocksAfterSessionLost$0(ZKSessionTest.java:131)
   	at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:222)
   	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:209)
   	... 4 more
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-867169921


   [yet another](https://github.com/apache/pulsar/pull/11026/checks?check_run_id=2898206737#step:9:6817)


-- 
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.

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



[GitHub] [pulsar] lhotari edited a comment on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari edited a comment on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-867169921


   [another failure in testReacquireLocksAfterSessionLost method](https://github.com/apache/pulsar/pull/11026/checks?check_run_id=2898206737#step:9:6817)
   
   ```
   Error:  Tests run: 6, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 75.825 s <<< FAILURE! - in org.apache.pulsar.metadata.ZKSessionTest
   Error:  testReacquireLocksAfterSessionLost(org.apache.pulsar.metadata.ZKSessionTest)  Time elapsed: 24.543 s  <<< FAILURE!
   java.util.concurrent.CompletionException: org.apache.pulsar.metadata.api.MetadataStoreException: org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /key-1455163628288
   	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
   	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
   	at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:777)
   	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
   	at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$storeDelete$21(ZKMetadataStore.java:277)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
   	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
   	at java.base/java.lang.Thread.run(Thread.java:829)
   Caused by: org.apache.pulsar.metadata.api.MetadataStoreException: org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /key-1455163628288
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.getException(ZKMetadataStore.java:314)
   	... 5 more
   Caused by: org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /key-1455163628288
   	at org.apache.zookeeper.KeeperException.create(KeeperException.java:134)
   	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54)
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.getException(ZKMetadataStore.java:304)
   	... 5 more
   ```


-- 
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.

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



[GitHub] [pulsar] sijie closed issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
sijie closed issue #11032:
URL: https://github.com/apache/pulsar/issues/11032


   


-- 
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: commits-unsubscribe@pulsar.apache.org

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



[GitHub] [pulsar] lhotari commented on issue #11032: Flaky-test: ZKSessionTest.testReacquireLeadershipAfterSessionLost

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #11032:
URL: https://github.com/apache/pulsar/issues/11032#issuecomment-911170852


   fixed by #11886


-- 
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: commits-unsubscribe@pulsar.apache.org

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