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

2020-02-06 Thread Jordan West (Jira)


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

Jordan West commented on CASSANDRA-1:
-

LGTM. +1. Thanks David. 

> Lower the amount of garbage ChecksummingTransformerTest generates by reusing 
> memory
> ---
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2020-02-06 Thread Brandon Williams (Jira)


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

Brandon Williams commented on CASSANDRA-1:
--

LGTM, +1.  Far less GC as 500 examples couldn't pass before and now the default 
of 1k is not a problem.

> Lower the amount of garbage ChecksummingTransformerTest generates by reusing 
> memory
> ---
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2020-02-06 Thread David Capwell (Jira)


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

David Capwell commented on CASSANDRA-1:
---

All examples above were called by running the following

 

{code}

ant testclasslist -Dtest.classlistfile=<(echo 
org/apache/cassandra/transport/frame/checksum/ChecksummingTransformerTest.java) 
-Dtest.classlistprefix=unit

{code}

 

In order to not timeout, I added -Dtest.timeout=6000

> Lower the amount of garbage ChecksummingTransformerTest generates by reusing 
> memory
> ---
>
> Key: CASSANDRA-1
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1
> 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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



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

2020-02-06 Thread David Capwell (Jira)


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

David Capwell commented on CASSANDRA-1:
---

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/08cddl2s25j7fq3jdb76gh4rgn/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/08cddl2s25j7fq3jdb76gh4rgn/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/08cddl2s25j7fq3jdb76gh4rgn/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/08cddl2s25j7fq3jdb76gh4rgn/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=0x00010a7e0ad1, pid=94921, 
tid=0x1103
[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