Bug 1410187

Summary: python3.5 fails to start on a old kernel with Fatal Python error: getentropy() failed
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: python35Assignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: kdudka, mhroncok, python-sig
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python35-3.5.2-6.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-06 23:57:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1410175    
Bug Blocks:    

Description Lukas Slebodnik 2017-01-04 17:16:53 UTC
Description of problem:
You need to test with old kernel which does not support syscall getentropy
and with rawhide user space. You can use either mock or docker with privileged fedora rawhide container

Version-Release number of selected component (if applicable):
sh# rpm -q python35 glibc
python35-3.5.2-5.fc26.x86_64
glibc-2.24.90-26.fc26.x86_64

sh# uname -a
Linux a38d216e5b76 3.10.0-534.el7.x86_64 #1 SMP Fri Dec 16 08:30:57 EST 2016 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
Deterministic

Steps to Reproduce:
1. Boot a RHEL-7 system.

2. Install EPEL-7 repositories:
# yum install -y https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm

3. Install mock:
# yum install -y mock

4. Setup a user for running mock
# useradd -G mock mockuser
# su - mockuser

5. Install python3 into a Fedora Rawhide mock root:
$ mock -r fedora-rawhide-x86_64 --install python35

6. Attempt to start python3:
$ mock -r fedora-rawhide-x86_64 --shell python35

Actual results:
sh# python3.5
Fatal Python error: getentropy() failed
Aborted (core dumped)

Expected results:
#python shell is started
Python 3.5.2 (default, Jan  1 2017, 14:15:22) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Additional info:
Workaround is to set env PYTHONHASHSEED
sh# PYTHONHASHSEED=1234 python3.5
Python 3.5.2 (default, Jan  1 2017, 14:15:22) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Comment 1 Lukas Slebodnik 2017-01-04 17:18:13 UTC
python 3.4.5 and 3.3.6 works well in such case. They probably do not use getentropy

Comment 2 Miro Hrončok 2017-01-04 17:26:55 UTC
Thanks for the report. Let's see how bz1410175 will solve this first.

Comment 3 Lukas Slebodnik 2017-01-04 17:44:42 UTC
(In reply to Miro Hrončok from comment #2)
> Thanks for the report. Let's see how bz1410175 will solve this first.
and see my explanation why it is not a problem in fedora 25 userspace
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/message/A53R4HIQZNBXZ4MQYA5V7MOK3SDNVVQP/