feat(worker): distinguish signal-killed job exits from real crashes in logs
A JOB_EXITED status could mean either a deliberate, expected termination (worker_signal_callback() only ever sends SIGTERM/SIGKILL to cancel/ force-kill a job) or a genuine unexpected crash signal. Both logged at ERROR, drowning real crashes in expected-cancellation noise. Added job_exit_log_level(): exit_code == 128+SIGTERM/SIGKILL logs at INFO (matching process_exit_callback()'s existing plain-INFO treatment for the same case), anything else stays ERROR. Verified: worker test suite 5/5 including the new test_uv_ipc_job_exit_severity coverage. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QxaSzHRB7pmYFp4cVnwkA
This commit is contained in:
parent
83cb660b44
commit
347e996e76
3 changed files with 127 additions and 2 deletions
|
|
@ -77,3 +77,19 @@ test('worker dbus_workers_update test', dbus_workers_update_test,
|
|||
suite: 'worker',
|
||||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
||||
# User-reported log-severity bug: a deliberately-killed job (SIGTERM/SIGKILL
|
||||
# via worker_signal_callback(), xcecd_worker.c) was logged at ERROR by
|
||||
# ipc_worker_send_status() (uv_ipc.c) even though process_exit_callback()
|
||||
# two lines earlier already judges the same event INFO-worthy. See
|
||||
# test_uv_ipc_job_exit_severity.c's own header comment.
|
||||
uv_ipc_job_exit_severity_test = executable('uv_ipc_job_exit_severity_test',
|
||||
'test_uv_ipc_job_exit_severity.c',
|
||||
include_directories: [worker_test_incdir],
|
||||
dependencies: worker_test_deps,
|
||||
install: false)
|
||||
|
||||
test('worker uv_ipc job_exit_severity test', uv_ipc_job_exit_severity_test,
|
||||
suite: 'worker',
|
||||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue