Skip to content

General issue #18363

Open
Open
@ashutosh7107

Description

I am using the below code ql workflow but everytime after 30-40 minutes of running it is giving me below error
The hosted runner: GitHub Actions 206 lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

FAILURE: Build failed with an exception.

  • What went wrong:
    Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
jobs:
  codeql-analysis:
    name: CodeQL Analyse
    runs-on: ubuntu-latest
    permissions:
      actions: read
      contents: read
      security-events: write
    env:
      CODEQL_EXTRACTOR_JAVA_AGENT_ENABLE_KOTLIN: true
      CODEQL_ACTION_EXTRA_OPTIONS: '{"database": {"finalize": ["-J-Xmx6144m"]}}'
      GH_TOKEN: ${{ github.token }}
    strategy:
      matrix:
        os: [ubuntu-latest]
      fail-fast: false
    steps:
      - name: Cancel Previous Runs
        uses: styfle/[email protected]
        with:
          access_token: ${{ github.token }}
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Set up Java
        uses: actions/setup-java@v4
        with:
          java-version: 21
          distribution: 'adopt'
          server-id: github
          server-username: ${{ github.actor }}
          server-password: ${{ secrets.GITHUB_TOKEN }}
      # Initializes the CodeQL tools for scanning.
      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          languages: 'java'
          # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
          queries: security-extended,security-and-quality

      - name: Setup Gradle
        uses: gradle/actions/setup-gradle@v4

      - name: Run build with Gradle Wrapper
        run: |
          export GRADLE_OPTS="-Xmx6144m -Dog.gradle.margins=-Xmx6144m"
          ./gradlew clean assembleDevUsDebug --no-daemon

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3

Any suggestions how to resolve the above error?

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions