apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Collins-Sussman <suss...@collab.net>
Subject apr_generate_random_bytes() blocks forever
Date Tue, 11 Mar 2003 22:31:32 GMT

 RedHat 7.2 machine, I just built the latest Subverison
0.19 sourceball:  I can't create a new repository now.  'svnadmin
create' just sits forever, waiting for /dev/random to decide it has
enough entropy.

This is because 'svnadmin create' is trying to generate a repository
UUID (apr_uuid_get()), which calls apr_generate_random_bytes(), which
is opening /dev/random on this box, which is blocking forever.

I haven't yet figured out why this particular libc is taking forever
to gather entropy -- but regardless, no spec is being violated.

Shouldn't apr_generate_random_bytes() being using /dev/urandom
instead?  According to thom, ./configure picks up 'random' before
'urandom', and substitutes whichever it finds first.  I think this is
a Bad Thing.  urandom should be preferred, no?

Sander says there was a long thread about this, about how people
wanted "strong random", but now we're stuck with a situation where
apr_uuid_get() can block indefinitely...   :-(

View raw message