Error initializing IMB disk cache results in no results
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- typescript, vscode
- 领域
- devtools
调研方向
首先在 CodeQL extension 中重现重启序列:运行一个查询,更改一个会重启查询服务器的设置,然后再次运行该查询。跟踪堆栈跟踪中列出的 QueryServerBackendManager 和 EvaluationServer 入口点,并验证已停止的查询会释放 IMB cache lock。后续查询能够成功执行而不是返回无结果,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Changing the settings of the CodeQL extension while running a query results in the restart of the query server.
This restart successfully stops the running query, but is unable to properly release the lock on the IMB cache directory of the selected database.
Subsequent query executions return with a no result response and the query log contains the stack trace (with *** if information is redacted)
Jun 29, 2021 1:25:48 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: Error initializing the IMB disk cache: the cache directory is already locked by another running process. Only one instance of the IMB can access a cache directory at a time. The lock file is located at /Users/***/Library/Application Support/Code/User/workspaceStorage/***/GitHub.vscode-codeql/***/***/db-cpp/default/cache/.lock
(eventual cause: OverlappingFileLockException)
java.util.concurrent.CompletionException: Error initializing the IMB disk cache: the cache directory is already locked by another running process. Only one instance of the IMB can access a cache directory at a time. The lock file is located at /Users/***/Library/Application Support/Code/User/workspaceStorage/***/GitHub.vscode-codeql/***/***/db-cpp/default/cache/.lock
(eventual cause: OverlappingFileLockException)
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.uniComposeStage(Unknown Source)
at java.base/java.util.concurrent.CompletableFuture.thenCompose(Unknown Source)
at com.semmle.api.server.QueryServerBackendManager.lambda$withDB$0(QueryServerBackendManager.java:70)
at com.semmle.util.concurrent.FutureUtils.supplyCompose(FutureUtils.java:217)
at com.semmle.util.concurrent.FutureUtils.futureFinally(FutureUtils.java:159)
at com.semmle.api.server.QueryServerBackendManager.withDB(QueryServerBackendManager.java:70)
at com.semmle.api.server.QueryServerBackendManager.withDBExclusive(QueryServerBackendManager.java:57)
at com.semmle.api.server.EvaluationServer.lambda$clearCache$11(EvaluationServer.java:253)
at com.semmle.api.server.QueryServerProgressHelper.lambda$null$0(QueryServerProgressHelper.java:47)
at com.semmle.util.concurrent.FutureUtils.supplyCompose(FutureUtils.java:217)
at com.semmle.api.server.QueryServerProgressHelper.lambda$withProgressAndCancellation$1(QueryServerProgressHelper.java:47)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: Error initializing the IMB disk cache: the cache directory is already locked by another running process. Only one instance of the IMB can access a cache directory at a time. The lock file is located at /Users/***/Library/Application Support/Code/User/workspaceStorage/***/GitHub.vscode-codeql/***/***/db-cpp/default/cache/.lock
(eventual cause: OverlappingFileLockException)
at com.semmle.inmemory.caching.RelationCacheImpl.takeFilesystemLock(RelationCacheImpl.java:351)
at com.semmle.inmemory.caching.RelationCacheImpl.create(RelationCacheImpl.java:110)
at com.semmle.inmemory.caching.RelationManager.<init>(RelationManager.java:93)
at com.semmle.inmemory.MemoryBackend.<init>(MemoryBackend.java:142)
at com.semmle.api.server.QueryServerBackendManager.createBackend(QueryServerBackendManager.java:78)
at com.semmle.api.server.QueryServerBackendManager$WaitingEntry.create(QueryServerBackendManager.java:99)
at com.semmle.api.server.QueryServerBackendManager.scheduleUnblockedTasks(QueryServerBackendManager.java:139)
at com.semmle.api.server.QueryServerBackendManager.withDB(QueryServerBackendManager.java:69)
... 8 more
Caused by: java.nio.channels.OverlappingFileLockException
at com.semmle.util.files.FileSystemLock.<init>(FileSystemLock.java:75)
at com.semmle.inmemory.caching.RelationCacheImpl.takeFilesystemLock(RelationCacheImpl.java:347)
... 15 more
Version
CodeQL CLI: v2.3.4
CodeQL Extension: v1.5.1
Visual Studio Code:
Version: 1.57.1 (Universal)
Commit: 507ce72a4466fbb27b715c3722558bb15afa9f48
Date: 2021-06-17T13:28:32.912Z
Electron: 12.0.7
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 20.5.0
To reproduce
Steps to reproduce the behavior.
- Execute a query
- Change settings in the CodeQL extension that restart the query server (e.g., the amount ram or nr of threads to use)
- Re-execute the stopped query
Expected behavior
Execution of the query
Additional context
Add any other context about the problem here.
- 主要语言
- TypeScript
- 星标
- 539
- 派生
- 240
- 平均合并
- 2 天 18 小时
- 30 天内合并 PR
- 37
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-codeql 的其他 Issue
-
bug VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#4471 · 1 条评论 ·
-
bug enhancement VSCode
难度 2/5 1-3 小时 新手友好度 68/100
github/vscode-codeql#592 · 2 条评论 ·
-
enhancement VSCode
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-codeql#4432 · 1 条评论 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 52/100
github/vscode-codeql#4356 ·
-
bug VSCode
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-codeql#4339 · 1 条评论 ·
查看 github/vscode-codeql 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
bug v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·