Bug 140532
Summary: | PPC CFI and non-CFI backtraces broken | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 4 | Reporter: | Andrew Cagney <cagney> |
Component: | gdb | Assignee: | Jan Kratochvil <jan.kratochvil> |
Status: | CLOSED ERRATA | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 4.0 | CC: | cagney, ddomingo, dwmw2, ezannoni, jan.kratochvil, jjohnstn |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | powerpc | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | RHBA-2007-0811 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2007-11-15 16:11:28 UTC | Type: | --- |
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: | 129331, 213784 | ||
Bug Blocks: | 169570, 238333, 248673, 338231, 391231 | ||
Attachments: |
Description
Andrew Cagney
2004-11-23 14:52:12 UTC
attach to random program (eg gdm-binary) dwmw2_gone (gdb) bt dwmw2_gone #0 0x07632f68 in __read_nocancel () from /lib/tls/libc.so.6 dwmw2_gone #1 0x08026990 in gdm_fdgetc () from /usr/bin/gdm-binary dwmw2_gone #2 0x0801c930 in gdm_slave_greeter_ctl () from /usr/bin/gdm-binary dwmw2_gone #3 0x0801c930 in gdm_slave_greeter_ctl () from /usr/bin/gdm-binary dwmw2_gone #4 0x0801c930 in gdm_slave_greeter_ctl () from /usr/bin/gdm-binary dwmw2_gone ... dwmw2_gone #18 0x0801c930 in gdm_slave_greeter_ctl () from /usr/bin/gdm-binary dwmw2_gone Previous frame inner to this frame (corrupt stack?) dwmw2_gone revert to FC2 gdb again dwmw2_gone (gdb) bt dwmw2_gone #0 0x07632f68 in __read_nocancel () from /lib/tls/libc.so.6 dwmw2_gone #1 0x08026990 in gdm_fdgetc () from /usr/bin/gdm-binary dwmw2_gone #2 0x0801c930 in gdm_slave_greeter_ctl () from /usr/bin/gdm-binary dwmw2_gone #3 0x0802fca4 in gdm_verify_select_user () from /usr/bin/gdm-binary dwmw2_gone #4 0x07fda288 in pam_get_user () from /lib/libpam.so.0 dwmw2_gone #5 0x071a8c4c in pam_sm_authenticate () dwmw2_gone from /lib/security/../../lib/security/pam_unix.so dwmw2_gone #6 0x07fdb730 in _pam_dispatch () from /lib/libpam.so.0 dwmw2_gone #7 0x07253878 in ?? () from /lib/security/pam_stack.so Created attachment 144612 [details]
non-PIC unwinding fix
Those repeating poll(2)s could be fixed (a bit) by installing *-debuginfo.
OTOH this patch should fix the unwinding even without *-debuginfo (non-CFI
way).
Still not committed to RawHide as failing to test for regressions (build system
shows regressions but I do not believe them, tooma.toronto.redhat.com died,
RHTS refuses to install any ppc recent OS).
Created attachment 144613 [details]
Existing `gdb-6.3-ppccfi-20041104.patch' difference.
Update for existing PPC CFI enabler to make it compatible with recent GCC.
Questions:
(1) Why is GCC using bogus "Return Address: 65" if the appropriate (while not
strictly valid as PPC DWARF does not have PC register number) register
would
be 108 (LR=Link Register).
(2) Why GDB before did not properly map CR (64) and FPSCR (65) registers if
their numbers had to be known that time?
TO be posted upstream after I test the patches validity.
Still not committed to RawHide as failing to test for regressions (build system
shows regressions but I do not believe them, tooma.toronto.redhat.com died,
RHTS refuses to install any ppc recent OS).
Committed at least the nonproblematic non-CFI part to RawHide now (no testcase): * Fri Jan 12 2007 Jan Kratochvil <jan.kratochvil> - 6.5-25 - Fix unwinding of non-CFI (w/o debuginfo) PPC code by recent GCC (BZ 140532). Also some SUSE .eh_frame PPC renumbering patches (the real one so far not accepted): http://sourceware.org/ml/gdb-patches/2006-05/msg00165.html http://sourceware.org/ml/gdb-patches/2006-05/msg00166.html Comment on attachment 144613 [details]
Existing `gdb-6.3-ppccfi-20041104.patch' difference.
Dropped this patch incl. its original as following more the SUSE/Andreas
Schwab's way.
Created attachment 145505 [details]
Andreas Schwab's original imported PPC .eh_frame support patch.
Created attachment 145506 [details]
Patch workarounding GCC's broken .debug_frame CIE return address + fixing/completing DWARF registers mapping.
Created attachment 145513 [details]
Overall PPC-targeted PPC-nonspecific testcase.
Committed to RawHide: * Fri Jan 13 2007 Jan Kratochvil <jan.kratochvil> - 6.5-26 - Fix unwinding of non-debug (.eh_frame) PPC code, Andreas Schwab (BZ 140532). - Fix unwinding of debug (.debug_frame) PPC code, workaround GCC (BZ 140532). Posted upstream: http://sources.redhat.com/ml/gdb-patches/2007-01/msg00327.html Just KFAILed the false FAILs of `bt-ppc' testcase on x86_64: * Mon Feb 5 2007 Jan Kratochvil <jan.kratochvil> - 6.6-3 - Testcase of unwinding has now marked its unsolvable cases (for BZ 140532). ++ # We get correct unwind but with two excessive "??" entries ++ # due to undetectable inserted alignment entry. ++ # With -fa-u-t we have correct FDE, without -O2 we have frame pointer. ++ # 1 0x0000003acb631980 in abort () from /lib64/libc.so.6 ++ # 2 0x0000000000400489 in func0 () ++ # 3 0x00000000004004d0 in ?? () ++ # 4 0x0000000000400499 in func1 () ++ # 5 0x00007fffc5442410 in ?? () ++ # 6 0x00000000004004b9 in main () This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. Testcase? Removal of existing patch that worked around PPC's botched return-address column? Fix and testcaes available; final approval is still dependent on available QE slot. Created attachment 230151 [details] Another backport part This patch backports another part of the PPC backtrace/prologue code, built at: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1011017 It fixed the gdb.pie/break.exp regression at: http://errata.devel.redhat.com/errata/show/6150#c14 but it has probably other regressions: --- tests/gdb-6.3.0.0-1.153.el4.ppc.sum 2007-10-17 20:18:15.801823000 +0200 +++ tests/gdb-1011017-ppc.sum 2007-10-17 20:18:19.123503000 +0200 -PASS: gdb.base/break.exp: breakpoint small function, optimized file +FAIL: gdb.base/break.exp: breakpoint small function, optimized file -PASS: gdb.base/break.exp: run until breakpoint set at small function, optimized file +FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file -FAIL: gdb.pie/break.exp: breakpoint function, optimized file +PASS: gdb.pie/break.exp: breakpoint function, optimized file --- tests/gdb-6.3.0.0-1.153.el4.ppc64.sum 2007-10-17 20:18:16.302327000 +0200 +++ tests/gdb-1011017-ppc64.sum 2007-10-17 20:18:19.633988000 +0200 -PASS: gdb.base/break.exp: breakpoint small function, optimized file -PASS: gdb.base/break.exp: run until function breakpoint, optimized file -PASS: gdb.base/break.exp: run until breakpoint set at small function, optimized file +FAIL: gdb.base/break.exp: breakpoint small function, optimized file +FAIL: gdb.base/break.exp: run until function breakpoint, optimized file +FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file -FAIL: gdb.base/sepdebug.exp: run until function breakpoint +PASS: gdb.base/sepdebug.exp: run until function breakpoint -FAIL: gdb.base/sepdebug.exp: run until breakpoint set at small function, optimized file +PASS: gdb.base/sepdebug.exp: run until breakpoint set at small function, optimized file -PASS: gdb.pie/break.exp: breakpoint small function, optimized file -PASS: gdb.pie/break.exp: run until function breakpoint, optimized file -PASS: gdb.pie/break.exp: run until breakpoint set at small function, optimized file +FAIL: gdb.pie/break.exp: breakpoint small function, optimized file +FAIL: gdb.pie/break.exp: run until function breakpoint, optimized file +FAIL: gdb.pie/break.exp: run until breakpoint set at small function, optimized file Don, yesterday I forgot to note this whole issue of Comment 25 affects only the PowerPC platform, if it still could be included for the final release notes, sorry. thanks Jan. note edited accordingly to appear only in PPC release notes updates An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2007-0811.html quick note: added to RHEL4.7 release notes under "Resolved Issues": <quote> (ppc) The command break <function_name> no longer stops the execution later than the first code instruction. As such, the function parameters are now properly displayed when you run this command. </quote> please advise if any further revisions are required. thanks! Hi, the RHEL4.7 release notes deadline is on June 17, 2008 (Tuesday). they will undergo a final proofread before being dropped to translation, at which point no further additions or revisions will be entertained. a mockup of the RHEL4.7 release notes can be viewed here: http://intranet.corp.redhat.com/ic/intranet/RHEL4u7relnotesmockup.html please use the aforementioned link to verify if your bugzilla is already in the release notes (if it needs to be). each item in the release notes contains a link to its original bug; as such, you can search through the release notes by bug number. Cheers, Don |