Test Failure - error: in "fc_crypto/rand_test": check rc < E + sigma has failed #349

Closed
opened 2022-04-20 19:18:09 +00:00 by rilesdun · 13 comments
rilesdun commented 2022-04-20 19:18:09 +00:00 (Migrated from gitlab.com)

I am seeing a test failure from @bobinson's latest merge from beatrice branch into master branch. I have collected the following logs but the full log can be found here - https://gitlab.com/PBSA/peerplays/-/jobs/2356660496

3348825ms th_a       real128_test.cpp:50           test_method          ] ten: 10. two: 2. twenty: 20. 
3348826ms th_a       real128_test.cpp:51           test_method          ] real128("12345.6789"): 12345.6789 
3348826ms th_a       real128_test.cpp:52           test_method          ] ten/3*3: 9.999999999999999999 
3348828ms th_a       serialization_test.cpp:54     operator()           ] Creating nested object with 100 level(s)
3348829ms th_a       serialization_test.cpp:59     operator()           ] Creating level 100
3348829ms th_a       serialization_test.cpp:54     operator()           ] Creating nested object with 150 level(s)
3348830ms th_a       serialization_test.cpp:59     operator()           ] Creating level 100
3348831ms th_a       serialization_test.cpp:54     operator()           ] Creating nested object with 150 level(s)
3348831ms th_a       serialization_test.cpp:59     operator()           ] Creating level 100
*** 1 failure is detected in the test module "AllTests"
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: exit status 1
I am seeing a test failure from @bobinson's latest merge from beatrice branch into master branch. I have collected the following logs but the full log can be found here - https://gitlab.com/PBSA/peerplays/-/jobs/2356660496 ``` 3348825ms th_a real128_test.cpp:50 test_method ] ten: 10. two: 2. twenty: 20. 3348826ms th_a real128_test.cpp:51 test_method ] real128("12345.6789"): 12345.6789 3348826ms th_a real128_test.cpp:52 test_method ] ten/3*3: 9.999999999999999999 3348828ms th_a serialization_test.cpp:54 operator() ] Creating nested object with 100 level(s) 3348829ms th_a serialization_test.cpp:59 operator() ] Creating level 100 3348829ms th_a serialization_test.cpp:54 operator() ] Creating nested object with 150 level(s) 3348830ms th_a serialization_test.cpp:59 operator() ] Creating level 100 3348831ms th_a serialization_test.cpp:54 operator() ] Creating nested object with 150 level(s) 3348831ms th_a serialization_test.cpp:59 operator() ] Creating level 100 *** 1 failure is detected in the test module "AllTests" Cleaning up project directory and file based variables 00:00 ERROR: Job failed: exit status 1 ```
rilesdun commented 2022-04-20 19:18:10 +00:00 (Migrated from gitlab.com)

assigned to @bobinson and @serkixenos

assigned to @bobinson and @serkixenos
rilesdun commented 2022-04-20 19:18:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #348

mentioned in issue #348
serkixenos commented 2022-04-27 12:28:50 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
pavel.baykov commented 2022-04-27 21:38:21 +00:00 (Migrated from gitlab.com)

that’s was solved before in develop branch, however just to recap:

1.we have different sources of RNG across code base , they don’t have direct tests
2. this specific test was not implemented correctly,
3. based on discussion with @serkixenos, the best way to check RNG is DieHarder test, the original test was written in Fortran by later on ported to C, i found one of the alive project: https://github.com/rurban/dieharder
executed on Ubuntu 20.04, to test default RNG:

#=============================================================================#
#          dieharder version 3.31.2beta Copyright 2003 Robert G. Brown        #
#=============================================================================#
   rng_name    |rands/second|   Seed   |  k ints/sec|k doubles/sec|
        mt19937|  7.65e+07  | 106531697|     76509  |      72453  |
#=============================================================================#
        test_name   |ntup| tsamples |psamples|  p-value |Assessment
#=============================================================================#

most of items passing, but there are failures too
...

rgb_permutations| 5| 100000| 100|0.99809606| WEAK

that’s was solved before in develop branch, however just to recap: 1.we have different sources of RNG across code base , they don’t have direct tests 2. this specific test was not implemented correctly, 3. based on discussion with @serkixenos, the best way to check RNG is DieHarder test, the original test was written in Fortran by later on ported to C, i found one of the alive project: https://github.com/rurban/dieharder executed on Ubuntu 20.04, to test default RNG: ``` #=============================================================================# # dieharder version 3.31.2beta Copyright 2003 Robert G. Brown # #=============================================================================# rng_name |rands/second| Seed | k ints/sec|k doubles/sec| mt19937| 7.65e+07 | 106531697| 76509 | 72453 | #=============================================================================# test_name |ntup| tsamples |psamples| p-value |Assessment #=============================================================================# ``` most of items passing, but there are failures too ... rgb_permutations| 5| 100000| 100|0.99809606| WEAK
pavel.baykov commented 2022-04-27 21:42:49 +00:00 (Migrated from gitlab.com)

if need i can check using Dieharder every source of RNG we have,

if need i can check using Dieharder every source of RNG we have,
pavel.baykov commented 2022-04-27 21:44:27 +00:00 (Migrated from gitlab.com)

but as a good reference is Bitcoin code where, RNG sources are rotating, that’s separate problem besides of quality of RNG in terms of p-values

but as a good reference is Bitcoin code where, RNG sources are rotating, that’s separate problem besides of quality of RNG in terms of p-values
hirunda commented 2022-05-04 15:02:19 +00:00 (Migrated from gitlab.com)

assigned to @hirunda

assigned to @hirunda
serkixenos commented 2022-05-04 16:11:27 +00:00 (Migrated from gitlab.com)

unassigned @bobinson, @serkixenos, and @pavel.baykov

unassigned @bobinson, @serkixenos, and @pavel.baykov
serkixenos commented 2022-05-04 16:12:33 +00:00 (Migrated from gitlab.com)

@hirunda We agreed to remove anything related to fc RNGm from the fc library and peerplays code.

@hirunda We agreed to remove anything related to fc RNGm from the fc library and peerplays code.
serkixenos commented 2022-05-04 16:13:34 +00:00 (Migrated from gitlab.com)

We will need two merge requests for this, one for fc library, and another for peerplays.

We will need two merge requests for this, one for fc library, and another for peerplays.
serkixenos commented 2022-05-16 19:26:43 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
hirunda commented 2022-05-16 19:57:44 +00:00 (Migrated from gitlab.com)

Hi Kiran,

Please,

Run fc library test executable "./build/libraries/fc/tests/all_tests" and
observe CI/CD logs, and verify that rng test failure is not reported

Thanks,
Davor

Hi Kiran, Please, Run fc library test executable "./build/libraries/fc/tests/all_tests" and observe CI/CD logs, and verify that rng test failure is not reported Thanks, Davor
prandnum commented 2022-05-19 19:56:43 +00:00 (Migrated from gitlab.com)

no errors seen. logs attached. fc_tests.log

no errors seen. logs attached. [fc_tests.log](/uploads/413b696d92079a37756b912c5197d6ec/fc_tests.log)
prandnum (Migrated from gitlab.com) closed this issue 2022-05-19 19:56:44 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#349
No description provided.