mcontend stressor SIGBUS's on older armhf platforms
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 c3678dadee23f9b
Author: Colin Ian King <email address hidden>
Date: Mon Sep 23 15:54:13 2019 +0100
stress-
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.
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 |
Changed in stress-ng (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
Fix committed: https:/ /kernel. ubuntu. com/git/ cking/stress- ng.git/ commit/ ?id=c3678dadee2 3f9b8783038f544 63cff5741a9cbe