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

Abierto
#855 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
50/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bash, github-actions, macos, unity

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
1.1k
Forks
318
Merge medio
23 h 20 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de game-ci/unity-builder

Todos los issues de game-ci/unity-builder

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.