Author thomas-petazzoni
Recipients lemburg, matejcik, rhettinger, socketpair, thomas-petazzoni, vstinner
Date 2015-12-23.15:02:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450882943.24.0.63379541992.issue25420@psf.upfronthosting.co.za>
In-reply-to
Content
I can confirm that I'm affected by the same issue. Booting a simple Linux system on a Qemu ARM platform, the python startup hangs during 25 seconds due to the call to getrandom(). I am not doing anything with Python, just starting the Python interpreter:

# strace -t -o strace.log python
random: nonblocking pool is initialized
Python 3.5.0 (default, Dec 23 2015, 15:11:18) 
[GCC 5.1.1 20150608] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>  
# grep -A 2 getrandom strace.log 
14:43:50 getrandom("\245\362a=\305\32Z\263\364\352j\223\0017\302q\361M\336+\2722>[", 24, 0) = 24
14:44:35 ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
14:44:35 mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x76baf000

As you can see, 25 seconds blocked due to the getrandom() system call. Makes the Python interpreter not really usable anymore. I would understand if Python would do when I need to generate cryptographically secure random numbers. But at this point, I am just starting the interpreter, nothing else.

This is a regression from Python 3.4.3.
History
Date User Action Args
2015-12-23 15:02:23thomas-petazzonisetrecipients: + thomas-petazzoni, lemburg, rhettinger, vstinner, matejcik, socketpair
2015-12-23 15:02:23thomas-petazzonisetmessageid: <1450882943.24.0.63379541992.issue25420@psf.upfronthosting.co.za>
2015-12-23 15:02:23thomas-petazzonilinkissue25420 messages
2015-12-23 15:02:22thomas-petazzonicreate