stress should handle SIGTERM/SIGINT properly

Bug #1335541 reported by Petar Maric on 2014-06-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress (Ubuntu)
Undecided
Unassigned

Bug Description

Using Ubuntu 12.04.4 LTS, fully updated.

For this minimal working example:
"""
$ stress --cpu 2 --timeout 1h --quiet &
[1] 10329

$ ps aux | grep stress | grep -v grep
petar 10329 0.0 0.0 7236 420 pts/4 S 04:53 0:00 stress --cpu 2 --timeout 1h --quiet
petar 10330 101 0.0 7236 96 pts/4 R 04:53 0:13 stress --cpu 2 --timeout 1h --quiet
petar 10331 101 0.0 7236 96 pts/4 R 04:53 0:13 stress --cpu 2 --timeout 1h --quiet
"""

I expect the program to end all its processes on SIGTERM:
"""
$ kill -TERM 10329
"""
however, while the main program does exit, it does not end it's children processes:
"""
$ ps aux | grep stress | grep -v grep
petar 10330 99.8 0.0 7236 96 pts/4 R 04:53 3:33 stress --cpu 2 --timeout 1h --quiet
petar 10331 99.8 0.0 7236 96 pts/4 R 04:53 3:33 stress --cpu 2 --timeout 1h --quiet
"""

The same error occurs with SIGINT.

I've created a Docker image based on 'stress' - https://bitbucket.org/petar/docker.cpu_stress_test
This bug is preventing Docker from stopping the container properly (using SIGTERM), and instead killing the entire container after a timeout (using SIGKILL).

Changed in stress (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers