github / github/codeql

CatastrophicError does not include context information

Đang mở
#9,000 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

### 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)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.