Repository navigation
Mac Silicon: crazy CPU load around 70% #4215
Description
Description
I’m developing a typical Spring Boot application.
For privacy reasons, I can’t share the project’s source code, but I can provide the Gradle build file to give an idea of the dependencies and structure.
After running the application for some time, I noticed that CPU usage remains constantly high — around 70%, caused by the Java process.
The issue is consistent and reproducible. According to the profiler, the high CPU load originates from:
org.eclipse.equinox.launcher_1.7.0.v20250519-0528.jar
The CPU stays at around 70% usage constantly, even when the application is idle and nothing happens.
Environment
OS: (macOS Tahoe 26.0.1)
Java version:
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
redhat.java version: 1.46.0
gradle.build
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.3'
id 'io.spring.dependency-management' version '1.1.7'
id 'eclipse'
}
group = 'owpk'
version = '0.0.1-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
set('sentryVersion', "8.16.0")
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-quartz'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.telegram:telegrambots-spring-boot-starter:6.9.7.1'
implementation 'org.telegram:telegrambots-client:9.0.0'
implementation 'org.liquibase:liquibase-core'
implementation 'io.sentry:sentry-spring-boot-starter-jakarta'
runtimeOnly 'org.postgresql:postgresql'
implementation 'io.vavr:vavr:0.10.6'
implementation 'org.apache.commons:commons-lang3:3.14.0'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
dependencyManagement {
imports {
mavenBom "io.sentry:sentry-bom:${sentryVersion}"
}
}
tasks.named('test') {
useJUnitPlatform()
}extension host logs:
2025-10-21 20:59:00.405 [warning] vscjava.vscode-lombok - Code actions of kind 'source.fixAll' requested but returned code action is of kind 'refactor'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
2025-10-21 20:59:14.686 [error] [redhat.java] provider FAILED
2025-10-21 20:59:14.686 [error] Error: The request (id: 2286, method: 'textDocument/documentSymbol') has been cancelled
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078118
at re (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078412)
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073196
at Immediate.<anonymous> (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073216)
at processImmediate (node:internal/timers:485:21)
2025-10-21 20:59:15.079 [error] Error: The request (id: 2287, method: 'workspace/executeCommand') has been cancelled
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078118
at re (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078412)
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073196
at Immediate.<anonymous> (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073216)
at processImmediate (node:internal/timers:485:21) java.execute.workspaceCommand {"value":"redhat.java","_lower":"redhat.java"}
2025-10-21 20:59:21.852 [error] [redhat.java] provider FAILED
2025-10-21 20:59:21.852 [error] Error: The request (id: 2304, method: 'textDocument/documentSymbol') has been cancelled
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078118
at re (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078412)
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073196
at Immediate.<anonymous> (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073216)
at processImmediate (node:internal/timers:485:21)
2025-10-21 20:59:40.848 [error] onWillSaveTextDocument-listener from extension 'redhat.java' threw ERROR
2025-10-21 20:59:40.848 [error] Error: timeout
at Timeout._onTimeout (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:142:105371)
at listOnTimeout (node:internal/timers:588:17)
at processTimers (node:internal/timers:523:7)
2025-10-21 20:59:40.849 [warning] vscjava.vscode-lombok - Code actions of kind 'source.fixAll' requested but returned code action is of kind 'refactor'. Code action will be dropped. Please check 'CodeActionContext.only' to only return requested code actions.
2025-10-21 21:12:58.085 [info] ExtensionService#_doActivateExtension naco-siren.gradle-language, startup: false, activationEvent: 'onLanguage:gradle'
2025-10-21 21:14:22.624 [error] [redhat.java] provider FAILED
2025-10-21 21:14:22.624 [error] Error: Internal error.
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078118
at re (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1078412)
at /Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073196
at Immediate.<anonymous> (/Users/slavavorobev/.vscode/extensions/redhat.java-1.46.0-darwin-arm64/dist/extension.js:2:1073216)
at processImmediate (node:internal/timers:485:21)
Activity
fbricon commentedon Oct 21, 2025
can you take 3-4 thread dumps (e.g.
jstack 67127), 30s apart, so we can try to identify which part of the process is misbehaving?fbricon commentedon Oct 21, 2025
you have a vscjava.vscode-lombok extension that should be removed, as its functionality is now built-into vscode-java. It might cause some unwanted behavior.
fbricon commentedon Oct 21, 2025
actually vscode-lombok still has some extra features you might want to keep, but the basic one (enabling lombok generation) is indeed built-into vscode-java
owpk commentedon Oct 21, 2025
@fbricon
Thank you for looking into this — I really like this extension!
You’re right, i realize that I’ve also noticed some unusual behavior when using Lombok features
The PID has changed, but the issue reappeared almost immediately.
Here’s the sequence of commands I used to capture the thread dumps:
Here are the resulting thread dumps:
thread-dump-1.txt
thread-dump-2.txt
thread-dump-3.txt
thread-dump-4.txt
fbricon commentedon Oct 21, 2025
Looks like the language server is stuck looking for references. Can you try setting
java.referencesCodeLens.enabledtofalse, maybe restart vscode?owpk commentedon Oct 21, 2025
I usually restart VS Code when this issue occurs, but it reappears almost immediately after restarting.
I’ve deleted the Lombok extension and disabled References CodeLens. I’ll see what changes.
owpk commentedon Oct 21, 2025
nothing changes
here are the thread dumps again:
thread-dump-5.txt
thread-dump-6.txt
thread-dump-7.txt
thread-dump-8.txt
also i have this:
fbricon commentedon Oct 21, 2025
Garbage collection stressing the CPU due to insufficient memory might be cause for the freezes. Have you tried increasing memory?
How big is your project? how many java files and lines of code? You can use :
fbricon commentedon Oct 21, 2025
other things you can try :
java.gradle.buildServer.enabled(that will probably require running theJava: Clean Java Language Server Workspacecommand)owpk commentedon Oct 21, 2025
OK, I’ll try to increase the memory. What
-Xmx/-Xmsvalues would you suggest?fbricon commentedon Oct 21, 2025
that really is a small project, there's something really odd here.
You can click on the
Increase Memory...button, it'll double the current memory values (-Xmx2G -Xms100m by default) but if there's a memory leak, it won't matter much.Also, can you force the lombok version to the latest version (1.18.42) and select it from the Java status:
owpk commentedon Oct 21, 2025
I’ve increased the memory, and so far it seems there are no issues anymore.
❯ ps -p $(jps | grep equinox.launcher | awk '{print $1}') -o %cpu,%mem %CPU %MEM 0.0 2.2I also tried what you suggested: up Lombok to 1.18.42, disabled inlay hints, and enabled the Gradle build server.
I guess thanks!
fbricon commentedon Oct 21, 2025
you can probably try to reenable inlayhints, then codelens, one at a time to see if it still works