stress-ng-malloc: allocation at 0x5631fc61e150 does not contain correct value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stress-ng |
Fix Released
|
High
|
Colin Ian King | ||
stress-ng (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
== SRU Jammy ==
== Justification ==
stress-ng --malloc 1 --verify verification incorrectly performs a page checksum on the wrong page and will incorrectly report a test failure when the data is perfectly correct.
== Fix ==
This was fixed with the upstream fix:
commit ddecc607f916f8c
Author: Mayuresh Chitale <email address hidden>
Date: Tue Jun 7 12:07:10 2022 +0530
stress-malloc: Fix for https:/
After realloc is done the address of the allocated memory is not stashed to the
buffer like it is done after calloc/malloc. This causes the verify check
to fail as the buffer contains the stale address.
Signed-off-by: Mayuresh Chitale <email address hidden>
..this is the Kinetic release and works as expected. The fix is clean application of this patch.
== Test Case ==
Run:
stress-ng --aggressive --verify --timeout 300 --malloc 0
Without the fix, it will spit out errors like:
stress-ng: fail: [2060] stress-ng-malloc: allocation at 0x5590f0d68670 does not contain correct value
stress-ng: fail: [2060] stress-ng-malloc: allocation at 0x5590f0d68670 does not contain correct value
stress-ng: fail: [2059] stress-ng-malloc: allocation at 0x5590ea580830 does not contain correct value
== Regression Risk ==
This is a one line fix to store the correct checksum in the correct page. it only affects the one stress-ng stress case, namely the malloc stressor. The backport has been regression tested on Jammy for a 1hr run w/o seeing any regression. The change is also present in Kinetic and works perfectly. The regression risk is very small, this only change the behavior of the malloc test when using the --verify option. The modification is to memory that is mapped into the address space so there is no segmentation fault regression potential.
-------
On 22.04 stress-ng --malloc appears to pass but gives the following error messages:
stress-ng: fail: [2903753] stress-ng-malloc: allocation at 0x5631fc61b530 does not contain correct value
stress-ng: fail: [2903853] stress-ng-malloc: allocation at 0x5631fcb17920 does not contain correct value
...
info: 5 failures reached, aborting stress process
...
stress-ng: fail: [2903814] stress-ng-malloc: allocation at 0x5631fc6a92e0 does not contain correct value
stress-ng: info: [2903729] successful run completed in 10.81s
Steps to recreate:
stress-ng --aggressive --verify --timeout 300 --malloc 0
This appears to be a regression as this error is not seen on 20.04
Changed in stress-ng: | |
assignee: | nobody → Colin Ian King (colin-king) |
importance: | Undecided → High |
description: | updated |
description: | updated |
Changed in stress-ng: | |
status: | In Progress → Fix Released |
Logfile test-memory command from the canonical- certification- server package