redhat-developer / redhat-developer/vscode-java

Language server reports OOM for Java heap space while switching local git branch

Open
#2,576 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Use VS Code to develop eclipse.jdt.ls itself, and switch local branch to a remote PR branch, language server reports OOM exception.

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:12.066
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.core 4 4 2022-07-19 13:28:25.648
!MESSAGE Background Indexer Crash Recovery
!STACK 0
java.lang.OutOfMemoryError: Java heap space
	at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.<init>(HashtableOfObject.java:56)
	at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.rehash(HashtableOfObject.java:184)
	at org.eclipse.jdt.internal.compiler.util.HashtableOfObject.putUnsafely(HashtableOfObject.java:157)
	at org.eclipse.jdt.internal.core.index.DiskIndex.copyQueryResults(DiskIndex.java:383)
	at org.eclipse.jdt.internal.core.index.DiskIndex.mergeWith(DiskIndex.java:570)
	at org.eclipse.jdt.internal.core.index.Index.save(Index.java:230)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager.saveIndex(IndexManager.java:1150)
	at org.eclipse.jdt.internal.core.search.indexing.AddJrtToIndex.execute(AddJrtToIndex.java:274)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:445)
	at java.base/java.lang.Thread.run(Unknown Source)

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:30.506
!MESSAGE >> workspace/executeCommand vscode.java.test.findTestTypesAndMethods

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:30.508
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.420
!MESSAGE >> workspace/executeCommand vscode.java.test.findTestTypesAndMethods

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.423
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.652
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.945
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.964
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:33.997
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.145
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.269
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.339
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.444
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.592
!MESSAGE >> workspace/executeCommand vscode.java.test.findTestTypesAndMethods

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.596
!MESSAGE >> workspace/didChangeWatchedFiles 

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.664
!MESSAGE >> workspace/executeCommand vscode.java.test.findTestTypesAndMethods

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.665
!MESSAGE >> document/codeAction

!ENTRY org.eclipse.jdt.ls.core 1 0 2022-07-19 13:28:34.668
!MESSAGE >> document/codeAction

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

Reproduce the problem in VS Code by switching the local branch to a remote PR branch, then inspect the workspace/didChangeWatchedFiles activity and the reported JDT indexing stack trace through DiskIndex, Index, and AddJrtToIndex. Done means the branch switch no longer causes the Java heap space failure; the issue names no test or source file to run or edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.