Comment 11 for bug 607117

Revision history for this message
Orticio Jlgtgutisu (jlgutisu3) wrote : RE: [Bug 607117] Re: dnspython-1.7* uses /dev/random which might block on lucid

Perdón, NO entiendo nada del idioma INGLES y por ésta causa no sé de que va este correo, lo siento mucho.

> Date: Tue, 25 Jan 2011 10:12:35 +0000
> From: <email address hidden>
> To: <email address hidden>
> Subject: [Bug 607117] Re: dnspython-1.7* uses /dev/random which might block on lucid
>
> The patch works for me, tested on two different lucid machines.
>
> greetings, Mati
>
> --
> You received this bug notification because you are subscribed to Ubuntu
> ubuntu-10.04.2.
> https://bugs.launchpad.net/bugs/607117
>
> Title:
> dnspython-1.7* uses /dev/random which might block on lucid
>
> Status in The Trac Project:
> New
> Status in “dnspython” package in Ubuntu:
> Fix Released
> Status in “dnspython” source package in Lucid:
> Fix Committed
>
> Bug description:
> The python-dnspython package (most specifically, dns/resolver.py at
> line 25-29) uses /dev/random to get random data. I observed that this
> blocks on /some/ machines that have Ubuntu 10.04 installed. It does
> not seem to happen on older versions. This causes the import of
> dns.entropy to block most of the time (but not always).
>
> The solution is to use /dev/urandom instead. Two possible ways to solve this problem:
> 1. Provide a 1.8.0 package in the main repositories - it seems to have the bug fixed and is a maintenance release according to the homepage
> 2. replace '/dev/random' with '/dev/urandom' in entropy.py, line 25. I tested this solution and it no longer causes the import to block.
>
> TEST CASE:
>
> It seems as if the problem does not occur on *all*, but only *most*
> systems running lucid - presumably systems with not to much entropy,
> like servers. On affected systems, the command
>
> python -c "from dns import entropy"
>
> hangs. After applying the above patch, the system no longer hangs.
>
>