GIT head: tests/random drains entropy, never finishes

Andreas Metzler ametzler at bebt.de
Sat Feb 20 13:09:09 CET 2016


Hello,

starting with 934ba2a (random: Add a test case for DRBG_REINIT.) the
testsuite takes so long that I have not yet managed to wait it to
finish.

The hanging test is tests/random at
./tests/random --in-recursion --verbose --debug --prefer-fips-rng
Stracing the process shows
25075 write(2, "checking DRBG_REINIT\n", 21) = 21
25075 open("/dev/random", O_RDONLY)     = 3
25075 fcntl(3, F_GETFD)                 = 0
25075 fcntl(3, F_SETFD, FD_CLOEXEC)     = 0
25075 select(4, [3], NULL, NULL, {0, 100000}) = 1 (in [3], left {0, 99996})
25075 read(3, "\320\0\273\266\3\26\306{\352\246s\35J\34\3\260\v\343\354id%\30\337\364\222\226", 36) = 27
25075 select(4, [3], NULL, NULL, {0, 100000}) = 1 (in [3], left {0, 99998})
25075 read(3, "\257\361d\231=\16", 9)   = 6
25075 select(4, [3], NULL, NULL, {0, 100000}) = 1 (in [3], left {0, 99998})
25075 read(3, "\272\370\347", 3)        = 3
25075 getpid()                          = 25075
25075 select(4, [3], NULL, NULL, {0, 100000}) = 1 (in [3], left {0, 99998})
25075 read(3, "\352 \267\\\330T\342\357\271bFC", 36) = 12
25075 select(4, [3], NULL, NULL, {0, 100000}) = 0 (Timeout)
25075 select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
25075 select(4, [3], NULL, NULL, {3, 0}) = 1 (in [3], left {1, 361342})
25075 read(3, "D\213\264\255]}", 24)    = 6
25075 select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
25075 select(4, [3], NULL, NULL, {3, 0}) = 1 (in [3], left {1, 468072})
25075 read(3, "z\3641\314y\21", 18)     = 6
and it continues like that.

/proc/sys/kernel/random/entropy_avail shows that entropy is drained.

cu Andreas

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'




More information about the Gcrypt-devel mailing list