macOS: activate.sh reads a post-activation Unity teardown crash (exit 134) as activation failure and skips return_license.sh, leaking a serial activation

Aperta
#855 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash, github-actions, macos, unity

Direzione di ricerca

Start in dist/platforms/mac/steps/activate.sh, where the exit at line 69 returns $UNITY_EXIT_CODE. Then check how entrypoint.sh sources this step and where return_license.sh is called, since the early exit skips it. Done means a teardown crash after a successful activation (ULF present, or the licensing success marker in the log) is classified as success, and the license is returned on the failure path too.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Environment: unity-builder v4.8.2 (4423ee7) / GitHub-hosted macos-26 runner / Unity 6000.4.10f1 / serial (Pro) licence mode.

What happened. During the activation phase, Unity activated successfully - the log shows the licensing client completing and the editor beginning a normal quit:

[Licensing::IpcConnector] LicenseClient-runner channel disconnected successfully.
Exiting batchmode successfully now!
...
libc++abi: terminating due to uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
.../platforms/mac/steps/activate.sh: line 69:  4473 Abort trap: 6  .../Unity -logFile - -batchmode -nographics -quit -serial ...
Unclassified error occured while trying to activate license.
Exit code was: 134

Unity crashed in engine teardown AFTER activation completed (the ULF existed at /Library/Application Support/Unity/Unity_lic.ulf). Two separable defects in dist/platforms/mac/steps/activate.sh:

  1. Success detection trusts the raw exit code. A teardown crash after a successful activation (not rare on Unity 6 + recent macOS images; generic std::__1::system_error: mutex lock failed class) is reported as Unclassified error occured while trying to activate license. Checking for the ULF file (serial mode) or the licensing client success marker in the log would classify this correctly.

  2. The failure path orphans the serial activation. activate.sh runs exit $UNITY_EXIT_CODE - but it is sourced by entrypoint.sh, so the exit aborts the entrypoint before return_license.sh ever runs. The activation that just succeeded server-side is never returned; the slot stays consumed until someone releases it manually in id.unity.com. On seats shared across pipelines this is an outage class, not an inconvenience. Running the return step in an EXIT trap (or tolerating the activate exit code and deciding later) would make the seat crash-safe.

v5 ships a byte-identical dist/platforms/mac/steps/activate.sh, so both apply there too.

Workaround we deployed (works, happy to turn into a PR): pre-install the editor (hub headless, changeset from ProjectVersion.txt), activate in our own step where success = ULF presence (tolerating nonzero exit codes when the ULF exists), run unity-builder with skipActivation: true, and return the licence in an if: always() workflow step with a log-marker check.

Lingua principale
TypeScript
Stelle
1.1k
Fork
318
Merge medio
23h 20m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di game-ci/unity-builder

Tutte le issue di game-ci/unity-builder

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.