[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Problems with /dev/random

From: Pete Gonzalez <pgonzalez_at_bluel.com>
Date: 2005-02-14 12:06:56 CET

We recently encountered a problem where svnserve was hanging
in the random number generator. (Apparently someone else
encountered this problem and logged it as Debian Bug#285708.)

The culprit was a Linux daemon that reads from "/dev/urandom"
frequently. Although "/dev/urandom" returns immediately, it
depletes the kernel entropy pool, causing "/dev/random" reads
to stall indefinitely. I solved the problem by hacking the
Subversion apr_private.h DEV_RANDOM to read from "/dev/urandom"
instead of "/dev/random".

Since this problem took several hours to figure out, I'd like
to propose a few potential improvements:

1. Document this somewhere conspicuous

2. Make the default "/dev/urandom" (or a pseudorandom generator)
    instead of "/dev/random".

3. Add a "configure" switch enabling admins to specify whether
    or not they want to make everyone wait for the kernel to
    generate random numbers. (In our scenario, this is ridiculous.)

Cheers,
-Pete

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 14 12:09:57 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.