commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-899) A random crash of MersenneTwister random generator
Date Sun, 18 Nov 2012 20:54:58 GMT

    [ https://issues.apache.org/jira/browse/MATH-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13499901#comment-13499901
] 

Gilles commented on MATH-899:
-----------------------------

bq. I think the reason that the unit test does not work is that Junit does not actually see
the exception.

That's not the problem. The test code works correctly and failures _are_ reported (and seen
by Junit). Just they do not occur consistently, as must be expected, I assume, because the
execution itself becomes random (subject to the threads scheduling by the system).

bq. commit the wrapper with no test class.

I'll do that then.

bq. You could and should provide a test that shows that the wrapper provides the same result
as a wrapped RandomGenerator (using the same seed)

I don't understand.

                
> A random crash of MersenneTwister random generator
> --------------------------------------------------
>
>                 Key: MATH-899
>                 URL: https://issues.apache.org/jira/browse/MATH-899
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: Windows 7, JDK 1.7.05
>            Reporter: Alexander Nozik
>            Priority: Minor
>         Attachments: SynchronizedRandomGenerator.java, SynchronizedRandomGeneratorTest.java
>
>
> There is a very small probability that MersenneTwister generator gives a following error:

> java.lang.ArrayIndexOutOfBoundsException: 624
> in MersenneTwister.java line 253
> The error is completely random and its probability is about 1e-8.
> UPD: The problem most probably arises only in multy-thread mode.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message