Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547626 - dev-lang/python-3.3 / 3.4 test_faulthandler hangs with GCC 5.1
Summary: dev-lang/python-3.3 / 3.4 test_faulthandler hangs with GCC 5.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL: http://bugs.python.org/issue23433
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-5
  Show dependency tree
 
Reported: 2015-04-25 00:24 UTC by Ryan Hill (RETIRED)
Modified: 2015-10-02 13:56 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2015-04-25 00:24:34 UTC
test_faulthandler hangs at 100% CPU, gave it 18 hours before cancelling.

 6642 pts/2    S+     0:00 /var/tmp/portage/dev-lang/python-3.3.5-r1/work/x86_64-pc-linux-gnu/python -bb -R -E -Wdefault -Werror::BytesWarning -m test.regrtest --slaveargs [["test_faulthandler", 0, false], {"debug": false, "use_resources": [], "failfast": false, "huntrleaks": false, "match_tests": null, "timeout": null, "output_on_failure": false}]

10535 pts/2    R+    18:03 /var/tmp/portage/dev-lang/python-3.3.5-r1/work/x86_64-pc-linux-gnu/python -E -c import faulthandler faulthandler.enable() faulthandler._stack_overflow()


I see this new warning during the build:

x86_64-pc-linux-gnu-gcc -pthread -Wno-unused-result -DNDEBUG  -O2 -march=native -pipe -fwrapv    -I. -IInclude -I/var/tmp/portage/dev-lang/python-3.3.5-r1/work/Python-3.3.5/Include   -fPIC -DPy_BUILD_CORE  -c /var/tmp/portage/dev-lang/python-3.3.5-r1/work/Python-3.3.5/Modules/faulthandler.c -o Modules/faulthandler.o

../Python-3.3.5/Modules/faulthandler.c: In function 'stack_overflow':
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
../Python-3.3.5/Modules/faulthandler.c:903:19: note: declared here
     unsigned char buffer[4096];


which led me to this commit:
https://hg.python.org/cpython/rev/689092296ad3

Bug:
http://bugs.python.org/issue23433
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2015-04-25 00:31:20 UTC
Note as the bug mentions this will also manifest at runtime as python segfaults.
Comment 2 Manfred Knick 2015-09-25 14:34:58 UTC
"... fixed ..." upstream :

http://bugs.python.org/issue23433#msg235745
Comment 3 SpanKY gentoo-dev 2015-10-02 13:56:54 UTC
(In reply to Ryan Hill from comment #1)

this code only seems to apply to tests.  the fix is in the python-3.5.0 release and the 3.4 branch (i guess they didn't bother putting it in the 3.3 branch).

i've added the 3.4 patch to the 3.4/3.3 ebuilds:
http://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd3586765e47208668f27f707ec7f6d06b5d92a8