Skip to content

Workflow failing with ".Exit code was 32 and last log line was: CodeQL detected code written in Go but could not process any of it." #2186

@AbdelrahmanElawady

Description

@AbdelrahmanElawady

We are using a multi module Golang repository with Go Workspace. CodeQL default workflow settings were working fine with no issues. Suddenly, with no changes in repo structure, it now fails with CodeQL detected code written in Go but could not process any of it.

Also, troubleshooting steps here did not fix it.

Autobuild step and Init seems to be working fine but Analysis started failing all the time.

repo: https://github.com/threefoldtech/tfgrid-sdk-go
example workflow: https://github.com/threefoldtech/tfgrid-sdk-go/actions/runs/8079246055/job/22073247305

logs:
Run github/codeql-action/analyze@v3
  with:
    category: /language:go
    output: ../results
    upload: always
    cleanup-level: brutal
    add-snippets: false
    skip-queries: false
    checkout_path: /home/runner/work/tfgrid-sdk-go/tfgrid-sdk-go
    upload-database: true
    wait-for-processing: true
    token: ***
    matrix: {
    "language": "go"
  }
    expect-error: false
  env:
    CODE_SCANNING_REF: refs/pull/867/head
    CODE_SCANNING_IS_ANALYZING_DEFAULT_BRANCH: false
    CODE_SCANNING_WORKFLOW_FILE: H4sIAAAAAAAA/6xUTW/bOBC961cMvEGye5B82PYiIEBUx07dGnYbtwjaIhBoaSSzkUiHHMpVXP/3gqKUxo2T+NCbOPP45uM9UbASQ+gNZIofJz1PGeG70NFmAzmnpVkEWKGggIuVIR0kMsVYJ0wILvJYGRFbPGy3nhQhpLVgJU8877tc6NADYIIV9R3aTwDHHLlQE1FGaN9eNAsjyPgFI9TUpFaoSq41l0K72wAsoeYIClnaxhIpCAXtBjUmRnGq/aZ1HcJacXIVLZ4Lg74UPiolVQgZK7RLalKMMK+7ghnjhZ8xTQ9BACUjxX90IICCidywHEP4BrmE6yaBouoQg9n5MJ4Poul0PL2IL4ejg9eLmd3sPpbxPI6m0eTLV3s4H46iz5NP8ZvLaDp4eyg717GTxx5SzJgpKF4oJpLlU1WvZpfvR5PZVTwaT4aH1llLdZMVch1nvMCOWROuWmH91hiDJSY30hAoXEnNSaq6bcJo1GEnfz9pcWfVK2+HYCw4cVbwOwRn6J3rrtG+7e228B1ZnwtOZ9X/LXDNaflYVu0GdaoHXfT3igBuDSpucb0e/APnbpVNtAZtOuu19st4HsLP+wgALRUy8kuZYqGth+B6d65Bc8kofHkehVoWFfooKq6kKFE8GI+n9i95BHh2+Gdn7xqcI5kVXMi9cmmb9HN5Vr3u+sjCR4ynp3CSyxM4PoZMyfLdfDb9t/FIsKfjQBpqjPYg9l+QtGtitm6Qy6BCZd+PvfPl0m/TbsK/XdSuaGdHkSG5MLxIXxaRdVAr3Q7JB1SZVGVrb/eUaq4PoHSP7lNWT+yzJ1UdQq9/r/zRZvOHStttz/sVAAD//7BdVxsyBgAA
    CODEQL_ACTION_FEATURE_MULTI_LANGUAGE: false
    CODEQL_ACTION_FEATURE_SANDWICH: false
    CODEQL_ACTION_FEATURE_SARIF_COMBINE: true
    CODEQL_ACTION_FEATURE_WILL_UPLOAD: true
    CODEQL_ACTION_VERSION: 3.24.5
    JOB_RUN_UUID: b4f685d9-0748-425b-8025-3f1f4bc397e4
    CODEQL_ACTION_INIT_HAS_RUN: true
    CODEQL_ACTION_ANALYSIS_KEY: dynamic/github-code-scanning/codeql:analyze
    CODEQL_WORKFLOW_STARTED_AT: 2024-02-28T10:59:00.858Z
    CODEQL_ACTION_GO_BINARY: /home/runner/work/_temp/codeql-action-go-tracing/bin/go
    CODEQL_RAM: 14567
    CODEQL_THREADS: 4
    CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION: true
    CODEQL_SCRATCH_DIR: /home/runner/work/_temp/codeql_databases/working
    CODEQL_DIST: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql
    CODEQL_PLATFORM: linux64
    CODEQL_PLATFORM_DLL_EXTENSION: .so
    CODEQL_JAVA_HOME: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/java
    CODEQL_EXTRACTOR_GO_ROOT: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/go
    CODEQL_EXTRACTOR_GO_WIP_DATABASE: /home/runner/work/_temp/codeql_databases/go
    CODEQL_EXTRACTOR_GO_DIAGNOSTIC_DIR: /home/runner/work/_temp/codeql_databases/go/diagnostic/extractors/go
    CODEQL_EXTRACTOR_GO_LOG_DIR: /home/runner/work/_temp/codeql_databases/go/log
    CODEQL_EXTRACTOR_GO_SCRATCH_DIR: /home/runner/work/_temp/codeql_databases/go/working
    CODEQL_EXTRACTOR_GO_TRAP_DIR: /home/runner/work/_temp/codeql_databases/go/trap/go
    CODEQL_EXTRACTOR_GO_SOURCE_ARCHIVE_DIR: /home/runner/work/_temp/codeql_databases/go/src
    SEMMLE_HANDLE_STATIC_BINARIES: true
    CODEQL_EXTRACTOR_GO_THREADS: 4
    CODEQL_EXTRACTOR_GO_RAM: 14567
    CODEQL_TRACER_LOG: /home/runner/work/_temp/codeql_databases/log/build-tracer.log
    CODEQL_TRACER_DIAGNOSTICS_DIR: /home/runner/work/_temp/codeql_databases/diagnostic/tracer
    CODEQL_TRACER_LANGUAGES: go
    SEMMLE_PRELOAD_libtrace: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/${LIB}_${PLATFORM}_trace.so
    SEMMLE_PRELOAD_libtrace32: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/lib32trace.so
    SEMMLE_PRELOAD_libtrace64: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/lib64trace.so
    CODEQL_RUNNER: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/runner
    LD_PRELOAD: /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/tools/linux64/${LIB}_${PLATFORM}_trace.so
    CODEQL_ACTION_DID_AUTOBUILD_GOLANG: true
    CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY: true
