Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 635620

Summary: dev-lang/python:3.4 Fatal Python error: getentropy() failed
Product: Gentoo Linux Reporter: Sven E. <dark>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://hg.python.org/cpython/rev/13a39142c047
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: python-3.4.5 build.log
python-3.4.6 build.log
emerge --info

Description Sven E. 2017-10-27 20:08:05 UTC
dev-lang/python-3.4.x fails to build with:

Fatal Python error: getentropy() failed
/bin/sh: line 5: 25388 Segmentation fault      LD_LIBRARY_PATH=/var/tmp/portage/dev-lang/python-3.4.5/work/x86_64-pc-linux-gnu ./python -E -S -m sysconfig --generate-posix-vars
generate-posix-vars failed
make: *** [Makefile:570: pybuilddir.txt] Error 1

The Segfault ist reproduceable.

Reproducible: Always

Steps to Reproduce:
1. emerge python-3.4.x

Actual Results:  
Build failure with Segfault

Expected Results:  
Clean build
Comment 1 Sven E. 2017-10-27 20:11:07 UTC
Created attachment 500462 [details]
python-3.4.5 build.log
Comment 2 Sven E. 2017-10-27 20:15:43 UTC
Created attachment 500464 [details]
python-3.4.6 build.log
Comment 3 Sven E. 2017-10-27 20:18:38 UTC
Created attachment 500466 [details]
emerge --info
Comment 4 Mike Gilbert gentoo-dev 2017-10-30 20:36:07 UTC
Comment on attachment 500466 [details]
emerge --info

Please try to set the correct MIME type if you are going to attach emerge --info.
Comment 5 Mike Gilbert gentoo-dev 2017-10-30 20:47:00 UTC
The issue here is the automagic use of the getentropy() function in glibc-2.25, which relies on the getrandom() system call introduced in Linux 3.17.

You can work around this by upgrading to Linux >= 3.17, or Python >= 3.5.4.
Comment 6 Sven E. 2017-11-07 13:44:35 UTC
(In reply to Mike Gilbert from comment #5)
> The issue here is the automagic use of the getentropy() function in
> glibc-2.25, which relies on the getrandom() system call introduced in Linux
> 3.17.
> 
> You can work around this by upgrading to Linux >= 3.17, or Python >= 3.5.4.

Actually upgrading to the most recent 3.10 kernel did the trick aswell. Still just a workaround, but better than no build at all.

Weird thing is, this seems to be fixed in 3.6, I wonder why it did not get backported by upstream.
Comment 7 Mike Gilbert gentoo-dev 2017-11-07 15:43:43 UTC
> Actually upgrading to the most recent 3.10 kernel did the trick aswell. Still just a workaround, but better than no build at all.

That probably did nothing. I backported a build fix on November 1.

*** This bug has been marked as a duplicate of bug 635534 ***