Comments (2)
Hi!
I can see you have an incredibly long time-to-safepoint (sync phase), 108196 milliseconds. However, I don't see the connection to the blocked threads you've shared. Blocked threads are waiting on a monitor, which does not stop the thread coming to a safepoint. In fact, blocked threads are already at a safepoint, so they do not contribute to time-to-safepoint delays.
Only a running thread will delay reaching a safepoint, in normal circumstances. It's also possible that something outside the JVM is causing a pause, for example something at the OS level, and it just seems like it's related to safepoints because that's where the metrics are.
If it is truly a safepoint issue, I suggest two techniques for diagnosis.
- Use these debug flags to print the thread(s) which are slow to reach the safepoint:
-XX:+SafepointTimeout -XX:SafepointTimeoutDelay=1000
- Use https://github.com/async-profiler/async-profiler with
--ttsp
(time-to-safepoint) profiling mode enabled. This will show you what activity is happening in your process while waiting for all threads to reach a safepoint. If async-profiler doesn't show any/many samples during that time, it's an indication that this is something happening external to the java process.
Useful references:
https://krzysztofslusarski.github.io/2020/11/14/tts.html
http://psy-lob-saw.blogspot.com/2015/12/safepoints.html
I don't see any reason to believe this is a bug in Corretto, but I'll leave this open for now in case you have any further questions.
from corretto-8.
In jdk8, you still can use -XX:+PrintSafepointStatistics
to dump TTSP. Like @olivergillespie pointed out, if you do encounter SafePoint Timeout, hotspot will dump whereabout. that will help you find the culprit.
Besides external reasons, jdk8u has a defect in counted loops. If your program has a counted loop and it takes very long time, the thread may hinder other java threads from reaching SafePoint and trigger timeout. In this case, you need to use -XX:+UseCountedLoopSafepoints
or refactor your code.
from corretto-8.
Related Issues (20)
- Problem with servlet application running on batch service. (org.springframework.batch.core) HOT 2
- Correto 8 usage error HOT 1
- JVM crash HOT 4
- java.lang.NoClassDefFoundError: sun.font.SunFontManager exception when moving from oracle jdk 8 to corretto jdk 1.8.0_362. HOT 9
- A fatal error has been detected by the Java Runtime Environment HOT 7
- A fatal error has been detected by the Java Runtime Environment HOT 3
- Java Corretto on workstations - Enterprise configuration HOT 1
- corretto version reports vulnerabilities in nessus scan. HOT 1
- Visual Studio C++ Redistributable has known EOL HOT 2
- crash during pyspak runing HOT 1
- Maven needs JAVA_HOME set to: /usr/lib/jvm/java-1.8.0-amazon-corretto/jre HOT 7
- jfxwebkit.dll cannot load HOT 1
- Can you help me? HOT 1
- OpenJDK Runtime Environment (8.0_382-b05) (build 1.8.0_382-b05) not adaper version when called HCCore.dll HOT 3
- Port JDK-8259943 to Java 8
- JVM crushed HOT 6
- SIGSEGV (0xb) at pc=0x4c8d4804e0c148f6, pid=46732, tid=0x00007faba7690700 HOT 7
- Regression: MSVC DLLs not found when using Javapackager with Corretto 8 versions after 8.372.07.1 HOT 1
- java.nio.Files.readAttributes() truncates file timestamps HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from corretto-8.