[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread STINNER Victor
STINNER Victor added the comment: "Hmm. Why does os.urandom(), which should explicitly not block, use a blocking getrandom() function? This is quite unexpected on Linux." I modified os.getrandom() in the issue #22181 to use the new getrandom() syscall of Linux 3.17. The syscall blocks until th

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Wow, it's by design: " os.urandom(n) Return a string of n random bytes suitable for cryptographic use." ``man urandom'': "A read from the /dev/urandom device will not block waiting for more entropy. As a result, if there is not sufficient entrop

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread Stefan Krah
Stefan Krah added the comment: Hmm. Why does os.urandom(), which should explicitly not block, use a blocking getrandom() function? This is quite unexpected on Linux. -- nosy: +skrah ___ Python tracker ___

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +lemburg, matejcik, mmarkk, rhettinger, thomas-petazzoni ___ Python tracker ___ ___ Python-bugs-l

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread STINNER Victor
STINNER Victor added the comment: The issue #25420 has been closed as a duplicate of this issue. Copy of the latest message: msg264262 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2016-04-26 12:05 I still believe the underlying system API use should be f

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-26 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #25420 which is similar but specific to "import random". -- ___ Python tracker ___ __

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-24 Thread STINNER Victor
STINNER Victor added the comment: Python 3 uses os.urandom() at startup to randomize the hash function. os.urandom() now uses the new Linux getrandom() function which blocks until the Linux kernel is feeded with enough entropy. It's a deliberate choice. The workaround is simple: set the PYTHON

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-24 Thread Matthias Klose
Matthias Klose added the comment: other issues fixed between these dates: - Issue #26659: Make the builtin slice type support cycle collection. - Issue #26718: super.__init__ no longer leaks memory if called multiple times. NOTE: A direct call of super.__init__ is not endorsed!

[issue26839] python always calls getrandom() at start, causing long hang after boot

2016-04-24 Thread Matthias Klose
New submission from Matthias Klose: [forwarded from https://bugs.debian.org/822431] This regression / change of behaviour was seen between 20160330 and 20160417 on the 3.5 branch. The only check-in which could affect this is the fix for issue #26735. 3.5.1-11 = 20160330 3.5.1-12 = 20160417 M