While resolving threads, found a cgroup CPUs file with 4 CPUs in /sys/fs/cgroup/cpuset.cpus.effective.
/opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/codeql version --format=json
{
  "productName" : "CodeQL",
  "vendor" : "GitHub",
  "version" : "2.16.3",
  "sha" : "89973abb6e1d3083dfb8426eb0e210df19ca36be",
  "branches" : [
    "codeql-cli-2.16.3"
  ],
  "copyright" : "Copyright (C) 2019-2024 GitHub, Inc.",
  "unpackedLocation" : "/opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql",
  "configFileLocation" : "/home/runner/.config/codeql/config",
  "configFileFound" : false,
  "features" : {
    "analysisSummaryV2Option" : true,
    "buildModeOption" : true,
    "bundleSupportsIncludeDiagnostics" : true,
    "featuresInVersionResult" : true,
    "indirectTracingSupportsStaticBinaries" : false,
    "supportsPython312" : true,
    "mrvaPackCreate" : true,
    "threatModelOption" : true,
    "traceCommandUseBuildMode" : true,
    "v2ramSizing" : true,
    "mrvaPackCreateMultipleQueries" : true,
    "setsCodeqlRunnerEnvVar" : true
  }
}
Finalizing go
  /opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/codeql database finalize --finalize-dataset --threads=4 --ram=14567 /home/runner/work/_temp/codeql_databases/go
  CodeQL detected code written in Go but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build .
  Error: Encountered a fatal error while running "/opt/hostedtoolcache/CodeQL/2.16.3/x64/codeql/codeql database finalize --finalize-dataset --threads=4 --ram=14567 /home/runner/work/_temp/codeql_databases/go". Exit code was 32 and last log line was: CodeQL detected code written in Go but could not process any of it. Review our troubleshooting guide at https://gh.io/troubleshooting-code-scanning/no-source-code-seen-during-build . See the logs for more details.

I am not sure where the issue is since we are not using custom building and Autobuild step seems to be working fine. It was also working with no errors before.

Metadata

Metadata

Assignees

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