stress-ng mwc8() getting reset when mwc1() is called

Bug #1855851 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
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned
Eoan
Fix Released
Undecided
Unassigned
Focal
Fix Released
Medium
Colin Ian King

Bug Description

== SRU [Bionic][Disco][Eoan] ==

The 8 bit pseudo-random number generator mwc8() is being zero'd whenever a 1 bit value from mwc1() is generated. This causes mwc8() to generate a stream of 1 to 31 zeros until all the bits are shifted out of a 32 bit entropy state and the next 8 bit value is generated.

== Fix ==

Upstream fix (in Focal):

commit 99e65ccceedc12e68e34dc1ceb51ae0d5f3787ff
Author: Colin Ian King <email address hidden>
Date: Fri Nov 29 10:55:42 2019 +0000

    core-mwc: fix mwc8() being reset when using mwc1()

== Test ==

This cannot be easily regression tested, one has to attach a debugger to observe mwc1() clobbering the mwc8() internal state.

== Regression Potential ==

Since this fixes the random number generation when mwc1() is called, it changes the random behaviour of various stressors that use mwc1() and mwc8() together. This affects the following stressors: mmapfixed, sock and swap. The changes now make the stressors behave more randomly and hence this may affect the way a system is being stressed.

description: updated
description: updated
Changed in stress-ng (Ubuntu Focal):
status: New → Fix Committed
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
Changed in stress-ng (Ubuntu Focal):
assignee: nobody → Colin Ian King (colin-king)
importance: Undecided → Medium
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Colin, or anyone else affected,

Accepted stress-ng into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/stress-ng/0.10.07-1ubuntu3 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. 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 Eoan):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-eoan
Changed in stress-ng (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed-disco
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

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-0ubuntu5 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 Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

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-1ubuntu6 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 Focal):
status: Fix Committed → Fix Released
tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-done-disco
removed: verification-needed-disco
Revision history for this message
Colin Ian King (colin-king) wrote :

Verified for bionic, disco, eoan. Issue fixed.

tags: added: verification-done verification-done-eoan
removed: verification-needed verification-needed-eoan
Revision history for this message
Chris Halse Rogers (raof) 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * Fix --timer-slack from consuming the following arg (LP: #1853832)
    Currently the timer slack option eats the next argument, causing
    missing argument parsing behaviour on the command line.
  * Fix mwc8() being reset when using mwc1() (LP: #1855851)
    Fic Psuedo-random 8 bit numbers from mwc8() accidentally
    being zero'd when mwc1() is called.

 -- Colin King <email address hidden> Tue, 10 Dec 2019 09:32:11 +0000

Changed in stress-ng (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package stress-ng - 0.10.07-1ubuntu3

---------------
stress-ng (0.10.07-1ubuntu3) eoan; urgency=medium

  * Fix --timer-slack from consuming the following arg (LP: #1853832)
    Currently the timer slack option eats the next argument, causing
    missing argument parsing behaviour on the command line.
  * Fix mwc8() being reset when using mwc1() (LP: #1855851)
    Fic Psuedo-random 8 bit numbers from mwc8() accidentally
    being zero'd when mwc1() is called.

 -- Colin King <email address hidden> Tue, 10 Dec 2019 09:32:11 +0000

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 bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/stress-ng/0.09.25-1ubuntu8 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.

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

Bionic: random values look correct. Marking this is fixed.

tags: added: verification-done-bionic
removed: verification-needed-bionic
tags: added: verification-done
removed: verification-needed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (stress-ng/0.09.25-1ubuntu8)

All autopkgtests for the newly accepted stress-ng (0.09.25-1ubuntu8) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

stress-ng/0.09.25-1ubuntu8 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#stress-ng

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * Ensure --aggressive mode terminates early (LP: #1858858)
    Add a waitpid NOHANG wait on each child process and if we get ESRCH
    on all the child pids we can terminate the loop early.
  * Fix --timer-slack arg handling (LP: #1853832)
  * Fix mwc8() being reset when using mwc1() (LP: #1855851)
    Fix Psuedo-random 8 bit numbers from mwc8() accidentally
    being zero'd when mwc1() is called.

 -- Colin King <email address hidden> Tue, 10 Dec 2019 09:32:11 +0000

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.