kill(1) bug misparsed a negative PID and killed every process on an Ubuntu host
On the morning of September 24th 2026, all Endcrawl services went down the instant the author ran sudo kill -TERM -1490947, a command meant to cancel a large Endcrawl 7k test render by signaling a whole process group[1]. The outage was caused by procps[2] 4.0.4, which provides /bin/kill in Ubuntu 24.04 LTS. When getopt[3] reports an unrecognized option, it puts only the first character after the dash into the optopt variable, so -1490947 collapsed to a pid of -1, since the code computes '0' minus that character. Under kill's rules, a signal to pid -1 goes to every process the caller may signal except init[4], and the command ran as root, so everything but init died.
Unix had the kill program by 1973, but killing a process group via a negative pid only became possible with Unix V9 in 1986, and it appears to have worked reliably in the BSDs. The Linux rewrite of kill in procps, by contrast, has shipped no fewer than four distinct negative-pid bugs, all landing in Ubuntu LTS releases 14, 16, 18, 22 and 24. The first arrived in Ubuntu 14.04 LTS with procps 3.3.9, after command line parsing was moved from manual pointer arithmetic over argv to getopt. Because of option bundling, getopt treats kill -HUP -123 as if -1, -2 and -3 were passed separately, and in the single-digit case a kill of -1 silently did nothing. The post documents this decade of kill bugs and ends with recommendations.
Read the original alangrow.comDiscussion
Discussion
Commenters traced the history further, citing the CSRG archives to show that userland kill(1) gained negative pid support in 1986, with the kernel side contributed by Sun the year before. The main disagreement is over the lesson: some blame missing unit tests in procps, others getopt-style parsing itself, and one reader calls the kill interface too ambiguous and proposes an explicit option for targeting process groups. Others simply praise the article or report a CSS font-size rule that makes the page text far too large.
Sources
-
alangrow.com
A Decade of Kill Bugs – Alan Grow
-
KRGeekNews KO
kill 버그의 10년


