apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apr_uuid_get() hanging on /dev/random
Date Sun, 07 Mar 2004 20:00:47 GMT
Justin Erenkrantz wrote:
> --On Saturday, March 6, 2004 3:34 PM -0800 Stas Bekman <stas@stason.org> 
> wrote:
> 
>> We get reports from users that have troubles with apr_uuid_get. It blocks
>> trying to read from /dev/random and never comes back (I suppose not 
>> enough
>> entropy). No matter what the reason for this behavior, users come back 
>> to us
>> complaining that our app doesn't work. Any suggestions how to make
>> apr_uuid_get fail if /dev/random doesn't give back anything after a 
>> certain
>> amount of time? Should apr_uuid_get/apr_os_uuid_get have a timeout + 
>> assert
>> or failure code return?
>>
>> The very recent report came from a linux user on kernel 2.4.20
>> linux canebas.org 2.4.20 #1 smp mon dec 2 10:47:41 pst 2002
>> i686 athlon i386 gnulinux
> 
> 
> Tell them to use --with-devrandom=/dev/urandom - however, that can't be 
> our default as that's not secure.  Or, they can setup EGD and use 
> --with-egd.

Thanks Justin. But "tell them" is not a good solution. We don't want to get a 
bug report from every user who has this problem (and this is not a first time 
we get it). mod_perl uses this call at the server startup, so any user with 
this issue will get the problem. Any suggestions for workarounds so that the 
application will suggest that solution on its own?

 > The real solution is getting Ben's PRNG in-tree.  However, we've decide
 > to defer that until APR 1.1.  -- justin

Yeah, but that won't be in the apache 2.0.x tree.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message