lp test startup exhausts dev/random

Bug #662519 reported by Robert Collins
6
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/launchpad/lp-sourcedeps/eggs/dnspython-1.7.1-py2.6.egg/dns/entropy.py
/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.

Revision history for this message
Gary Poster (gary) wrote :

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.

Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 662519] Re: lp test startup exhausts dev/random

On Tue, Oct 19, 2010 at 5:25 AM, Gary Poster <email address hidden> wrote:
> 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.

Does it do this in production? If so we should start recording how
long it takes - its possible (have done it before) to exhaust
dev/random on production, and *then* things really get hairy. Remember
we're looking at 16-32 instances starting up in very short order in
the branch new world.

-Rob

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.