myxce/.kiro/steering
Rongsong Shen 19052674bd
fix(autoscaler): run provider scripts with posix_spawn, not fork (bug-1969)
The scaler is multi-threaded (monitor and demand threads); invoke() forked
and, in the child, logged, snprintf'd and setenv()'d before execl(), which
can deadlock on a lock another thread held at fork time and block the
caller in waitpid() forever.

run_script() now posix_spawn()s `sh <script> -f <in.json>`: stdout and
stderr go to the output file through file actions, the provider variables
(PRO_CONF_DIR, PRO_DATA_DIR, PRO_LOG_DIR, PROVIDER_NAME) are passed as the
child's envp (provider_env()), the child starts with an empty signal mask
and default dispositions, and waitpid() retries on EINTR.

The scaler unit suite (scaler/testsuite) was never built; it is now the
meson test "autoscaler test", linked with -Wl,--wrap=fork so it counts
fork() calls during a provider call.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-10 14:41:02 +00:00
..
api-standards.md docs: OpenWolf pointer cleanup + redirect-hint checklist item (bug-1700 lesson) 2026-08-27 08:27:17 +00:00
build-deployment.md docs(controller-peers-env-fallback): document XCE_CONTROLLER_PEERS in the build/deployment steering (task 6.1) 2026-10-03 08:23:32 +00:00
config-design.md save status 2026-07-21 08:24:44 +00:00
error-handling.md update documents 2026-08-10 17:51:51 +08:00
ha-async-io.md docs: sync skills and steering docs with bug-1562..1566 findings 2026-08-17 10:21:25 +00:00
job-config-layering.md docs(steering): one owner per job attribute; pre/post-exec moves to the app profile 2026-10-10 03:19:20 +00:00
persistence.md docs: formalize save/restore field-completeness as a standing invariant 2026-08-27 08:59:48 +00:00
product.md update documents 2026-08-10 17:51:51 +08:00
resource-accounting.md docs(resource-accounting): explain why admission control doesn't query live 2026-08-31 07:28:00 +00:00
roadmap.md docs(specs): record xce-node-manager interactions with service and provisioning specs 2026-10-10 07:46:24 +00:00
scheduler-driver-equivalence.md docs(scheduler): correct stale bug-1611 status and driver-equivalence steering 2026-09-19 14:01:09 +00:00
security.md docs(apiserver): document security defaults changed by bug-1945..1952 2026-10-10 08:58:20 +00:00
structure.md docs(xce-harness-component): list harness in structure.md 2026-09-14 07:56:15 +00:00
tech.md fix(autoscaler): run provider scripts with posix_spawn, not fork (bug-1969) 2026-10-10 14:41:02 +00:00
testing.md feat(eliminate-frontend-makefile): task 3.3 - update live documentation (11 files) 2026-09-03 14:22:54 +00:00