You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "David Capwell (Jira)" <ji...@apache.org> on 2020/02/06 22:38:00 UTC

[jira] [Commented] (CASSANDRA-15555) Lower the amount of garbage ChecksummingTransformerTest generates by reusing memory

    [ https://issues.apache.org/jira/browse/CASSANDRA-15555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031998#comment-17031998 ] 

David Capwell commented on CASSANDRA-15555:
-------------------------------------------

I made sure to replicate the four different modes: success, timeout, failure, crash; samples are shown below.

I also monitored the JVM's memory during the test and see that it grows very slowly; old gen grows 1% every 10 seconds so takes a while to get a stop the world GC, once that happens we drop all the way back down to 27%.

# Success

testclasslist:
     [echo] Number of test runners: 1
[junit-timeout] Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[junit-timeout] Testsuite: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest
[junit-timeout] Testsuite: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.988 sec
[junit-timeout]
[junitreport] Processing /Users/davidcapwell/src/github/apache/cassandra/build/test/TESTS-TestSuites.xml to /var/folders/cm/08cddl2s25j7fq3jdb76gh4r0000gn/T/null80285074
[junitreport] Loading stylesheet jar:file:/usr/local/Cellar/ant/1.10.7/libexec/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 224ms
[junitreport] Deleting: /var/folders/cm/08cddl2s25j7fq3jdb76gh4r0000gn/T/null80285074

# Failure (timeout)

[junit-timeout] Testsuite: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest
[junit-timeout] Testsuite: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit-timeout]
[junit-timeout] Testcase: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest:corruptionCausesFailure:    Caused an ERROR
[junit-timeout] Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit-timeout] junit.framework.AssertionFailedError: Timeout occurred. Please note the time in the report does not reflect the time until the timeout.
[junit-timeout]         at java.util.Vector.forEach(Vector.java:1275)
[junit-timeout]         at java.util.Vector.forEach(Vector.java:1275)
[junit-timeout]         at java.lang.Thread.run(Thread.java:748)
[junit-timeout]
[junit-timeout]
[junit-timeout] Test org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest FAILED (timeout)

# Failure

... (way too much output to show here)
[junit-timeout] Seed was 121866756470991
[junit-timeout]         at org.quicktheories.core.ExceptionReporter.falsify(ExceptionReporter.java:43)
[junit-timeout]         at org.quicktheories.core.ExceptionReporter.falisification(ExceptionReporter.java:37)
[junit-timeout]         at org.quicktheories.impl.TheoryRunner.reportFalsification(TheoryRunner.java:48)
[junit-timeout]         at org.quicktheories.impl.TheoryRunner.check(TheoryRunner.java:37)
[junit-timeout]         at org.quicktheories.dsl.TheoryBuilder4.check(TheoryBuilder4.java:150)
[junit-timeout]         at org.quicktheories.dsl.TheoryBuilder4.checkAssert(TheoryBuilder4.java:162)
[junit-timeout]         at org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest.corruptionCausesFailure(ChecksummingTransformerTest.java:89)
[junit-timeout]
[junit-timeout]
[junit-timeout] Test org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest FAILED
[junitreport] Processing /Users/davidcapwell/src/github/apache/cassandra/build/test/TESTS-TestSuites.xml to /var/folders/cm/08cddl2s25j7fq3jdb76gh4r0000gn/T/null958014975
[junitreport] Loading stylesheet jar:file:/usr/local/Cellar/ant/1.10.7/libexec/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 987ms
[junitreport] Deleting: /var/folders/cm/08cddl2s25j7fq3jdb76gh4r0000gn/T/null958014975

BUILD FAILED

# Failure with Jvm Crash

testclasslist:
     [echo] Number of test runners: 1
    [mkdir] Created dir: /Users/davidcapwell/src/github/apache/cassandra/build/test/cassandra
    [mkdir] Created dir: /Users/davidcapwell/src/github/apache/cassandra/build/test/output
[junit-timeout] Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
[junit-timeout] Testsuite: org.apache.cassandra.transport.frame.checksum.ChecksummingTransformerTest
[junit-timeout] #
[junit-timeout] # A fatal error has been detected by the Java Runtime Environment:
[junit-timeout] #
[junit-timeout] #  SIGBUS (0xa) at pc=0x000000010a7e0ad1, pid=94921, tid=0x0000000000001103
[junit-timeout] #
[junit-timeout] # JRE version: OpenJDK Runtime Environment (8.0_222-b10) (build 1.8.0_222-b10)
[junit-timeout] # Java VM: OpenJDK 64-Bit Server VM (25.222-b10 mixed mode bsd-amd64 compressed oops)
[junit-timeout] # Problematic frame:
[junit-timeout] # C  [liblz4-java8893363888200447141.dylib+0x3ad1]  LZ4_decompress_fast+0xf1
[junit-timeout] #
[junit-timeout] # Core dump written. Default location: /cores/core or core.94921
[junit-timeout] #
[junit-timeout] # An error report file with more information is saved as:
[junit-timeout] # /Users/davidcapwell/src/github/apache/cassandra/hs_err_pid94921.log


> Lower the amount of garbage ChecksummingTransformerTest generates by reusing memory
> -----------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-15555
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15555
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: Test/unit
>            Reporter: David Capwell
>            Assignee: David Capwell
>            Priority: Normal
>              Labels: pull-request-available
>             Fix For: 4.0-alpha
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When the test finds a issue and attempts to shrink, a ton of garbage is generated which cause the test to then fail with GC issues.  Since the test is a quick theories test, we can rewrite the generates to reuse memory rather than creating new objects for each iteration.  This will also let us move away from String which requires multiple copies in the test and gets rid of the getBytes() call which is dependent on the system its called on.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org