github / github/codeql

CatastrophicError does not include context information

Offen
#9,000 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
141

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.