Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1818857
Summary: | Build python-debug with -O0 to avoid test_gdb failures | |||
---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Charalampos Stratakis <cstratak> | |
Component: | python3.9 | Assignee: | Charalampos Stratakis <cstratak> | |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | low | |||
Version: | rawhide | CC: | cstratak, dmalcolm, m.cyprian, mhroncok, pviktori, python-sig, rkuska, shcherbina.iryna, slavek.kabrda, thrnciar, tomspur, torsava, vstinner | |
Target Milestone: | --- | Keywords: | FutureFeature, Reopened | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1926283 (view as bug list) | Environment: | ||
Last Closed: | 2021-01-29 13:53:09 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: | ||||
Bug Blocks: | 245418, 1926283 |
Description
Charalampos Stratakis
2020-03-30 14:44:24 UTC
I validated with success that backporting my https://bugs.python.org/issue40019 change to 3.8 fix test_gdb on s390x and armv7hl. See my PR https://src.fedoraproject.org/rpms/python3/pull-request/182 created to test that. I backported my fix upstream from master to Python 3.7 and 3.8: https://bugs.python.org/issue40019. This change only fix test_gdb. To get a fully working python-gdb.py, IMHO the best is to disable all compiler optimization using -O0 optimization level. We need to not skip the test in the SPEC Python 3.8.3 has my fix https://github.com/python/cpython/commit/4ced9a7611ddfd923bd8f72aa61121d0e5aeb8fc We can try to reenable test_gdb python3.9 package, and maybe also python 3.8 package. I created https://src.fedoraproject.org/rpms/python3.8/pull-request/1 to reenable test_gdb in python3.8. Let's see how it goes in CIs. Let's build debug with -O0. *** Bug 1846390 has been marked as a duplicate of this bug. *** FYI I modified test_gdb to skip it on gdb 9.2 and newer to work around a gdb issue: * https://bugs.python.org/issue41473 * https://bugzilla.redhat.com/show_bug.cgi?id=1866884 "AArch64: sometimes, gdb fails to load symbols of a dynamic library with a pending breakpoint" Fedora Rawhide is affected by the gdb issue. This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle. Changing version to 33. So if we simply change -Og with -O0, we get warnings like this: In file included from /usr/include/bits/libc-header-start.h:33, from /usr/include/limits.h:26, from /usr/lib/gcc/x86_64-redhat-linux/10/include/limits.h:195, from /usr/lib/gcc/x86_64-redhat-linux/10/include/syslimits.h:7, from /usr/lib/gcc/x86_64-redhat-linux/10/include/limits.h:34, from /builddir/build/BUILD/Python-3.9.0rc1/Include/Python.h:11, from /builddir/build/BUILD/Python-3.9.0rc1/Programs/_freeze_importlib.c:5: /usr/include/features.h:397:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp] 397 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) | ^~~~~~~ If we add -Wp,-D_FORTIFY_SOURCE=0, we have warnings like this: <command-line>: warning: "_FORTIFY_SOURCE" redefined <command-line>: note: this is the location of the previous definition <command-line>: warning: "_FORTIFY_SOURCE" redefined <command-line>: note: this is the location of the previous definition <command-line>: warning: "_FORTIFY_SOURCE" redefined <command-line>: note: this is the location of the previous definition More over, even if we replace the FORTIFY_SOURCE value with some sed magic, annobin warns as well: annobin: /builddir/build/BUILD/Python-3.9.0rc1/Programs/_freeze_importlib.c: Warning: -D_FORTIFY_SOURCE defined as 0 I suppose we will always get a warning of some sort anyway, one way it to use -Wno-cpp with the debug build. WDYT? > More over, even if we replace the FORTIFY_SOURCE value with some sed magic, annobin warns as well: (...)
Is it possible to tell annobin to ignore -D_FORTIFY_SOURCE?
I don't know. test_gdb is skipped upstream. Compiling with -Og doesn't fix it even in versions where it isn't skipped. Restoring test_gdb should be done upstream before we do this. https://bugzilla.redhat.com/show_bug.cgi?id=1866884 has been fixed (gdb 10.1). I reenabled test_gdb on gdb 9.2+ on Python upstream: https://github.com/python/cpython/commit/066394018a8463643cc63d933493f0afa99d72cc I move the issue statuc back to NEW even if there is a (closed) PR: https://src.fedoraproject.org/rpms/python3.9/pull-request/30 Woooot, thanks, that's a major enhancement to make gdb usable on python3.9-debug! No make "optimized out" issue which prevent to inspect anything ;-) |