Skip to content

Perform CodeQL Analysis fails during database finalize due to NoSuchFileException #1338

Open
@makubacki

Description

@makubacki

While enabling CodeQL, I encounter this error frequently. Occassionally, I do not encounter the error and the GitHub action succeeds.

/opt/hostedtoolcache/CodeQL/0.0.0-20221010/x64/codeql/codeql database finalize --finalize-dataset --threads=2 /home/runner/work/_temp/codeql_databases/cpp --ram=5920
  Running TRAP import for CodeQL database at /home/runner/work/_temp/codeql_databases/cpp...
  A fatal error occurred: Couldn't read /home/runner/work/_temp/codeql_databases/cpp/trap/cpp/source/tmp/ccMtRh��.link
  (eventual cause: NoSuchFileException "/home/runner/work/_temp/codeql_databases/cpp/trap/cpp/source/tmp/ccMtRh��.link")
  A fatal error occurred: Dataset import for /home/runner/work/_temp/codeql_databases/cpp/db-cpp failed with code 2.
  Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20221010/x64/codeql/codeql' failed with exit code 2
  Error: The process '/opt/hostedtoolcache/CodeQL/0.0.0-20221010/x64/codeql/codeql' failed with exit code 2
      at toolrunnerErrorCatcher (/home/runner/work/_actions/github/codeql-action/v2/lib/toolrunner-error-catcher.js:86:19)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Object.finalizeDatabase (/home/runner/work/_actions/github/codeql-action/v2/lib/codeql.js:[60](https://github.com/tianocore/edk2/actions/runs/3362451486/jobs/5574191203#step:12:61)7:13)
      at async finalizeDatabaseCreation (/home/runner/work/_actions/github/codeql-action/v2/lib/analyze.js:114:13)
      at async runFinalize (/home/runner/work/_actions/github/codeql-action/v2/lib/analyze.js:298:21)
      at async run (/home/runner/work/_actions/github/codeql-action/v2/lib/analyze-action.js:164:29)
      at async runWrapper (/home/runner/work/_actions/github/codeql-action/v2/lib/analyze-action.js:235:9)

The filename that can't be read will change, but the error remains:

A fatal error occurred: Couldn't read /home/runner/work/_temp/codeql_databases/cpp/trap/cpp/source/home/runner/work/edk2/edk2/Build/MdeModule/DEBUG_GCC5/IA32/MdeModulePk��.link

Can you please help provide more information about what is going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions