github / github/codeql

CatastrophicError does not include context information

未关闭
#9,000 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
CodeQL
星标
10.1k
派生
2.1k
平均合并
2 天 15 小时
30 天内合并 PR
141

描述

### Version
CodeQL CLI v2.9.0

### Description
When a `CatastrophicError` occurs during `codeql query compile` no context information, such as the currently compiled query file, is printed to console. This makes troubleshooting cumbersome when running multi-threaded compilation.

An example for this can be seen in [this workflow log](https://github.com/Marcono1234/codeql-java-queries/runs/6248450591?check_suite_focus=true#step:8:326):
```
Compiling query plan for /home/runner/work/codeql-java-queries/codeql-java-queries/codeql-custom-queries-java/queries/likely-bugs/null-check-on-this.ql.
Done [154/385 comp 3s] /home/runner/work/codeql-java-queries/codeql-java-queries/codeql-custom-queries-java/queries/likely-bugs/null-check-on-this.ql.
Compiling query plan for /home/runner/work/codeql-java-queries/codeql-java-queries/codeql-custom-queries-java/queries/likely-bugs/nullness-annotation-on-primitive.ql.
Done [155/385 comp 3.1s] /home/runner/work/codeql-java-queries/codeql-java-queries/codeql-custom-queries-java/queries/likely-bugs/nullness-annotation-on-primitive.ql.
Compiling query plan for /home/runner/work/codeql-java-queries/codeql-java-queries/codeql-custom-queries-java/queries/likely-bugs/nullness-check-on-primitive.ql.
Oops! A fatal internal error occurred.
com.semmle.util.exception.CatastrophicError: Primitive directionalBind has more than one unbound field: [DataFlowImpl::TNodeEx#17aa0c36 this, DataFlowImpl::TNodeEx#17aa0c36 result]
at com.semmle.inmemory.planner.translate.TermTranslator$Result.applyPrimitiveAsKnownColumnOp(TermTranslator.java:625)
...
```

Since the compilation of multiple queries was ongoing at this point, it is not clear for which of them the compilation failed. In this specific case none of the queries shown in the snippet above failed, but instead a query shown a few lines above.

(The `CatastrophicError` itself is described in #8999)

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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