[issue26839] Python 3.5 running on Linux kernel 3.17+ can block at startup or on importing the random module on getrandom()

Colm Buckley report at bugs.python.org
Tue Jun 7 11:10:54 EDT 2016


Colm Buckley added the comment:

Christian -

Please note: this is *not* just a VM/cloud issue. This is observed on physical standalone systems.

The issue (on Debian) is that the Python script xxxx is called very early in the boot process; in particular before most hardware initialization is done. As there are yet no network or USB devices configured, there is no entropy pool to speak of. We observe that getrandom() blocks apparently indefinitely under these circumstances (even though this script has no requirement for random data apart from the hash secret).

My final suggestion is that we return to using a command-line flag to indicate our preferences regarding hash seed initialization; although reverse the sense compared to the -R flag in 3.2.3 (ie: default is to use strong initialization, but allow the user to over-ride just as though PYTHONHASHSEED were set in the environment.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26839>
_______________________________________


More information about the Python-bugs-list mailing list