redhat-developer / redhat-developer/vscode-java

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

未关闭
#2,576 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

ls-error/crash
主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

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

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在 VS Code 中将本地分支切换到远程 PR 分支以重现问题,然后检查 workspace/didChangeWatchedFiles 活动以及通过 DiskIndex、Index 和 AddJrtToIndex 报告的 JDT 索引堆栈跟踪。完成的标准是切换分支不再导致 Java heap space 错误;该 issue 未指定要运行或编辑的测试文件或源文件。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
devtools, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。