Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Intermittent DirectoryNotEmptyException when running analyze@v2

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

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
github-actions, java, typescript
领域
ci-cd, devops, security

调研方向

从报告的 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

贡献指南

打开贡献指南

从这里开始

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

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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