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

[JDK18] OutOfMemoryError from StringBuilder/HugeCapacity.java #14091

Closed
babsingh opened this issue Dec 6, 2021 · 4 comments · Fixed by adoptium/aqa-tests#3211
Closed

[JDK18] OutOfMemoryError from StringBuilder/HugeCapacity.java #14091

babsingh opened this issue Dec 6, 2021 · 4 comments · Fixed by adoptium/aqa-tests#3211
Assignees
Labels
comp:vm jdk18 perm excluded The test is unsuitable and permanently excluded.

Comments

@babsingh
Copy link
Contributor

babsingh commented Dec 6, 2021

OpenJDK Tests

TEST: java/lang/StringBuilder/HugeCapacity.java

Error

[2021-11-17T18:33:52.936Z] JVMDUMP039I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" at 2021/11/17 18:33:40 - please wait.
[2021-11-17T18:33:52.936Z] JVMDUMP032I JVM requested Java dump using '/home/jenkins/workspace/Test_openjdknext_j9_sanity.openjdk_aarch64_linux_OpenJDK/aqa-tests/TKG/output_16371734171260/jdk_lang_0/work/scratch/1/javacore.20211117.18
3340.3392515.0001.txt' in response to an event
[2021-11-17T18:33:52.936Z] JVMDUMP010I Java dump written to /home/jenkins/workspace/Test_openjdknext_j9_sanity.openjdk_aarch64_linux_OpenJDK/aqa-tests/TKG/output_16371734171260/jdk_lang_0/work/scratch/1/javacore.20211117.183340.33925
15.0001.txt
[2021-11-17T18:33:52.936Z] JVMDUMP032I JVM requested Snap dump using '/home/jenkins/workspace/Test_openjdknext_j9_sanity.openjdk_aarch64_linux_OpenJDK/aqa-tests/TKG/output_16371734171260/jdk_lang_0/work/scratch/1/Snap.20211117.183340
.3392515.0002.trc' in response to an event
[2021-11-17T18:33:52.936Z] JVMDUMP010I Snap dump written to /home/jenkins/workspace/Test_openjdknext_j9_sanity.openjdk_aarch64_linux_OpenJDK/aqa-tests/TKG/output_16371734171260/jdk_lang_0/work/scratch/1/Snap.20211117.183340.3392515.0
002.trc
[2021-11-17T18:33:52.936Z] JVMDUMP013I Processed dump event "systhrow", detail "java/lang/OutOfMemoryError".
[2021-11-17T18:33:52.936Z] java.lang.UnsupportedOperationException
[2021-11-17T18:33:52.936Z]      at HugeCapacity$MyHugeCharSeq.charAt(HugeCapacity.java:100)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.AbstractStringBuilder.appendChars(AbstractStringBuilder.java:1782)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:675)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.StringBuilder.append(StringBuilder.java:214)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.StringBuilder.append(StringBuilder.java:87)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:616)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.StringBuilder.append(StringBuilder.java:205)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.StringBuilder.append(StringBuilder.java:87)
[2021-11-17T18:33:52.936Z]      at java.base/java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:148)
[2021-11-17T18:33:52.937Z]      at java.base/java.lang.StringBuilder.<init>(StringBuilder.java:139)
[2021-11-17T18:33:52.937Z]      at HugeCapacity.testHugeInitialCharSequence(HugeCapacity.java:90)
[2021-11-17T18:33:52.937Z]      at HugeCapacity.main(HugeCapacity.java:46)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:52)
[2021-11-17T18:33:52.937Z]      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
[2021-11-17T18:33:52.937Z]      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2021-11-17T18:33:52.937Z]      at java.base/java.lang.Thread.run(Thread.java:884)
[2021-11-17T18:33:52.937Z] java.lang.RuntimeException: 1 tests failed
[2021-11-17T18:33:52.937Z]      at HugeCapacity.main(HugeCapacity.java:48)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
[2021-11-17T18:33:52.937Z]      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:52)
[2021-11-17T18:33:52.937Z]      at java.base/java.lang.reflect.Method.invoke(Method.java:577)
[2021-11-17T18:33:52.937Z]      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
[2021-11-17T18:33:52.937Z]      at java.base/java.lang.Thread.run(Thread.java:884)

Related: #13946

@babsingh babsingh added this to the Release 0.31 (Java 18) milestone Dec 6, 2021
@babsingh babsingh changed the title [JDK18] OutOfMemoryError from java/lang/StringBuilder/HugeCapacity.java [JDK18] OutOfMemoryError from StringBuilder/HugeCapacity.java Dec 6, 2021
babsingh added a commit to babsingh/aqa-tests that referenced this issue Dec 6, 2021
babsingh added a commit to babsingh/aqa-tests that referenced this issue Dec 6, 2021
llxia pushed a commit to adoptium/aqa-tests that referenced this issue Dec 7, 2021
@babsingh
Copy link
Contributor Author

As per adoptium/aqa-tests#2141:

StringBuilder/HugeCapacity.java is not compatible with OpenJ9.
a) It requires -XX:+CompactStrings to be the default.
b) It assumes new byte[Integer.MAX_VALUE] throws OOM, but OpenJ9
supports this.

The test exists prior to Java 16, but contains @ignore so doesn't run.
From Java 16 it contains @requires (sun.arch.data.model == "64" & os.maxMemory >= 6G).

Test code: https://github.com/ibmruntimes/openj9-openjdk-jdk/blob/openj9/test/jdk/java/lang/StringBuilder/HugeCapacity.java#L43-L46

#10582 fails at HugeCapacity.testLatin1 but this issue fails at HugeCapacity.testHugeInitialCharSequence after invoking HugeCapacity.testLatin1. OOM is thrown at different points. @pshipton Can this issue be considered a duplicate of #10582?

@pshipton
Copy link
Member

Can this issue be considered a duplicate of #10582?

Sure, it could if #10582 was updated, but you've already created this issue. Seems we can update the exclude list to have the correct permanent excludes and then close this.

@pshipton
Copy link
Member

i.e. if the test class contains more than one test now they both need to be excluded like
java/lang/StringBuilder/HugeCapacity.java#testLatin1
java/lang/StringBuilder/HugeCapacity.java#testHugeInitialCharSequence

I also note the exclude list contains two copies of java/lang/StringBuilder/HugeCapacity.java

babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 12, 2022
- eclipse-openj9/openj9#14079 is a duplicate of adoptium/temurin-build#248.
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14079
Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this issue Jan 13, 2022
- eclipse-openj9/openj9#14091 is a duplicate of adoptium#1297.
- eclipse-openj9/openj9#14095 is a duplicate of eclipse-openj9/openj9#11930.
- Individual sub-tests of StringBuilder/HugeCapacity are excluded.

Closes: eclipse-openj9/openj9#14091
Closes: eclipse-openj9/openj9#14095

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@babsingh
Copy link
Contributor Author

babsingh commented Jan 14, 2022

Excluding StringBuilder/HugeCapacity sub-tests does not work. The original exclude was kept, and the duplicate exclude was removed.

Related:

@babsingh babsingh self-assigned this Jan 17, 2022
@babsingh babsingh added perm excluded The test is unsuitable and permanently excluded. and removed test excluded labels Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:vm jdk18 perm excluded The test is unsuitable and permanently excluded.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants