@calltelemetry/fmix 2.7.25 → 2.7.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/fmix +15 -3
  2. package/package.json +3 -3
package/bin/fmix CHANGED
@@ -28,7 +28,7 @@ set -uo pipefail
28
28
  # ---------------------------------------------------------------------------
29
29
  # Constants & config
30
30
  # ---------------------------------------------------------------------------
31
- FMIX_VERSION="2.7.25"
31
+ FMIX_VERSION="2.7.26"
32
32
  FMIX_HOME="${FMIX_HOME:-${HOME}/.ct-fmix}"
33
33
  FMIX_OS="$(uname -s)"
34
34
  FMIX_ARCH="$(uname -m)"
@@ -7146,7 +7146,7 @@ fmix_lock_keeper_start() {
7146
7146
  local path="$1" mode="$2" timeout="$3"
7147
7147
  local diagnostic_name="${4:-lock}"
7148
7148
  local lock_name="${5:-${diagnostic_name:-lock}}"
7149
- local py_bin owner_pid owner_file state keeper_pid status keeper_source
7149
+ local py_bin owner_pid owner_file state keeper_pid status keeper_source keeper_alive keeper_rc
7150
7150
  local bootstrap_deadline acquire_deadline="" failure="keeper exited before readiness"
7151
7151
  local bootstrap_secs failure_kind="bootstrap_failed" retryable=false
7152
7152
  local probe_pid
@@ -7341,6 +7341,13 @@ finally:
7341
7341
  bootstrap_secs="$(fmix_positive_uint_or_default "${FMIX_LOCK_KEEPER_BOOTSTRAP_SECS:-30}" 30 FMIX_LOCK_KEEPER_BOOTSTRAP_SECS)"
7342
7342
  bootstrap_deadline=$(( SECONDS + bootstrap_secs ))
7343
7343
  while true; do
7344
+ # Probe liveness BEFORE reading the handshake. A keeper publishes its
7345
+ # terminal state and then exits, so a keeper that finishes between a
7346
+ # state read and a liveness probe must be classified from its final
7347
+ # state. Probing afterwards mistook ordinary flock contention ("timeout")
7348
+ # for a dead bootstrap under load.
7349
+ keeper_alive=1
7350
+ kill -0 "$keeper_pid" 2>/dev/null || keeper_alive=0
7344
7351
  if [[ -s "$state" ]]; then
7345
7352
  IFS= read -r status <"$state"
7346
7353
  case "$status" in
@@ -7369,7 +7376,12 @@ finally:
7369
7376
  ;;
7370
7377
  esac
7371
7378
  fi
7372
- if ! kill -0 "$keeper_pid" 2>/dev/null; then
7379
+ if (( keeper_alive == 0 )); then
7380
+ # Nothing terminal was published: the keeper died during bootstrap.
7381
+ # Its exit status names the real cause (crash, signal, or io failure).
7382
+ keeper_rc=0
7383
+ wait "$keeper_pid" 2>/dev/null || keeper_rc=$?
7384
+ failure="keeper exited before readiness (status $keeper_rc)"
7373
7385
  break
7374
7386
  fi
7375
7387
  if [[ -z "$acquire_deadline" ]]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@calltelemetry/fmix",
3
- "version": "2.7.25",
3
+ "version": "2.7.26",
4
4
  "description": "Verified native FMix runner for CallTelemetry workspaces",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -26,7 +26,7 @@
26
26
  "directory": "packages/npm"
27
27
  },
28
28
  "fmix": {
29
- "runnerSha256": "0a78d4b1ae469d91558f9d881df1d56802bc4fb9840f2d8603657ff004b336ae",
30
- "sourceTag": "fmix-v2.7.25"
29
+ "runnerSha256": "a91b91b08d2bac8ac16a47d5b9c30039f02f3943509d0d5194eb4874b1cf4ee2",
30
+ "sourceTag": "fmix-v2.7.26"
31
31
  }
32
32
  }