Bug 2027789
Summary: | glibc: backtrace function crashes without vdso on ppc64le | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Mark Wielaard <mjw> |
Component: | glibc | Assignee: | Florian Weimer <fweimer> |
Status: | CLOSED ERRATA | QA Contact: | Sergey Kolosov <skolosov> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 9.0 | CC: | ashankar, bugproxy, codonell, dj, fweimer, jchecahi, mnewsome, pfrankli, sipoyare, tulioqm |
Target Milestone: | rc | Keywords: | Bugfix, Patch, Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glibc-2.34-11.el9 | Doc Type: | No Doc Update |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 15:48:51 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: |
Description
Mark Wielaard
2021-11-30 16:18:16 UTC
I'd like to hear an opinion from the IBM team on this matter. Thanks! Backporting the glibc change without backchain support in the libgcc unwinder seems problematic. Florian, I noticed this bug has been reported against RHEL 9, which has a new GCC version. Programs built with GCC 8 or newer won't be affected by the removal of the powerpc64-specific backtrace() from glibc. The output from backtrace() is incomplete when a binary built with GCC 7 or older is executed on a glibc without the powerpc64-specific backtrace [1]. If this is a supported scenario for RHEL 9, then we have 2 options: 1. Remove the powerpc64-specific backtrace() anyway and get an incomplete output from backtrace(). 2. Test if nip is NULL, generate an incomplete output from backtrace(), but it should have more details than option 1. Unfortunately, I'm not aware of an alternative solution when both the VDSO and asynchronous unwind tables are unavailable. Notice that according to [2], other architectures do not support backtracing when asynchronous unwind tables are unavailable. [1] https://patchwork.sourceware.org/project/glibc/patch/20210212170941.1786380-1-adhemerval.zanella@linaro.org/#106601 [2] https://patchwork.sourceware.org/project/glibc/patch/20210212170941.1786380-1-adhemerval.zanella@linaro.org/#106615 (In reply to Tulio Magno Quites Machado Filho from comment #2) > Florian, I noticed this bug has been reported against RHEL 9, which has a > new GCC version. > Programs built with GCC 8 or newer won't be affected by the removal of the > powerpc64-specific backtrace() from glibc. > > The output from backtrace() is incomplete when a binary built with GCC 7 or > older is executed on a glibc without the powerpc64-specific backtrace [1]. RHEL 7 binaries are still supposed to run on RHEL 9. For RHEL 9, we only used -fexceptions -funwind-tables, not -fexceptions -fasynchronous-unwind-tables. Shouldn't backtrace still work in this configuration? I'll try to get a RHEL 7 ppc64le bugs and check how sticky the unwind table options are in practice. I think we have a downstream patch to enable them by default, so it's quite likely that non-distribution binaries built on RHEL have unwind tables. That would leave a gap for non-RHEL-built binaries only. If backtrace doesn't crash and produce just less data, I think we are still good. So we can remove the backchain-based unwinder from RHEL 9 glibc. Would you recommend we do that? The no-vDSO use case is quite extreme, but the DWARF-based unwinder might be more accurate in other situations, too. Nope, gcc-4.8.5-44.el7.ppc64le does not have the -funwind-tables default baked in. So binaries built on RHEL 7 only have unwinding data if explicitly requested by the programmer. I think that makes it a more difficult call to remove the backchain-based unwinder. > Would you recommend we do that? The no-vDSO use case is quite extreme, but the DWARF-based unwinder might be more accurate in other situations, too. Yes, that' what I'd prefer. However... > I think that makes it a more difficult call to remove the backchain-based unwinder. ... I agree with you here. I guess the only solution available in order to provide similar backtrace() output for RHEL 7 binaries and not crash when executing on valgrind is by keeping the powerpc-specific backtrace() and adding the check if nip == NULL. Notice that in my previous comment I was too harsh when I said: >> 2. Test if nip is NULL, generate an incomplete output from backtrace(), but it should have more details than option 1. This would only affect binaries executing when the VDSO is not available, e.g. on top of valgrind. In the most common scenario, the output would be identical. (In reply to Florian Weimer from comment #4) > Nope, gcc-4.8.5-44.el7.ppc64le does not have the -funwind-tables default > baked in. So binaries built on RHEL 7 only have unwinding data if explicitly > requested by the programmer. I think that makes it a more difficult call to > remove the backchain-based unwinder. But weren't they injected through the redhat-rpm-config? So at least system libraries and programs should have them. (In reply to Mark Wielaard from comment #6) > (In reply to Florian Weimer from comment #4) > > Nope, gcc-4.8.5-44.el7.ppc64le does not have the -funwind-tables default > > baked in. So binaries built on RHEL 7 only have unwinding data if explicitly > > requested by the programmer. I think that makes it a more difficult call to > > remove the backchain-based unwinder. > > But weren't they injected through the redhat-rpm-config? > So at least system libraries and programs should have them. Unfortunately, those aren't relevant here because we have rebuilt them anyway. Let's apply the patch from comment 0 as a downstream-only solution if QE agrees. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: glibc), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:3917 |