Bug 1929734 - Updated bundled libbacktrace for DWARF5
Summary: Updated bundled libbacktrace for DWARF5
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: rust-backtrace-sys
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rust SIG
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-17 14:24 UTC by Mark Wielaard
Modified: 2021-05-08 19:17 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-08 19:17:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rust-lang backtrace-rs issues 409 0 None open Please update libbacktrace for better DWARF5 support 2021-02-18 20:00:04 UTC

Description Mark Wielaard 2021-02-17 14:24:20 UTC
GCC11 in Fedora 34 defaults to producing DWARF5. This requires an update of libbacktrace which is bundled in this package.

Comment 1 Fabio Valentini 2021-02-17 16:15:38 UTC
Not sure how we should do that?

backtrace-sys crate ships libbacktrace as a git submodule:
https://github.com/rust-lang/backtrace-rs/tree/master/crates/backtrace-sys/src

Of a rust-lang fork of some random libbacktrace repo plus some downstream changes on top:
https://github.com/rust-lang/libbacktrace/tree/5c88e094a691bb803d4bba342403a10459abad9e

That fork has not been updated in a long time.

So which libbacktrace should we use instead?

Comment 2 Mark Wielaard 2021-02-17 16:56:06 UTC
I believe the one maintained in gcc git is what gets updated most regularly:
https://gcc.gnu.org/git/?p=gcc.git;a=tree;f=libbacktrace;hb=HEAD
It is at least the one that is known to work against and is tested against current GCC, so known to include all the DWARF5 fixes you'll need.

Comment 3 Josh Stone 2021-02-18 17:29:49 UTC
FWIW, this crate is only used as one of several possible implementations for the backtrace crate (rust-backtrace rpm), but its default is to use gimli. AFAICS nothing in Fedora is building with rust-backtrace+backtrace-sys-devel that would pull this in. That said, I think this should be filed as a request on the backtrace-rs repo, and they can rebase the libbacktrace fork.

I'll also note that backtrace-sys is vendored in the sources for the rust toolchain itself, and it was used until rust-1.46.0, but 1.47 also switched to the gimli backend.

Mark, for Rust's sake you might want to investigate how gimli fares with DWARF5, but AFAIK it should be supported. https://github.com/gimli-rs/gimli

Comment 4 Mark Wielaard 2021-02-18 17:46:41 UTC
(In reply to Josh Stone from comment #3)
> Mark, for Rust's sake you might want to investigate how gimli fares with
> DWARF5, but AFAIK it should be supported. https://github.com/gimli-rs/gimli

Gimli does handle most of DWARF5, but not DWARF Supplementary Object Files, which is what dwz produces (well, it produces the GNU extension for DWARF4, but it is very similar). Since Fedora uses dwz for everything using gimli is probably not a good default provider.

Comment 5 Josh Stone 2021-05-05 16:51:40 UTC
Upstream has removed backtrace-sys: https://github.com/rust-lang/backtrace-rs/pull/423

I suppose Fedora could still patch in newer libbacktrace changes, but I expect this package will simply be retired.

Comment 6 Josh Stone 2021-05-05 17:26:17 UTC
(In reply to Mark Wielaard from comment #4)
> Gimli does handle most of DWARF5, but not DWARF Supplementary Object Files,
> which is what dwz produces (well, it produces the GNU extension for DWARF4,
> but it is very similar). Since Fedora uses dwz for everything using gimli is
> probably not a good default provider.

It seems gimli does support this now, and it's in progress for backtrace-rs:
https://github.com/rust-lang/backtrace-rs/issues/410

Comment 7 Fabio Valentini 2021-05-08 19:17:15 UTC
I've updated backtrace to version 0.3.59, which drops the backtrace-sys dependency entirely:
https://bodhi.fedoraproject.org/updates/FEDORA-2021-ed82cab46e

I will soon retire the rust-backtrace-sys package in rawhide, rendering this bug obsolete.


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