github / github/codeql

Codeql database create fails when building mozilla

Aberta
#16,001 7 comentários 0 reações 0 responsáveis Ver no GitHub
C++ question
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

I'm trying to build mozilla from [this repo](https://github.com/mozilla/gecko-dev) and create a cpp codeql database.

In order to that, I first run `./mach configure` and after it's done, I run the following command to create the database:

`~/codeql/codeql database create mozilla4 --language=c-cpp --command="./mach build"`

Which builds mozilla successfully, but it fails in the importing trap file stage. I have included the logs for [creating](https://drive.google.com/file/d/1Npi4LVb7fzHoALmQrlDPKofnpYheE8lg/view?usp=drive_link) the database and [importing](https://drive.google.com/file/d/15J_n7OoP4ifb9TTmXnkHBDpYpgVDI596/view?usp=sharing) dataset.

A glance of the errors is like:
```
[ERROR] 14135855_0.trap.br, 1: java.io.IOException: Brotli stream decoding failed
org.brotli.dec.BrotliInputStream.read(BrotliInputStream.java:167)
com.semmle.inmemory.trap.TrapInputStream.read(TrapInputStream.java:60)
com.semmle.inmemory.trap.TrapScanner.fill(TrapScanner.java:451)
com.semmle.inmemory.trap.TrapScanner.ensureNext(TrapScanner.java:428)
com.semmle.inmemory.trap.TrapScanner.nextToken(TrapScanner.java:61)
com.semmle.inmemory.trap.TRAPReader.scanTuplesAndLabels(TRAPReader.java:493)
com.semmle.inmemory.trap.TRAPLinker$TrapLinkDirectiveScanner.scanTuplesAndLabels(TRAPLinker.java:311)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:414)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:400)
com.semmle.inmemory.trap.TRAPLinker.lambda$getTasks$2(TRAPLinker.java:215)
com.semmle.util.concurrent.FutureUtils.lambda$mapAsync_$8(FutureUtils.java:161)
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base/java.lang.Thread.run(Unknown Source)

... caused by:

org.brotli.dec.BrotliRuntimeException: Corrupted Huffman code histogram
org.brotli.dec.Decode.readComplexHuffmanCode(Decode.java:591)
org.brotli.dec.Decode.readHuffmanCode(Decode.java:613)
org.brotli.dec.Decode.readMetablockPartition(Decode.java:783)
org.brotli.dec.Decode.readMetablockHuffmanCodesAndContextMaps(Decode.java:825)
org.brotli.dec.Decode.decompress(Decode.java:1110)
org.brotli.dec.BrotliInputStream.read(BrotliInputStream.java:162)
com.semmle.inmemory.trap.TrapInputStream.read(TrapInputStream.java:60)
com.semmle.inmemory.trap.TrapScanner.fill(TrapScanner.java:451)
com.semmle.inmemory.trap.TrapScanner.ensureNext(TrapScanner.java:428)
com.semmle.inmemory.trap.TrapScanner.nextToken(TrapScanner.java:61)
com.semmle.inmemory.trap.TRAPReader.scanTuplesAndLabels(TRAPReader.java:493)
com.semmle.inmemory.trap.TRAPLinker$TrapLinkDirectiveScanner.scanTuplesAndLabels(TRAPLinker.java:311)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:414)
com.semmle.inmemory.trap.TRAPReader.importTuples(TRAPReader.java:400)
com.semmle.inmemory.trap.TRAPLinker.lambda$getTasks$2(TRAPLinker.java:215)
com.semmle.util.concurrent.FutureUtils.lambda$mapAsync_$8(FutureUtils.java:161)
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.base/java.lang.Thread.run(Unknown Source)
at (start of line)
```
I can build mozilla separately following similar steps, but when I try to create a database it fails. The database is created in the end, but some of the files are missing and are not added to the database.

Can someone please point me to the right direction on how to solve this issue?

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.