Linux ARM: java/bin/java: Exec format error

Open
#2,700 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, java, kotlin, linux

Research direction

Start with the provided ubuntu-24.04-arm workflow and its CodeQL init and analyze steps; inspect why the ARM bundle invokes linux64/java/bin/java. Reproduce the linked job and verify that CodeQL analysis completes on Linux ARM without an Exec format error.

Written by the indexing model from the issue text.

Description

I updated my GitHub Action workflow from Github hosted Linux x64 to Linux Arm, but now the codeql workflow fails:

Exit code was 126 and last log line was: 

/opt/hostedtoolcache/CodeQL/2.20.1/arm64/codeql/codeql: 142: /opt/hostedtoolcache/CodeQL/2.20.1/arm64/codeql/tools/linux64/java/bin/java: Exec format error.

Job run: https://github.com/hfhbd/kobol/actions/runs/12814883028/job/35732341338

CodeQL Setup:

name: "CodeQL"

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-24.04-arm
    permissions:
      contents: read
      security-events: write

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: 'temurin'
          java-version: 21
      - uses: gradle/actions/setup-gradle@v4

      - name: Initialize CodeQL
        uses: github/codeql-action/init@v3
        with:
          languages: kotlin
          build-mode: manual

      - name: Build with Gradle
        run: ./gradlew -Dorg.gradle.daemon=false --no-build-cache classes

      - name: Perform CodeQL Analysis
        uses: github/codeql-action/analyze@v3
Dominant language
TypeScript
Stars
1.6k
Forks
493
Avg merge
1d 13h
Merged PRs (30d)
44

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-action

All issues in github/codeql-action

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.