You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with OpenJDK 11/17/21/... source code on Windows 11, WSL, and Linux.
"Debugger for Java" is v0.55.0. This issue is related to #1330 (comment), but I tried to reproduce it from scratch.
The example from WSL, I opened VS Code with my workspace, waited some time and seen - "redhat.java" has been consuming CPU and memory for a long time:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6174 user 20 0 37.9g 14.2g 3.5m S 832.9 91.0 11:57.35 /home/user/.vscode-server/extensions/redhat.java-1.24.0-linux-x64/jre/17.0.8.1-linux-x86_64/bin/java --add-modules=ALL-SYSTEM --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.fs=ALL-UNNAMED -Declipse.application=org.eclipse.jdt.ls.core.id1 -Dosgi.bundles.defaultStartLevel=4 -Declipse.product=org.ecli+
And then, when memory is about to out, it looks like it drops the process and starts again - with a small amount of memory and high CPU usage, increasing memory consumption every minute.
Steps To Reproduce (on Win11/WSL)
Install VSCode on Win11, and install "Remote Development" extension pack
Open WSL terminal, and run the following commands:
cp MyApp.java openjdk (see below for MyApp.java source code)
cd openjdk
code . &
In VSCode, install "Debugger for Java", "Language support for Java by Red Hat" to remote WSL.
In VSCode, open ~/openjdk/MyApp.java file in editor.
In WSL terminal, run top -c and see .vscode-server/extensions/redhat.java-1.24.0-linux-x64/jre/17.0.8.1-linux-x86_64/bin/java consuming CPU and memory. (in my case it consumes all CPU cores)
Wait patiently, and still click 'Increase memory' and 'Reload window' in VSCode if it asks, continue seeing RedHat java process in top -c list consuming CPU and RAM.
You could stop here, but you also can try to reach the maximum memory amount in WSL by clicking 'Increase memory'/'Reload window', and possibly you will see behaviour described above - "when memory is about to out, it looks like it drops the process and starts again"
(Optional) You could also try to close and open VSCode again, instead of 'Reload'ing window. It seems it helps to reproduce it faster.
MyApp.java
public class MyApp {
public static void main(String[] args) {
System.out.println("Hello world!");
System.out.println("Sleeping...");
Thread.sleep(20000);
System.out.println("Finished");
}
}
The text was updated successfully, but these errors were encountered:
I'm working with OpenJDK 11/17/21/... source code on Windows 11, WSL, and Linux.
"Debugger for Java" is v0.55.0. This issue is related to #1330 (comment), but I tried to reproduce it from scratch.
The example from WSL, I opened VS Code with my workspace, waited some time and seen - "redhat.java" has been consuming CPU and memory for a long time:
And then, when memory is about to out, it looks like it drops the process and starts again - with a small amount of memory and high CPU usage, increasing memory consumption every minute.
Steps To Reproduce (on Win11/WSL)
git clone https://github.com/openjdk/jdk.git openjdk
cp MyApp.java openjdk
(see below for MyApp.java source code)cd openjdk
code . &
~/openjdk/MyApp.java
file in editor.top -c
and see.vscode-server/extensions/redhat.java-1.24.0-linux-x64/jre/17.0.8.1-linux-x86_64/bin/java
consuming CPU and memory. (in my case it consumes all CPU cores)top -c
list consuming CPU and RAM.MyApp.java
The text was updated successfully, but these errors were encountered: