Bug 15238 – Heisenbug running std.random unittests

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2015-10-23T01:19:04Z
Last change time
2023-09-03T12:09:54Z
Assigned to
No Owner
Creator
Walter Bright
See also
https://issues.dlang.org/show_bug.cgi?id=24134

Comments

Comment #0 by bugzilla — 2015-10-23T01:19:04Z
Exposed by the autotester on Linux32_64: ****** FAIL release64 std.random core.exception.AssertError@std/random.d(3003): 99: 4699 < 4700.
Comment #1 by mxfomin — 2015-10-23T05:41:32Z
Can you point on example? I see some pulls fail on FreeBSD with: --- std.socket(502) test fails depending on environment --- (core.exception.AssertError@std/socket.d(504): Assertion failure Some (old) pulls fail on different platforms with: ****** FAIL release32 std.numeric core.exception.AssertError@std/numeric.d(1616): unittest failure
Comment #2 by dlang-bugzilla — 2015-10-27T09:24:06Z
I've seen this a bunch of times. If you read the comment above the failing assert, essentially that entire check is luck-based. That test should be changed to use a RNG seeded with a constant value, or removed entirely.
Comment #3 by dlang-bugzilla — 2015-10-27T09:43:52Z
BTW, I'm not sure how intentional this is, but in a lot of places the std.random tests pass the RNG object by-value to e.g. randomSample, which means that it will query the same values over and over without advancing the RNG.
Comment #4 by dlang-bugzilla — 2015-10-27T09:45:03Z
Comment #5 by github-bugzilla — 2015-10-27T12:55:18Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/19b0be7de493c1c167c7a3114c4950f8bc4e63b5 fix Issue 15238 - Heisenbug running std.random unittests https://github.com/D-Programming-Language/phobos/commit/900e0dd36a92cb4d65301ccf2e98a5f43e52d93e Merge pull request #3776 from CyberShadow/pull-20151027-094401 fix Issue 15238 - Heisenbug running std.random unittests
Comment #6 by github-bugzilla — 2016-01-03T14:14:53Z