[ https://issues.apache.org/jira/browse/CASSANDRA-16002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17168141#comment-17168141 ]
David Capwell edited comment on CASSANDRA-16002 at 7/30/20, 6:45 PM: --------------------------------------------------------------------- OSS CI doesn't do upgrade tests with java 11, so need to replicate by hand {code} ant testclasslist -Dtest.classlistfile=<( echo "org/apache/cassandra/distributed/upgrade/UpgradeTest.java" ) -Dtest.classlistprefix=distributed ... [junit-timeout] Testcase: upgradeTest(org.apache.cassandra.distributed.upgrade.UpgradeTest): Caused an ERROR [junit-timeout] java.lang.RuntimeException: java.lang.AssertionError: network topology must be assigned before using snitch [junit-timeout] java.lang.RuntimeException: java.lang.RuntimeException: java.lang.AssertionError: network topology must be assigned before using snitch [junit-timeout] at org.apache.cassandra.distributed.impl.IsolatedExecutor.waitOn(IsolatedExecutor.java:209) [junit-timeout] at org.apache.cassandra.distributed.impl.IsolatedExecutor.lambda$sync$7(IsolatedExecutor.java:112) [junit-timeout] at org.apache.cassandra.distributed.impl.Instance.startup(Instance.java:592) [junit-timeout] at org.apache.cassandra.distributed.impl.AbstractCluster$Wrapper.startup(AbstractCluster.java:209) [junit-timeout] at org.apache.cassandra.distributed.impl.AbstractCluster$Wrapper.startup(AbstractCluster.java:200) [junit-timeout] at org.apache.cassandra.distributed.upgrade.UpgradeTestBase$TestCase.run(UpgradeTestBase.java:179) [junit-timeout] at org.apache.cassandra.distributed.upgrade.UpgradeTest.upgradeTest(UpgradeTest.java:50) [junit-timeout] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit-timeout] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [junit-timeout] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [junit-timeout] Caused by: java.lang.RuntimeException: java.lang.AssertionError: network topology must be assigned before using snitch [junit-timeout] at org.apache.cassandra.distributed.impl.Instance.lambda$startup$7(Instance.java:590) [junit-timeout] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [junit-timeout] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [junit-timeout] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [junit-timeout] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [junit-timeout] at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:83) [junit-timeout] at java.base/java.lang.Thread.run(Thread.java:834) [junit-timeout] Caused by: java.lang.AssertionError: network topology must be assigned before using snitch [junit-timeout] at org.apache.cassandra.distributed.impl.DistributedTestSnitch.getDatacenter(DistributedTestSnitch.java:90) [junit-timeout] at org.apache.cassandra.distributed.impl.DistributedTestSnitch.getDatacenter(DistributedTestSnitch.java:85) [junit-timeout] at org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:118) [junit-timeout] at org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:488) [junit-timeout] at org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:137) [junit-timeout] at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:102) [junit-timeout] at org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:60) [junit-timeout] at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:79) [junit-timeout] at org.apache.cassandra.distributed.impl.Instance.lambda$startup$7(Instance.java:509) [junit-timeout] [junit-timeout] [junit-timeout] Test org.apache.cassandra.distributed.upgrade.UpgradeTest FAILED ... {code} was (Author: dcapwell): OSS CI doesn't do upgrade tests with java 11, so need to replicate by hand {code} ant testclasslist -Dtest.classlistfile=<( echo "org/apache/cassandra/distributed/upgrade/UpgradeTest.java" ) -Dtest.classlistprefix=distributed {code} > jvm upgrade dtests fail on java 11 caused by bad initialization order of > DatabaseDescriptor and FileUtils > --------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-16002 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16002 > Project: Cassandra > Issue Type: Bug > Components: Test/dtest > Reporter: David Capwell > Assignee: David Capwell > Priority: Normal > Fix For: 3.0.x, 3.11.x, 4.0-beta > > > In FileUtils we check to see if we have access to some classes (specifically > to set org.apache.cassandra.io.util.FileUtils#isCleanerAvailable), which can > fail in java 11. This is fine with CassandraDaemon as it will just log the > failure, but in in-jvm dtests this can fail to startup an instance with the > following > {code} > java.lang.RuntimeException: java.lang.RuntimeException: > java.lang.AssertionError: network topology must be assigned before using > snitch > at > org.apache.cassandra.distributed.impl.IsolatedExecutor.waitOn(IsolatedExecutor.java:209) > at > org.apache.cassandra.distributed.impl.IsolatedExecutor.lambda$sync$7(IsolatedExecutor.java:112) > at > org.apache.cassandra.distributed.impl.Instance.startup(Instance.java:592) > at > org.apache.cassandra.distributed.impl.AbstractCluster$Wrapper.startup(AbstractCluster.java:209) > at > org.apache.cassandra.distributed.impl.AbstractCluster$Wrapper.startup(AbstractCluster.java:200) > at > org.apache.cassandra.distributed.upgrade.UpgradeTestBase$TestCase.run(UpgradeTestBase.java:179) > at > org.apache.cassandra.distributed.upgrade.UpgradeTest.upgradeTest(UpgradeTest.java:50) > 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) > Caused by: java.lang.RuntimeException: java.lang.AssertionError: network > topology must be assigned before using snitch > at > org.apache.cassandra.distributed.impl.Instance.lambda$startup$7(Instance.java:590) > at > java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) > 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 > org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:83) > at java.base/java.lang.Thread.run(Thread.java:834) > Caused by: java.lang.AssertionError: network topology must be assigned before > using snitch > at > org.apache.cassandra.distributed.impl.DistributedTestSnitch.getDatacenter(DistributedTestSnitch.java:90) > at > org.apache.cassandra.distributed.impl.DistributedTestSnitch.getDatacenter(DistributedTestSnitch.java:85) > at > org.apache.cassandra.locator.DynamicEndpointSnitch.getDatacenter(DynamicEndpointSnitch.java:118) > at > org.apache.cassandra.config.DatabaseDescriptor.applyConfig(DatabaseDescriptor.java:488) > at > org.apache.cassandra.config.DatabaseDescriptor.<clinit>(DatabaseDescriptor.java:137) > at > org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:102) > at > org.apache.cassandra.utils.JVMStabilityInspector.inspectThrowable(JVMStabilityInspector.java:60) > at org.apache.cassandra.io.util.FileUtils.<clinit>(FileUtils.java:78) > at > org.apache.cassandra.distributed.impl.Instance.lambda$startup$7(Instance.java:509) > {code} > The exception isn’t clear, but what is happening is the following > {code} > static > { > boolean canClean = false; > try > { > ByteBuffer buf = ByteBuffer.allocateDirect(1); > ((DirectBuffer) buf).cleaner().clean(); > canClean = true; > } > catch (Throwable t) > { > JVMStabilityInspector.inspectThrowable(t); > logger.info("Cannot initialize un-mmaper. (Are you using a > non-Oracle JVM?) Compacted data files will not be removed promptly. > Consider using an Oracle JVM or using standard disk access mode"); > } > canCleanDirectBuffers = canClean; > } > {code} > JVMStabilityInspector will check the throwable which will eventually call > org.apache.cassandra.config.DatabaseDescriptor#getDiskFailurePolicy which > will try to load the configs and fail -- 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