Message310162
> I'm playing with Gentoo in LXC running on ARM-based QNAP NAS, and when trying to compile Python 3.5.4, the build failed with "Fatal Python error: failed to get random numbers to initialize Python" (full details at https://forums.gentoo.org/viewtopic-p-8172124.html ).
I'm surprised. Python 3.5.4 does contain my latest fix: commit 035ba5da3e53e45c712b39fe1f6fb743e697c032 (bpo-29157).
> Looking at random.c, pyurandom returns -1 instead of falling back to dev_urandom when py_getrandom returns -1, so the attached fix is simple.
Ignoring failures is not a good idea.
What is the result of the getrandom() function?
> glibc in the environment is 2.25 (supports getrandom), while kernel is 3.10 (doesn't support getrandom).
I expect n < 0 with errno = ENOSYS: py_getrandom() should return 0 in this case, not -1. |
|
Date |
User |
Action |
Args |
2018-01-17 13:40:05 | vstinner | set | recipients:
+ vstinner, jernejs |
2018-01-17 13:40:05 | vstinner | set | messageid: <1516196405.16.0.467229070634.issue32580@psf.upfronthosting.co.za> |
2018-01-17 13:40:05 | vstinner | link | issue32580 messages |
2018-01-17 13:40:05 | vstinner | create | |
|