Message256913
| 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円362円a=305円32円Z263円364円352円j223円0017円302円q361円M336円+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. |
|