I had never even known about /dev/random It is working now, but I think the final thing I will do is push the GUID creation onto the database server instead of doing it in python code. One less line of code I need to maintain.
This was one of the most difficult bugs I've had to deal with in a long time. Sometimes it is amazing the path that you traverse in debugging code. This bug had me looking at the pylons source, then looking at every packet that crossed the wire, and finally looking at python sources. I've learned a lot in the last few days, I'm going to eat ice cream now. Bryan On Mar 5, 3:13 pm, Matthew Zwier <[email protected]> wrote: > The 2.5 uuid module tries to use underlying system UUID libraries, so > the read from /dev/random may be in there instead of in the Python > code. Don't know what 2.6 does. Hmm...that's not very helpful. I > know just enough about the internals of Python to be dangerous :) > > MZ > > On Thu, Mar 5, 2009 at 4:31 PM, Bryan <[email protected]> wrote: > > > I think you are correct. I restarted the server and the problems came > > back. In my SQLAlchemy setup I use uuid.uuid1(). When I changed this > > to use uuid4() the problems went away. > > > I don't have the sources for python 2.5 (what the server runs), but in > > 2.6 uuid1 sometimes uses the random module, which accesses random > > generators at the os level. The thing is, in 2.6 the random module > > uses urandom, so there should not be a problem. Perhaps in 2.5 the > > random module uses the /dev/random file? > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
