rmap stressor should return EXIT_NO_RESOURCE when out of free space

Bug #1845005 reported by Colin Ian King on 2019-09-23
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress-ng (Ubuntu)
Medium
Colin Ian King
Bionic
Medium
Colin Ian King
Disco
Medium
Colin Ian King
Eoan
Medium
Colin Ian King

Bug Description

== SRU Justification BIONIC, DISCO ==

When running the rmap stressor on systems with small file systems the fallocate can fail to allocate a large file when running with may stressors causing the stress test to exit with EXIT_FAILURE. The correct return is actually EXIT_NO_RESOURCE as there are not enough resources to run the stress-test.

== Test Proceedure ==

Run rmap on a small file system with many stressors invoked, e.g.

stress-ng --rmap 2048 -t 60

without the fix, the test will exit with a failure. With the fix the stressor will terminate early with just an out of resource message rather than a hard test failure.

== Fix ==

upstream commit:

commit 38fd9c6ff96cb7e73f7cb3758bb303d874ad11b5
Author: Colin Ian King <email address hidden>
Date: Mon Sep 23 14:11:26 2019 +0100

    stress-rmap: don't make fallocate failures a rmap test failure (LP: #1845005)

    The rmap stressor should return EXIT_NO_RESOURCE and not EXIT_FAILURE
    when attempting to fallocate a file to rmap onto. This makes it a
    non-critical failure based on lack of resources rather than a stress
    test failure because rmap didn't fail per-se.

    Signed-off-by: Colin Ian King <email address hidden>

== Regression Potential ==

This is a minor change to a return status and closing of opened resources. The behaviour is now different on an allocation failure error type, so applications running this stress test that checking a specific error return may need updating. This is unlikely as most code checks for 0 success and non-zero for failure.

---------------------------------------------

The rmap stressor should return EXIT_NO_RESOURCE and not EXIT_FAILURE when attempting to fallocate a file to rmap onto. This makes it a non-critical failure based on lack of resources rather than a stress test failure because rmap failed.

Colin Ian King (colin-king) wrote :
Changed in stress-ng:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
status: In Progress → Fix Committed
no longer affects: stress-ng
Changed in stress-ng (Ubuntu Eoan):
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
status: New → Fix Committed
Changed in stress-ng (Ubuntu Xenial):
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu Bionic):
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu Disco):
assignee: nobody → Colin Ian King (colin-king)
no longer affects: stress-ng (Ubuntu Xenial)
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.10.06-1

---------------
stress-ng (0.10.06-1) unstable; urgency=medium

  * Makefile: bump version
  * stress-mcontend: ensure mmap'd file is sync'd with zero
    data (LP: #1845011)
  * stress-rmap: don't make fallocate failures a rmap test
    failure (LP: #1845005)
  * stress-shm: fork and exit a child to exercise shm dup and
    removal
  * stress-ng: fix jobfile with classes (LP: #1706970)
  * stress-procfs: don't randomly read pci proc info on ARM64
  * stress-procfs: remove bad buffer test, it's not portable
  * stress-sysfs: rename MAX_READ_THREADS to MAX_SYSFS_THREADS
  * stress-sysfs: remove bad address reads, these fault on ARM64
  * stress-procfs: rename MAX_READ_THREADS to MAX_PROCFS_THREADS
  * stress-inode-flags: move open/close to controlling process
  * stress-sig: fix spelling mistake "siqqueue" -> "sigqueue"

 -- Colin King <email address hidden> Mon, 23 Sep 2019 17:40:21 +0100

Changed in stress-ng (Ubuntu Eoan):
status: Fix Committed → Fix Released
Changed in stress-ng (Ubuntu Bionic):
importance: Undecided → Medium
Changed in stress-ng (Ubuntu Disco):
importance: Undecided → Medium
Changed in stress-ng (Ubuntu Bionic):
status: New → In Progress
Changed in stress-ng (Ubuntu Disco):
status: New → In Progress

Hello Colin, or anyone else affected,

Accepted stress-ng into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/stress-ng/0.09.57-0ubuntu3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in stress-ng (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Colin Ian King (colin-king) wrote :

verified fixed on armhf on Bionic with stress-ng 0.09.57-0ubuntu3

Colin Ian King (colin-king) wrote :

Oops, I meant Disco.

tags: added: verification-done verification-done-disco
removed: verification-needed verification-needed-disco
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.09.57-0ubuntu3

---------------
stress-ng (0.09.57-0ubuntu3) disco; urgency=medium

  * stress-rmap: don't hard fail on fallocate failures (LP: #1845005)
    - backport of upstream commit 38fd9c6ff96c
  * stress-mcontend: sync mmap file with zero data (LP: #1845011)
    - backport of upstream commit c3678dadee23

 -- Colin King <email address hidden> Tue, 24 Sep 2019 08:30:11 +0100

Changed in stress-ng (Ubuntu Disco):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for stress-ng has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Colin Ian King (colin-king) wrote :

Hi, the Bionic nomination is still outstanding, I'd like that SRU'd too.

Hello Colin, or anyone else affected,

Accepted stress-ng into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/stress-ng/0.09.25-1ubuntu4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in stress-ng (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
removed: verification-done
Colin Ian King (colin-king) wrote :

Exits with the correct error code now:

bionic-arhhf$ stress-ng --rmap 10 -t 5
stress-ng: info: [7937] dispatching hogs: 10 rmap
stress-ng: info: [7937] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: fail: [7939] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7940] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7938] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7943] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7941] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7944] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7942] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7946] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: error: [7937] process [7938] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7939] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7940] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7941] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7942] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7943] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7944] (stress-ng-rmap) aborted early, out of system resources
stress-ng: fail: [7945] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: fail: [7947] stress-ng-rmap: fallocate failed, errno=27 (File too large)
stress-ng: error: [7937] process [7945] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7946] (stress-ng-rmap) aborted early, out of system resources
stress-ng: error: [7937] process [7947] (stress-ng-rmap) aborted early, out of system resources
stress-ng: info: [7937] successful run completed in 0.07s
bionic-arhhf$ echo $?
3

3 = EXIT_NO_RESOURCE

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Colin Ian King (colin-king) wrote :

@SRU team, can this be released some time soon? Thanks :-)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.09.25-1ubuntu4

---------------
stress-ng (0.09.25-1ubuntu4) bionic; urgency=medium

  * stress-rmap: don't hard fail on fallocate failures (LP: #1845005)
    - backport of upstream commit 38fd9c6ff96c
  * stress-mcontend: sync mmap file with zero data (LP: #1845011)
    - backport of upstream commit c3678dadee23

 -- Colin King <email address hidden> Tue, 24 Sep 2019 08:30:11 +0100

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

Other bug subscribers