stress should handle SIGTERM/SIGINT properly

Bug #1335541 reported by Petar Maric
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress (Ubuntu)
Fix Released
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
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress - 1.0.6-1

---------------
stress (1.0.6-1) unstable; urgency=medium

  * New upstream version 1.0.6. (LP: #1335541)
  * debian/copyright:
      - Converted the last paragraph of the GPL-2 in a comment.
      - Updated packaging copyright years.
      - Updated upstream copyright data.

 -- Joao Eriberto Mota Filho <email address hidden> Tue, 17 Jan 2023 15:18:20 -0300

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.