Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Cases for crypto/hash/Sha2.java are failing due to OutOfMemory error #768

Closed
abhijay94 opened this issue May 24, 2019 · 1 comment
Closed

Comments

@abhijay94
Copy link
Contributor

@abhijay94 abhijay94 commented May 24, 2019

I tried the running GUnits in src.test.java.com.crypto.hash.Sha2Test and the test cases get ignored because of the following error:
java.lang.OutOfMemoryError: Requested array size exceeds VM limit at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300) at java.lang.StringCoding.encode(StringCoding.java:344) at java.lang.StringCoding.encode(StringCoding.java:387) at java.lang.String.getBytes(String.java:958) at src.test.java.com.crypto.hash.Sha2Test.setUpClass(Sha2Test.java:38) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68) at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

I tried running the test with a massive maximum heap size of 20GB and still got the same error. Is there a possible memory leak in the test case?

Here are the JVM arguments I used for the test case
-ea -Xms12G -Xmx20G -XX:+UseCompressedOops

@yanglbme I was running all the tests in the project along with code coverage and this is the only test which seems to be failing.

yanglbme added a commit that referenced this issue May 24, 2019
Fix #768
@yanglbme yanglbme removed the help wanted label May 24, 2019
@yanglbme
Copy link
Member

@yanglbme yanglbme commented May 24, 2019

Hi @abhijay94

I've removed the test case which causes OOM error, and now it's ok.

@yanglbme yanglbme closed this May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.