Comment 0 for bug 1891403

Revision history for this message
Balint Reczey (rbalint) wrote : glibc tests needs more entropy causing tst-getrandom failures

[Impact]

 * Builds and autpkgtests frequently fail due to failing tst-getrandom probably due to insufficient source of entropy on Launchpad. This causes extra work by requiring retriggering failing builds and autopkgtests.

[Test Case]

* Observe tst-getrandom tests being marked XFAIL in build logs.

[Regression Potential]

* The fix does not change run-time behaviour of glibc, just ignores a test. This lets potential breakages in getrandom()'s implementation or in kernel's random source being undetected, but the test results can still be observed in the logs if needed and the random implementation is also most likely exercised in other tests, too.

[Other Info]

The issue can be reproduced locally in a built glibc package tree without haveged or any other good entropy source installed:

rbalint@gaia:~/projects/deb/build-area/glibc-2.31$ for i in $(seq 1000); do ./build-tree/amd64-libc/stdlib/tst-getrandom; done
Timed out: killed the child process
Termination time: 2020-08-12T21:05:28.234517252
Last write to standard output: 2020-08-12T21:05:04.069616637
Timed out: killed the child process
Termination time: 2020-08-12T21:05:48.337084141
Last write to standard output: 2020-08-12T21:05:28.069616637
Timed out: killed the child process
Termination time: 2020-08-12T21:06:08.439695563
Last write to standard output: 2020-08-12T21:05:48.069616637
Timed out: killed the child process
Termination time: 2020-08-12T21:06:28.542962616
Last write to standard output: 2020-08-12T21:06:08.069616637
Timed out: killed the child process
...

With haveged installed the tests pass quickly and without error:

rbalint@gaia:~/projects/deb/build-area/glibc-2.31$ for i in $(seq 1000); do ./build-tree/amd64-libc/stdlib/tst-getrandom; done
rbalint@gaia:~/projects/deb/build-area/glibc-2.31$