myxce/src
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
..
autoscaler fix(autoscaler): run provider scripts with posix_spawn, not fork (bug-1969) 2026-10-10 14:41:02 +00:00
configs feat(xceadmin): validate percent-based limit values are in [0.0, 1.0] (bug-1833) 2026-09-20 10:50:21 +00:00
controller fix(controller): reject submissions to closed or unknown queues (bug-1960) 2026-10-10 10:38:42 +00:00
docs feat(xcecli): jobs kill --signal and --force 2026-10-10 10:25:23 +00:00
frontend fix(apiserver): restart carries only the options a job gets (bug-1968) 2026-10-10 14:23:16 +00:00
harness fix(harness): xce_test fake worker answers the controller's job-state query (bug-1922) 2026-10-08 03:03:09 +00:00
include fix(controller): reject submissions to closed or unknown queues (bug-1960) 2026-10-10 10:38:42 +00:00
lib fix(controller): reject submissions to closed or unknown queues (bug-1960) 2026-10-10 10:38:42 +00:00
nixSupport remove extralib 2026-09-04 11:24:43 +08:00
scheduler fix(scheduler): replace limits on a config re-push (bug-1967) 2026-10-10 11:38:05 +00:00
schema fix(worker): graceful job kill and catchable stop, as LSF (bug-1957) 2026-10-10 10:00:36 +00:00
tools feat(build): no fork in multi-threaded XCE processes, enforced by check-no-fork 2026-10-10 13:35:52 +00:00
worker feat(build): no fork in multi-threaded XCE processes, enforced by check-no-fork 2026-10-10 13:35:52 +00:00
xceadmin build(xceadmin): run the live E2E tests against this build's xce_controller 2026-10-09 06:41:09 +00:00
flake.lock remove extralib 2026-09-04 11:24:43 +08:00
flake.nix remove extralib 2026-09-04 11:24:43 +08:00
meson.build feat(build): no fork in multi-threaded XCE processes, enforced by check-no-fork 2026-10-10 13:35:52 +00:00
meson.options feat(dirty-content-fingerprint): add dirty_fingerprint meson option and C define 2026-08-21 03:54:37 +00:00