New submission from iwings:

On QNAP's Linux Station (lxc based virtual environment), getrandom() syscall 
returns EPERM not ENOSYS when it's not available.

(HOST) uname -a
Linux ******-NAS 3.12.6 #1 SMP Thu Sep 1 00:57:44 CST 2016 x86_64 unknown

(HOST) /lib64/libc-2.19.so
GNU C Library (Ubuntu EGLIBC 2.19-0ubuntu6.6) stable release version 2.19, by 
Roland McGrath et al.

(LXC) uname -a
Linux ubuntu_1604 3.12.6 #1 SMP Thu Sep 1 00:57:44 CST 2016 x86_64 x86_64 
x86_64 GNU/Linux

(LXC) /lib/x86_64-linux-gnu/libc.so.6
GNU C Library (Ubuntu GLIBC 2.23-0ubuntu3) stable release version 2.23, by 
Roland McGrath et al.

(LXC)
long n = syscall(SYS_getrandom, buffer, sizeof(buffer), flags);
printf("SYS_getrandom: %ld (%d)\n", n, errno);
=> 
SYS_getrandom: -1 (1)

Proper fall back to /dev/urandom is not happening in this case, so most python 
app calling getrandom function fails. This includes apt, command-not-found etc.

----------
files: random.diff
keywords: patch
messages: 274399
nosy: iwings
priority: normal
severity: normal
status: open
title: getrandom() syscall returning EPERM make the system unusable.
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44371/random.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27955>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to