Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 561894 - Emerge with python2.7 segmentation fault
Summary: Emerge with python2.7 segmentation fault
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-30 09:46 UTC by Ondřej Guth
Modified: 2015-10-02 09:14 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info '=app-portage/layman-2.3.0::gentoo' (info,6.35 KB, text/plain)
2015-09-30 09:46 UTC, Ondřej Guth
Details
emerge -pqv '=app-portage/layman-2.3.0::gentoo' (pbuild,206 bytes, text/plain)
2015-09-30 09:47 UTC, Ondřej Guth
Details
environment (environment,159.46 KB, text/plain)
2015-09-30 09:51 UTC, Ondřej Guth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondřej Guth 2015-09-30 09:46:23 UTC
Created attachment 413338 [details]
emerge --info '=app-portage/layman-2.3.0::gentoo'

When trying to emerge some particular ebuilds (e.g., app-portage/layman or dev-python/pip-7.1.2), emerge fails with segmentation fault. More info follows.
Comment 1 Ondřej Guth 2015-09-30 09:47:40 UTC
Created attachment 413340 [details]
emerge -pqv '=app-portage/layman-2.3.0::gentoo'
Comment 2 Ondřej Guth 2015-09-30 09:51:13 UTC
 * Package:    app-portage/layman-2.3.0
 * Repository: gentoo
 * Maintainer: dolsen@gentoo.org twitch153@gentoo.org,tools-portage@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc git kernel_linux python_targets_python2_7 python_targets_python3_4 sync-plugin-portage userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking layman-2.3.0.tar.gz to /var/tmp/portage/app-portage/layman-2.3.0/work
>>> Source unpacked in /var/tmp/portage/app-portage/layman-2.3.0/work
>>> Preparing source in /var/tmp/portage/app-portage/layman-2.3.0/work/layman-2.3.0 ...
/usr/bin/python2.7 setup.py setup_plugins
/var/tmp/portage/app-portage/layman-2.3.0/temp/environment: line 1636: 15161 Segmentation fault      "${@}"
 * ERROR: app-portage/layman-2.3.0::gentoo failed (prepare phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line   90:  Called src_prepare
 *   environment, line 4306:  Called distutils-r1_src_prepare
 *   environment, line 1183:  Called python_prepare_all
 *   environment, line 4040:  Called esetup.py 'setup_plugins'
 *   environment, line 1640:  Called die
 * The specific snippet of code:
 *       "${@}" || die
 * 
 * If you need support, post the output of `emerge --info '=app-portage/layman-2.3.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-portage/layman-2.3.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-portage/layman-2.3.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-portage/layman-2.3.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-portage/layman-2.3.0/work/layman-2.3.0'
 * S: '/var/tmp/portage/app-portage/layman-2.3.0/work/layman-2.3.0'
Comment 3 Ondřej Guth 2015-09-30 09:51:48 UTC
Created attachment 413342 [details]
environment
Comment 4 Ondřej Guth 2015-09-30 09:53:45 UTC
This is logged when the error occurrs:
segfault at c ip 000003399a7236d1 sp 00000392335393a0 error 6 in libffi.so.6.0.4[3399a71d000+8000]
kernel: grsec: Segmentation fault occurred at 000000000000000c in /usr/lib64/python-exec/python2.7/emerge[emerge:21466] uid/euid:0/0 gid/egid:0/0, parent
Comment 5 Francisco Blas Izquierdo Riera (RETIRED) gentoo-dev 2015-09-30 18:10:38 UTC
Did you enable EMUTRAMP and pax markings (XATTRS or PT based according to your own preference).

You need to enable them in your kernel. You also need to set the PAX_MARKINGS variable accordingly (XT and/or PT).

Finally keep in mind that if markings missmatch you are bound for a world of pain, that you can set paxmarks on python manually if you missed them during your install to unbreak your system and that you can try disabling MPROTECT as a stop gap measure if the first option doesn't work).
Comment 6 Ondřej Guth 2015-10-02 09:14:54 UTC
I see, my mistake, enabling EMUTRAMP in kernel solves the problem. Thanks very much!!