lp test startup exhausts dev/random
Bug #662519 reported by
Robert Collins
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
I was investigating slow test startup and found the test process blocked on /dev/random.
lsof showed me this, which is a hint:
/usr/bin/ 24780 robertc 10r REG 252,1 3032 170190 /home/robertc/
/usr/bin/ 24780 robertc 11r CHR 1,8 0t0 971 /dev/random
That file uses random unconditionally; I don't know if we do/don't need crypto level randomness here in prod but we certainly don't for testing. Changing that to urandom saved 100 seconds from a parallel testrun of just a few tests.
To post a comment you must log in.
For my own notes, I suppose: The use of /dev/random is done once for seeding a module global, so dnspython is not using it indiscriminately. That said, if there's not enough entropy, there's not enough entropy. A way to switch the module to urandom (or just time, even) for tests would be nice.