Intermittent DirectoryNotEmptyException when running analyze@v2
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- github-actions, java, typescript
调研方向
从报告的 CodeQL 数据库 finalize 命令、原始日志和 Windows self-hosted runner 详细信息开始。调查与 csharp 数据库的 cache\working 目录及并发进程相关的间歇性清理失败。当 finalize 步骤在所述工作流中不再间歇性引发 DirectoryNotEmptyException 时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Getting the below error intermittently on Perform CodeQL Analysis step, specifically when running database finalize command. Ultimately the error is java.nio.file.DirectoryNotEmptyException, the directory in question being C:\actions-runner_work_temp\codeql_databases\csharp\db-csharp\default\cache\working
C:\actions-runner\_work\_tool\CodeQL\2.16.3\x64\codeql\codeql.exe database finalize --finalize-dataset --threads=4 --ram=12799 C:\actions-runner\_work\_temp\codeql_databases\csharp
Running pre-finalize script C:\actions-runner\_work\_tool\CodeQL\2.16.3\x64\codeql\csharp\tools\pre-finalize.cmd in C:\actions-runner\_work\REPO\REPO.
Running TRAP import for CodeQL database at C:\actions-runner\_work\_temp\codeql_databases\csharp...
Falling back to 2.15.x RAM sizing, for CodeQL Action compatibility.
Importing TRAP files
Merging relations
A fatal error occurred: Could not clear working directory: C:\actions-runner\_work\_temp\codeql_databases\csharp\db-csharp\default\cache\working after saving relation files.
(eventual cause: MultiIOException "java.nio.file.DirectoryNotEmptyException: C:\actions-runner\_work\_temp\codeql_d...")
A fatal error occurred: Dataset import for C:\actions-runner\_work\_temp\codeql_databases\csharp\db-csharp failed with code 2.
Error: A fatal error occurred.
Looking at raw logs:
2024-02-28T19:28:53.9246062Z [2024-02-28 19:25:22] [ERROR] An exception occurred during TRAP import. The database may be partial.
2024-02-28T19:28:53.9246522Z java.util.concurrent.CompletionException: Could not clear working directory: C:\actions-runner_work_temp\codeql_databases\csharp\db-csharp\default\cache\working after saving relation files.
2024-02-28T19:28:53.9246862Z (eventual cause: MultiIOException "java.nio.file.DirectoryNotEmptyException: C:\actions-runner_work_temp\codeql_d...")
2024-02-28T19:28:53.9247154Z at java.base/java.util.concurrent.CompletableFuture.encodeRelay(Unknown Source)
2024-02-28T19:28:53.9247446Z at java.base/java.util.concurrent.CompletableFuture.completeRelay(Unknown Source)
2024-02-28T19:28:53.9247714Z at java.base/java.util.concurrent.CompletableFuture$UniRelay.tryFire(Unknown Source)
2024-02-28T19:28:53.9248000Z at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
2024-02-28T19:28:53.9248324Z at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
2024-02-28T19:28:53.9248615Z at com.semmle.util.concurrent.FutureUtils.lambda$futureAutoclose$14(FutureUtils.java:227)
2024-02-28T19:28:53.9248890Z at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
2024-02-28T19:28:53.9249156Z at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
2024-02-28T19:28:53.9249441Z at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
2024-02-28T19:28:53.9249709Z at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source)
2024-02-28T19:28:53.9249991Z at com.semmle.util.concurrent.Paralleliser.startMoreJobs(Paralleliser.java:134)
2024-02-28T19:28:53.9250284Z at com.semmle.util.concurrent.Paralleliser.lambda$startMoreJobs$2(Paralleliser.java:119)
2024-02-28T19:28:53.9250581Z at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
2024-02-28T19:28:53.9251475Z at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
2024-02-28T19:28:53.9251767Z at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
2024-02-28T19:28:53.9252018Z at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(Unknown Source)
2024-02-28T19:28:53.9252301Z at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
2024-02-28T19:28:53.9252549Z at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
2024-02-28T19:28:53.9252724Z at java.base/java.lang.Thread.run(Unknown Source)
Details:
- GHES v3.9.5
- Self-hosted Windows runner
- Running CodeQL workflow using advanced setup on 100+ repos in enterprise setting. This error is not restricted to any certain repo or repos.
- Began getting this error on v2.16.0, although we jumped there from v2.12.x so unsure about versions in between. Recently updated to v2.16.3 and still seeing it.
When I see this error, I re-trigger the workflow manually and it usually runs fine the second time, although it could get the same error again. Behavior is very intermittent.
My best guess at this point is that there are perhaps processes running concurrently that may lock some working files as read-only, or something similar.
Any assistance is greatly appreciated!
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 493
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 44
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/codeql-action 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
github/codeql-action#4052 · 4 条评论 ·
-
难度 4/5 3-5 天 新手友好度 45/100
github/codeql-action#4078 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 48/100
github/codeql-action#4008 · 9 条评论 ·
-
难度 4/5 3-5 天 新手友好度 52/100
github/codeql-action#3978 · 4 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 48/100
github/codeql-action#3915 · 6 条评论 · 3 个 reaction ·
查看 github/codeql-action 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
难度 1/5 1-3 小时 新手友好度 88/100