** Description changed:

- Ensure zero's are written 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.
+ == 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 <colin.k...@canonical.com>
+ 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 <colin.k...@canonical.com>
+ 
+ 
+ == 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 Eoan)
       Status: In Progress => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1845011

Title:
  mcontend stressor SIGBUS's on older armhf platforms

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/stress-ng/+bug/1845011/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to