mcontend stressor SIGBUS's on older armhf platforms

Bug #1845011 reported by Colin Ian King
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stress-ng (Ubuntu)
Fix Released
Medium
Colin Ian King
Bionic
Fix Released
Medium
Colin Ian King
Disco
Fix Released
Medium
Colin Ian King
Eoan
Fix Released
Medium
Colin Ian King

Bug Description

== SRU Justification BIONIC, DISCO ==

When running the mcontend stressor on slow armhf devices that have slow memory backed I/O one can get SIGBUS on a file backed mmap because the flush has been slow to allocate the page and we're mmapping and accessing a as yet allocated page on the backing store.

== Test Proceedure ==

Run:

stress-ng --mcontend 1 -t 10 -v

without the fix, we get SIGBUS failures because we touch a page that has not yet had the backing mmap page allocated and flushed to the file system.

== Fix ==

commit c3678dadee23f9b8783038f54463cff5741a9cbe
Author: Colin Ian King <email address hidden>
Date: Mon Sep 23 15:54:13 2019 +0100

    stress-mcontend: ensure mmap'd file is sync'd with zero data (LP: #1845011)

    Write zero's to backing store of at least one page size and sync
    it so that we can be 100% sure that mmap'ing the page into memory
    is backed with data so we don't get BUS errors on some platforms
    such as armhf Raspi2.

    Also fix broken sanity check on 2nd mmap out of memory failure.

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

== Regression Potential ==

Minimal. This replaces the more esoteric fallocate() with a direct set of file writes and a sync to ensure data is written back before we mmap onto it. The fixed behaviour is slower as we introduce a sync, so we have the possibility of the sync blocking for a long time if the system has a lot of dirty data, but this is necessary as fsync() is less portable and sync guarantees we really have data to mmap onto to avoid the SIGBUS.

Revision history for this message
Colin Ian King (colin-king) wrote :
Changed in stress-ng:
status: New → Fix Committed
importance: Undecided → Medium
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu):
milestone: none → bionic-updates
Changed in stress-ng (Ubuntu Eoan):
milestone: bionic-updates → none
no longer affects: stress-ng
Changed in stress-ng (Ubuntu Bionic):
importance: Undecided → Medium
Changed in stress-ng (Ubuntu Disco):
importance: Undecided → Medium
Changed in stress-ng (Ubuntu Eoan):
importance: Undecided → Medium
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)
Changed in stress-ng (Ubuntu Eoan):
assignee: nobody → Colin Ian King (colin-king)
Changed in stress-ng (Ubuntu Bionic):
status: New → In Progress
Changed in stress-ng (Ubuntu Disco):
status: New → In Progress
Changed in stress-ng (Ubuntu Eoan):
status: New → In Progress
description: updated
Changed in stress-ng (Ubuntu Eoan):
status: In Progress → Fix Committed
Revision history for this message
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
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

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
Revision history for this message
Colin Ian King (colin-king) wrote :

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

tags: added: verification-done verification-done-disco
removed: verification-needed verification-needed-disco
Revision history for this message
Colin Ian King (colin-king) wrote :

Correction, I meant "Disco". verified fixed on armhf on Disco with stress-ng 0.09.57-0ubuntu3

Revision history for this message
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
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update 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.

Changed in stress-ng (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Colin Ian King (colin-king) wrote :

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

Revision history for this message
Mathew Hodson (mhodson) wrote :

Package is still in Unapproved queue.

Fix Committed status should be set once it is in -proposed.

Changed in stress-ng (Ubuntu Bionic):
status: Fix Committed → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

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
Revision history for this message
Colin Ian King (colin-king) wrote :

Verified bug is now fixed:

bionic-arhhf$ cat /proc/cpuinfo | grep model | head -1
model name : ARMv7 Processor rev 1 (v7l)
bionic-arhhf$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
bionic-arhhf$ stress-ng --mcontend 1 -t 10 -v
stress-ng: debug: [4816] 4 processors online, 4 processors configured
stress-ng: info: [4816] dispatching hogs: 1 mcontend
stress-ng: debug: [4816] /sys/devices/system/cpu/cpu0/cache does not exist
stress-ng: info: [4816] cache allocate: using built-in defaults as unable to determine cache details
stress-ng: debug: [4816] cache allocate: default cache size: 2048K
stress-ng: debug: [4816] starting stressors
stress-ng: debug: [4816] 1 stressor spawned
stress-ng: debug: [4817] stress-ng-mcontend: started [4817] (instance 0)
stress-ng: debug: [4817] stress-ng-mcontend: exited [4817] (instance 0)
stress-ng: debug: [4816] process [4817] terminated
stress-ng: info: [4816] successful run completed in 10.01s
bionic-arhhf$ dpkg -l | grep stress-ng
ii stress-ng 0.09.25-1ubuntu4 armhf tool to load and stress a computer
bionic-arhhf$

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Colin Ian King (colin-king) wrote :

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

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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