Feature #18513

Print "exited from signal XY" for exit codes >128

Added by Peter Amstutz about 2 months ago. Updated 4 minutes ago.

Status:
In Progress
Priority:
Normal
Assigned To:
Category:
Crunch
Target version:
Start date:
01/18/2022
Due date:
% Done:

0%

Estimated time:
(Total: 0.00 h)
Story points:
-

Description

When a program exits from a signal, crunch-run prints this:

Container exited with code: 139

Instead, this should say something like "Exited with signal 11 (SIGSEGV)" because most people don't actually know that exit codes over 128 mean exiting due to an unhandled signal, and nobody likes doing math.


Subtasks

Task #18629: Review 18513-log-signal-exitIn ProgressLucas Di Pentima

History

#1 Updated by Peter Amstutz about 2 months ago

  • Status changed from New to In Progress

#2 Updated by Peter Amstutz about 2 months ago

  • Status changed from In Progress to New
  • Description updated (diff)

#3 Updated by Peter Amstutz 12 days ago

  • Target version set to 2022-01-19 sprint
  • Assigned To set to Tom Clegg

#4 Updated by Tom Clegg about 1 hour ago

  • Status changed from New to In Progress
Depending on whether there was a signal and whether it's a known signal number, the log message is now one of:
  • Container exited with status code 100
  • Container exited with status code 228 (signal 100)
  • Container exited with status code 137 (signal 9, SIGKILL)

While I was in the vicinity I figured we could test that the container executors actually return exit codes and signal numbers this way (as opposed to the "wait status" format where the exit code is in higher bits). This worked except that I couldn't get any variation of "docker run busybox sh -c 'kill -9 $$'" to work. Perhaps injecting a Go program that divides by zero would work? For now, this test just skips the docker case. For now I guess we've seen enough "exited 137" to know it works that way.

18513-log-signal-exit @ 3b9c4641a985a53347696b7a77bcde28a92d6e79 -- https://ci.arvados.org/view/Developer/job/developer-run-tests/2878/

Also available in: Atom PDF