Thread overview
[Issue 15238] Heisenbug running std.random unittests
Oct 23, 2015
Maxim Fomin
Oct 27, 2015
Vladimir Panteleev
Oct 27, 2015
Vladimir Panteleev
Oct 27, 2015
Vladimir Panteleev
Sep 03, 2023
Walter Bright
October 23, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

Maxim Fomin <mxfomin@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mxfomin@gmail.com

--- Comment #1 from Maxim Fomin <mxfomin@gmail.com> ---
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

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thecybershadow@gmail.com

--- Comment #2 from Vladimir Panteleev <thecybershadow@gmail.com> ---
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.

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

--- Comment #3 from Vladimir Panteleev <thecybershadow@gmail.com> ---
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.

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

--- Comment #4 from Vladimir Panteleev <thecybershadow@gmail.com> ---
https://github.com/D-Programming-Language/phobos/pull/3776

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--
October 27, 2015
https://issues.dlang.org/show_bug.cgi?id=15238

--- Comment #5 from github-bugzilla@puremagic.com ---
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

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=15238

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to stable 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

--
September 03, 2023
https://issues.dlang.org/show_bug.cgi?id=15238

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=24134

--