redhat-developer / redhat-developer/vscode-java

[vscode devcontainer] Language Support for Java (Syntax Server) client: couldn't create connection to server.

Open
#3,672 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I use vscode devcontainer on a java project. Got the following error for the past month and couldn't get IntelliSense for java. Log file attached.
hs_err_pid939.log

Environment
  • Operating System: Ubuntu 24.04 LTS on amd64
  • JDK version: openjdk 21.0.3 2024-04-16 LTS OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)
  • Visual Studio Code version:
    Version: 1.90.0
    Commit: 89de5a8d4d6205e5b11647eb6a74844ca23d2573
    Date: 2024-06-04T19:34:48.028Z
    Electron: 29.4.0
    ElectronBuildId: 9593362
    Chromium: 122.0.6261.156
    Node.js: 20.9.0
    V8: 12.2.281.27-electron.0
    OS: Darwin arm64 23.5.0
  • Java extension version:v0.27.0
Steps To Reproduce

install docker desktop
clone the repo: https://github.com/zanqi/compiler
open it in vscode
vscode should popup a prompt on bottom right to open It in devcontainer. Click blue button to do so
after things settled (no more in progress UI on the screen), open a java file
"java: initialize workspace" in the bottom bar appears, but never finished. Click on it will see the error I am reporting.

[Please attach a sample project reproducing the error]
hs_err_pid939.log

Current Result

Got error on initializing language server

Expected Result

No error.

Additional Informations

Below is the top part of the error displayed in vscode output. Notice it is expecting jdk 17. But that's not the version installed by vscode devcontainer. Maybe that's issue? How to fix it?

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007ffffeec3a2d, pid=939, tid=991
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.11+9 (17.0.11+9) (build 17.0.11+9)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (17.0.11+9, mixed mode, tiered, compressed oops, compressed class ptrs, parallel gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xc87a2d]  void OopOopIterateDispatch<PCIterateMarkAndPushClosure>::Table::oop_oop_iterate<InstanceKlass, narrowOop>(PCIterateMarkAndPushClosure*, oopDesc*, Klass*)+0xdd
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /workspaces/compiler/hs_err_pid939.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues
#
[Error - 11:32:36 PM] Client Language Support for Java (Syntax Server): connection to server is erroring. Shutting down server.
[Error - 11:32:36 PM] Client Language Support for Java (Syntax Server): connection to server is erroring. Shutting down server.
[Error - 11:32:36 PM] Stopping server failed
  Message: Cannot call write after a stream was destroyed
  Code: -32099

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached hs_err_pid939.log and reproduce the failure using the zanqi/compiler project in a VS Code devcontainer with the reported JDK and Java extension versions. Trace Java workspace initialization and the Language Support for Java (Syntax Server) connection; done means the Java file initializes without the server crash or connection error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, java, typescript, vscode
Domain
developer-experience, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.