Bug 1497800 - something broken in ppc64 backtracing
Summary: something broken in ppc64 backtracing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: DevTools
Classification: Red Hat
Component: rust
Version: rust-toolset-7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 2018.4
Assignee: Josh Stone
QA Contact: Martin Cermak
Vladimír Slávik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-02 17:22 UTC by Martin Cermak
Modified: 2018-11-13 15:24 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Rust's backtrace library didn't support ppc64 ELFv1. Consequence: Backtraces printed during Rust panics with RUST_BACKTRACE=1 showed "<unknown>" symbol information. Fix: Rust's backtrace library has been updated in Rust 1.28 to include support for ppc64 ELFv1. Result: RUST_BACKTRACE=1 shows appropriate symbols.
Clone Of:
Environment:
Last Closed: 2018-11-13 15:24:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 82368 0 None None None 2018-07-31 22:32:48 UTC
Red Hat Product Errata RHEA-2018:3584 0 None None None 2018-11-13 15:24:46 UTC

Description Martin Cermak 2017-10-02 17:22:20 UTC
Description of problem:
  The run-pass/backtrace.rs fails on ppc64

Version-Release number of selected component (if applicable):
  rust-toolset-7-rust-1.20.0-2.el7

How reproducible:
  100% on ppc64

Steps to Reproduce:
1. scl enable rust-toolset-7 llvm-toolset-7 bash
2. rpmbuild -bp rust.spec
3. go to src/test/run-pass
4. env RUSTC_BOOTSTRAP=1 rustc -O backtrace.rs
5. ./backtrace

Actual results:
 7.4 Server ppc64 # ./backtrace
thread 'main' panicked at 'bad output: thread 'main' panicked at 'explicit panic', backtrace.rs:24:8
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
', backtrace.rs:59:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
 7.4 Server ppc64 #

Expected results:
No output.

Comment 2 Josh Stone 2018-02-28 18:39:16 UTC
Deferring to a future release, but we'll keep the bug open for tracking.

Comment 11 Josh Stone 2018-07-31 22:32:49 UTC
Rust uses a fork of https://github.com/ianlancetaylor/libbacktrace, which is based on GCC's libbacktrace.  It appears that code just didn't handle .opd at all, which you need for PPC64 ELFv1 (big-endian).  This was reported in GCC 82368, fixed by Jakub in r257685, and will reach Rust in 1.28.

Comment 12 Josh Stone 2018-07-31 22:45:12 UTC
Rather, GCC r257658 was the actual fix; r257685 was a followup tweak.

Comment 21 errata-xmlrpc 2018-11-13 15:24:31 UTC
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, 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/RHEA-2018:3584


Note You need to log in before you can comment on or make changes to this bug.