Skip to content

Matrix prep fails: concurrent 'git config --global --add safe.directory' race on recomputer-rk3576-devkit (seeed-extension) #75

Description

@igorpecovnik

@mingzhangqun This is the problem on why it doesn't work and there are two ways to solve it - during next week.

Summary

Build Standard Support Images fails at step 10 — Prepare Info JSON and Matrices for the recomputer-rk3576-devkit chunk. The board's 4 variants are dumped in parallel, and each config-dump-json dies with a git exit 128 on a safe.directory write. The empty output can't be parsed → the whole matrix step fails, failing the build.

Evidence

Using 512 workers for parallel processing.
Submitted 4 jobs to the parallel executor. Waiting for them to finish...
Error calling Armbian command: .../compile.sh config-dump-json BOARD=recomputer-rk3576-devkit
    BRANCH=vendor ... ENABLE_EXTENSIONS=v4l2loopback-dkms,seeed-extension ...
  code: 128 — Error 1 in SUBSHELL at lib/functions/general/git.sh:85
  stacktrace: git --no-pager config --global --add safe.directory \
              /armbian/cache/sources/seeed_armbian_extension
Error parsing Armbian JSON: ... Expecting value: line 1 column 1 (char 0)
KeyError: 'config_ok'

Root cause — concurrent git config --global race on ~/.gitconfig

  1. Only this board enables seeed-extension. extensions/seeed-extension.sh runs a network fetch_from_repo (clones Seeed-Studio/seeed_armbian_extension) during the config phase, so it executes even under config-dump-json.
  2. fetch_from_repogit_ensure_safe_directory() (lib/functions/general/git.sh) does an un-serialized git config --global --add safe.directory <same path>.
  3. info-gatherer-image.py runs the 4 variants concurrently (512-worker pool). Multiple processes write ~/.gitconfig at once; git locks the file (.gitconfig.lock) and the loser exits 128 → empty JSON → matrix generation aborts.

It is a race, triggered only by the Seeed board because its extension clones a repo during config. A plain re-run may pass or fail depending on who wins the lock.

Suggested fix (in armbian/build)

  • Preferred — serialize the global write: wrap the regular_git config --global --add safe.directory in git_ensure_safe_directory() with an flock, so parallel workers can't collide. Fixes it for any source/extension under parallel config-dump-json, not just Seeed.
  • Alternative — no network in config: make seeed-extension.sh skip the fetch_from_repo during config-dump-json (defer the clone to the actual build) so the info step is side-effect-free.

Benign, not the cause

  • BOARD_MAINTAINER not found in olinux-som-a13.conf — config-lint warning.
  • Seeed kernel patches Directory not found: .../seeed_armbian_extension/patches/kernel — repo just lacks that subdir.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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