[
https://issues.apache.org/jira/browse/CASSANDRA-16750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17365395#comment-17365395
]
Berenguer Blasi edited comment on CASSANDRA-16750 at 6/18/21, 9:24 AM:
-----------------------------------------------------------------------
CDC creates a hard link on
{{[CommitLogSegmentManagerCDC.createSegment()|https://github.com/apache/cassandra/blob/cassandra-4.0.0/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDC.java#L149]}}
but this happens in an async operation originating at
{{AbstractCommitLogSegmentManager.start()}}. We can see
[here|https://github.com/apache/cassandra/pull/1074/files#diff-b5c6007ec3a4b31965b4dc10e8c8c50766237f1ce8ac88011035b91215060fc8R51]
the test calls {{cleanup()}} just after staring the commit log service. This
can remove files from under the commit log's feet making the hardlinking fail.
We need to wait for completion.
It can be repro'd easily in a 1K circle run and the fix indeed passes now
was (Author: bereng):
CDC creates a hard link on
{{[CommitLogSegmentManagerCDC.createSegment()|https://github.com/apache/cassandra/blob/cassandra-4.0.0/src/java/org/apache/cassandra/db/commitlog/CommitLogSegmentManagerCDC.java#L149]}}
but this happens in an async operation originating at
{{AbstractCommitLogSegmentManager.start()}}. We can see
[here|https://github.com/apache/cassandra/pull/1074/files#diff-b5c6007ec3a4b31965b4dc10e8c8c50766237f1ce8ac88011035b91215060fc8R51]
the test calls {{cleanup()}} just after staring the commit log service. This
can remove files from under the commit log's feet making the hardlinking fail.
We need to wait for completion.
> Flaky AlibabaCloudSnitchTest
> ----------------------------
>
> Key: CASSANDRA-16750
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16750
> Project: Cassandra
> Issue Type: Bug
> Components: Test/unit
> Reporter: Berenguer Blasi
> Assignee: Berenguer Blasi
> Priority: Normal
> Fix For: 4.0-rc2, 4.0, 4.x
>
>
> Flaky test
> Test error
> {noformat}
> Error Message
> Forked Java VM exited abnormally. Please note the time in the report does not
> reflect the time until the VM exit.
> Stacktrace
> junit.framework.AssertionFailedError: Forked Java VM exited abnormally.
> Please note the time in the report does not reflect the time until the VM
> exit.
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.util.Vector.forEach(Vector.java:1388)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.util.Vector.forEach(Vector.java:1388)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 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.util.Vector.forEach(Vector.java:1388)
> 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
> jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$30$\^eval\_$cu1$restOf/0x00000008403db840.:program(<eval>:13)
> at
> jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:655)
> at
> jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:513)
> at
> jdk.scripting.nashorn/jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:527)
> at
> jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:456)
> at
> jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:413)
> at
> jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:409)
> at
> jdk.scripting.nashorn/jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:162)
> at
> java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.util.Vector.forEach(Vector.java:1388)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> {noformat}
> Log error:
> {noformat}
> AlibabaCloudSnitchTest.BeforeFirstTest failure was
> ERROR [COMMIT-LOG-ALLOCATOR] 2021-06-05 00:41:36,750 Exiting due to error
> while processing commit log during initialization.
> java.lang.RuntimeException: Tried to hard link to file that does not exist
> build/test/cassandra/commitlog/CommitLog-7-1622853696662.log
> at
> org.apache.cassandra.io.util.FileUtils.createHardLink(FileUtils.java:184)
> at
> org.apache.cassandra.db.commitlog.CommitLogSegmentManagerCDC.createSegment(CommitLogSegmentManagerCDC.java:149)
> at
> org.apache.cassandra.db.commitlog.AbstractCommitLogSegmentManager$1.runMayThrow(AbstractCommitLogSegmentManager.java:115)
> at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
> at
> io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> at java.lang.Thread.run(Thread.java:748)
> ref:
> https://nightlies.apache.org/cassandra/cassandra-4.0.0/Cassandra-4.0.0-test-cdc/6/Cassandra-4.0.0-test-cdc/jdk=jdk_1.8_latest,label=cassandra,split=6/build/test/logs/cdc/TEST-org.apache.cassandra.locator.AlibabaCloudSnitchTest.log.xz
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]