myxce/src/worker/meson.build
Rongsong Shen 8b7173bb09
fix(worker): keep a signal that arrives before the job has started (bug-1908)
The controller forwards a kill as soon as it has dispatched a job, but
the worker queues the start and only registers the job (and, for the
real worker, connects its IPC client) once it starts -- seconds later
for the first jobs after a worker starts. A signal arriving in between
was dropped ("Failed to find worker"), although the API reported it
accepted, and the job ran to completion.

New pending_signal table: the start handler records the job, a signal
for a queued or still-starting job is kept there, and it is delivered
when the job reaches RUNNING (virtual: killed_signal; real: IPC). A
failed start or a job that ends drops the entry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-02 02:50:32 +00:00

111 lines
2.8 KiB
Meson

xcecd_worker_srcs = [
'src/xcecd_worker.c',
'src/inter_job_utils.c',
'src/xcecd_exdata.c',
'src/uv_ipc.c',
'src/uv_proc.c',
'src/static_array.c',
'src/xcecd_cgroups.c',
'src/xcecd_worker_utils.c',
'src/pending_signal.c',
'src/xcecd_resync.c',
'src/controller_connector.c',
'src/xcecd_dbus_manager.c',
'src/xcecd_db.c',
'src/xcecd.c',
'src/connection_handler.c',
'src/resource_sync.c',
'src/node_information.c',
'src/thread_pool.c',
'src/hardware_monitor.c',
'src/system_monitor.c',
'src/process_manager.c',
'src/process_worker_manager.c',
'src/xcecd_sig.c',
]
incdir = include_directories('.', 'include', '../include', '../lib')
libuv_dep = dependency('libuv')
elogind_dep = dependency('libelogind')
sqlite3_dep = dependency('sqlite3')
libcgroup_dep = dependency('libcgroup')
hwloc_dep = dependency('hwloc')
xcecd_worker_deps = [
libxce_dep,
libcgroup_dep,
hwloc_dep,
libuv_dep,
elogind_dep,
sqlite3_dep,
struct2json_dep,
yaml_deps,
tinylog_dep,
]
xcecd_worker = executable('xcecd_worker',
xcecd_worker_srcs,
c_args:['-DIPC_WORKER'],
include_directories: [incdir],
dependencies: [xcecd_worker_deps],
install: true)
xrun_srcs = [
'src/xrun.c'
]
xrun_deps = [
libxce_dep,
tinylog_dep,
]
xrun = executable('xrun',
xrun_srcs,
c_args: ['-DXRUN'],
include_directories: [incdir],
dependencies: [xrun_deps],
install: true)
xcecd_srcs = [
'src/static_array.c',
'src/inter_job_utils.c',
'src/xcecd_sig.c',
'src/uv_ipc.c',
'src/xcecd_db.c',
'src/xcecd_exdata.c',
'src/xcecd_cgroups.c',
'src/xcecd_dbus_manager.c',
# 'src/main.c',
'src/xcecd.c',
'src/thread_pool.c',
'src/system_monitor.c',
'src/process_manager.c',
'src/process_worker_manager.c',
'src/connection_handler.c',
'src/controller_connector.c',
'src/resource_sync.c',
'src/xcecd_worker_utils.c',
'src/xcecd_resync.c',
'src/hardware_monitor.c',
'src/node_information.c',
'src/job_information.c',
'src/pending_signal.c'
]
xcecd_deps = [xcecd_worker_deps]
xcecd = executable('xcecd',
[xcecd_srcs,'src/main.c'],
c_args: ['-DDBUS_MANAGER'],
include_directories: [incdir],
dependencies: [xcecd_deps],
install: true)
xcecd_virtual = executable('xcecd_virtual',
[xcecd_srcs,'src/main.c'],
c_args: ['-DVIRTUAL_CLUSTER', '-DDBUS_MANAGER'],
include_directories: [incdir],
dependencies:[xcecd_deps],
install:true)
subdir('testsuite')