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

[11.0.24.1+8] ASSERTION FAILED at src/omr/gc/stats/LargeObjectAllocateStats.cpp:1119 #20477

Closed
zheng-kai opened this issue Nov 1, 2024 · 5 comments

Comments

@zheng-kai
Copy link

Java -version output

openjdk version "11.0.24" 2024-07-16
IBM Semeru Runtime Open Edition 11.0.24.1 (build 11.0.24+8)
Eclipse OpenJ9 VM 11.0.24.1 (build openj9-0.46.1, JRE 11 Linux amd64-64-Bit Compressed References 20240909_1185 (JIT enabled, AOT enabled)
OpenJ9   - 4760d5d320
OMR      - 840a9adba
JCL      - e383b0c225 based on jdk-11.0.24+8)

Summary of problem

It's a simple program that allocates just a 10mb byte array. Normally it shouldn't be a problem, but when -xgc:tlhInitialSize=0 is added, the program crashes. When using the optthruput collector, the program will crash quickly, and when using other collectors, the program will freeze until the system kills the program.

In my understanding, the thread local heap (TLH) should not affect the running of the program. And the TLH should be extensible by the JVM, even if initialized to 0. So I think this should be a defect in openJ9.

In addition, I tested JDK17 and JDK21. They also have the same problem.

Reproduce Steps

  1. Download the source code Case.java
public class Case {
    public static void main(String[] args) {
            byte a[] = new byte[1024*1024*10];
    }
}
  1. Run the programe with command
> javac Case.java
> java -Xgcpolicy:optthruput -Xgc:tlhInitialSize=0 Case
Error calculation logf(), passed 0, returned -inf
14:51:09.013 0x30900    j9mm.141    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/build-scripts/jobs/jdk11u/jdk11u-linux-x64-openj9/workspace/build/src/omr/gc/stats/LargeObjectAllocateStats.cpp:1119: ((false))
...

Diagnostic files

Here are the javacore and Snap files.
dump_files.tar.gz

Error calculation logf(), passed 0, returned -inf
14:51:09.013 0x30900    j9mm.141    *   ** ASSERTION FAILED ** at /home/jenkins/workspace/build-scripts/jobs/jdk11u/jdk11u-linux-x64-openj9/workspace/build/src/omr/gc/stats/LargeObjectAllocateStats.cpp:1119: ((false))
JVMDUMP039I Processing dump event "traceassert", detail "" at 2024/11/01 14:51:09 - please wait.
JVMDUMP032I JVM requested System dump using '/home/zhengkai/shareDir/GCFuzzer/core.20241101.145109.1180917.0001.dmp' in response to an event
JVMPORT030W /proc/sys/kernel/core_pattern setting "|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" specifies that the core dump is to be piped to an external program.  Attempting to rename either core or core.1180930.  Review the manual for the external program to find where the core dump is written and ensure the program does not truncate it.

JVMPORT049I The core file created by child process with pid = 1180930 was not found. Review the documentation for the /proc/sys/kernel/core_pattern program "|/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" to find where the core file is written and ensure that program does not truncate it.

JVMDUMP012E Error in System dump: /home/zhengkai/shareDir/GCFuzzer/core.20241101.145109.1180917.0001.dmp
JVMDUMP032I JVM requested Java dump using '/home/zhengkai/shareDir/GCFuzzer/javacore.20241101.145109.1180917.0002.txt' in response to an event
JVMDUMP010I Java dump written to /home/zhengkai/shareDir/GCFuzzer/javacore.20241101.145109.1180917.0002.txt
JVMDUMP032I JVM requested Snap dump using '/home/zhengkai/shareDir/GCFuzzer/Snap.20241101.145109.1180917.0003.trc' in response to an event
JVMDUMP010I Snap dump written to /home/zhengkai/shareDir/GCFuzzer/Snap.20241101.145109.1180917.0003.trc
JVMDUMP013I Processed dump event "traceassert", detail "".
Copy link

github-actions bot commented Nov 1, 2024

Issue Number: 20477
Status: Open
Recommended Components: comp:gc, comp:vm, comp:test
Recommended Assignees: pshipton, dmitripivkine, keithc-ca

@dmitripivkine
Copy link
Contributor

@amicic FYI

@dmitripivkine
Copy link
Contributor

-Xgc:tlhInitialSize option is not intended to be used with value 0. However there is missed check to prevent taking incorrect value.

@dmitripivkine
Copy link
Contributor

Parsing error has been fixed.

Copy link

github-actions bot commented Nov 5, 2024

Issue Number: 20477
Status: Closed
Actual Components: comp:gc, userRaised
Actual Assignees: No one :(
PR Assignees: dmitripivkine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants