RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1881888 - Support for .zdebug_info
Summary: Support for .zdebug_info
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rpm
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Domonkos
QA Contact: swm-qe
URL:
Whiteboard:
Depends On: 1881860 1881950
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-23 10:21 UTC by Vít Ondruch
Modified: 2020-11-24 08:04 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1881860
Environment:
Last Closed: 2020-11-24 08:04:52 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Vít Ondruch 2020-09-23 10:21:13 UTC
While RPMDiff reports "missing [.debug_info]", trying to check manually, this is what I get:

~~~
$ readelf -a git-lfs.debug | grep debug_info
  [29] .zdebug_info      PROGBITS         000000000110ea7e  000eed50
~~~

So obviously there is compressed debug_info. It seems that Fedora automatically decompress such sections. I think it would make sense do the same for RHEL.


How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
`missing [.debug_info]` is reported, while .zdebug_info is available.


Expected results:
The .zdebug_info should be expanded by /usr/lib/rpm/find-debuginfo.sh


Additional info:
Please note that while this is reported against RHEL8, I met the original issue on RHEL7. Please consider the fix there as well.

Comment 2 Panu Matilainen 2020-09-29 08:55:25 UTC
So AIUI, we're speaking about backporting this commit: https://github.com/rpm-software-management/rpm/commit/1c3bf3d6495c4b7d585d931fbac4b1f894833f89 and nothing more. In that case:

elfutils in RHEL-8 is new enough for that to work, the patch has been in Fedora all along so it can be considered well tested, so there should be no technical obstacles so this is more of a "should we?" policy question. Mark?

Comment 3 Mark Wielaard 2020-09-29 09:56:25 UTC
(In reply to Panu Matilainen from comment #2)
> So AIUI, we're speaking about backporting this commit:
> https://github.com/rpm-software-management/rpm/commit/
> 1c3bf3d6495c4b7d585d931fbac4b1f894833f89 and nothing more. In that case:
> 
> elfutils in RHEL-8 is new enough for that to work, the patch has been in
> Fedora all along so it can be considered well tested, so there should be no
> technical obstacles so this is more of a "should we?" policy question. Mark?

Note that I never intended for that patch to be a real solution, I only suggested it as quick workaround for breakage in Fedora at the time. I am slightly surprised Igor marked and committed it as Authored by me. Also note that as far as I know this is a Fedora only workaround and isn't actually in rpm upstream where you reverted it as part of https://github.com/rpm-software-management/rpm/pull/473

That said it doesn't seem to harm things, so if you want RHEL to behave more like Fedora it should be fine.

It isn't a real solution (and the explicit echo makes it very verbose), it simply works around the real issue that we don't want compressed ELF sections in .debug files. So in that sense it resolves the policy issue.

Comment 5 Michal Domonkos 2020-11-09 09:57:59 UTC
(In reply to Mark Wielaard from comment #3)
> Also note that as far as I know this is a Fedora only workaround and isn't actually in
> rpm upstream where you reverted it as part of
> https://github.com/rpm-software-management/rpm/pull/473

The revert was done due to the suid issue tracked in Bug 1607044, which got fixed and backported into RHEL-8 in the meantime, so backporting the original find-debuginfo.sh patch into RHEL-8 wouldn't be an issue in this regard.

Anyway,

@Vito, it seems you've made a decision to fix this in the git-lfs software collection by not shipping the compressed .zdebug_info section in the first place:
https://bugzilla.redhat.com/show_bug.cgi?id=1607044

That makes me think you no longer need our patch in RHEL-8, is that correct?

If so, I'd say let's close this BZ as WONTFIX then.  While it certainly would be a usable workaround, it seems the proper way is to handle this at the package level (preferably by not shipping compressed ELF sections in .debug files at all), along the lines of Mark's Comment 3 as well as Bug 1394759.

Comment 6 Michal Domonkos 2020-11-09 09:59:35 UTC
(In reply to Michal Domonkos from comment #5)
> @Vito, it seems you've made a decision to fix this in the git-lfs software
> collection by not shipping the compressed .zdebug_info section in the first
> place:
> https://bugzilla.redhat.com/show_bug.cgi?id=1607044

Correction: https://bugzilla.redhat.com/show_bug.cgi?id=1881950

Comment 7 Vít Ondruch 2020-11-09 10:30:10 UTC
I spent the time with all the research, discussions, preparing workarounds, etc. Therefore if you ask me, I want this to be "fixed" not because it helps to my original case, but because it might help future me or some else to avoid undergoing the same again. Sure, you won't ever know if fixing this changed anything, maybe nobody would not hit this prior RHEL8 EOL, but that it not my call.

Comment 8 Michal Domonkos 2020-11-09 10:43:00 UTC
Thanks for the feedback.

The real question is, what does "fixed" mean here?  If it's "don't use compressed sections", then there's nothing to fix on our side.  I'm no expert, though, which is why I tend to trust people like Mark who said:

"It isn't a real solution (and the explicit echo makes it very verbose), it simply works around the real issue that we don't want compressed ELF sections in .debug files. So in that sense it resolves the policy issue."

Mark, could you please clarify why using compressed ELF sections in .debug files is to be avoided?

Comment 9 Michal Domonkos 2020-11-09 10:50:14 UTC
(In reply to Vít Ondruch from comment #7)
> I spent the time with all the research, discussions, preparing workarounds,
> etc.

And just to be clear, it is highly appreciated that you tracked down the issue and filed this BZ, regardless of whether the outcome was to make adjustments to your own package or us making changes in rpm.  Either way is a successful outcome in my book :)

Comment 10 Mark Wielaard 2020-11-09 10:54:12 UTC
(In reply to Michal Domonkos from comment #8)
> Mark, could you please clarify why using compressed ELF sections in .debug
> files is to be avoided?

Because, according to this bug, rpm debugedit doesn't support it :)

But generally because we already compress the debuginfo for distribution in rpms (all rpms are compressed), so it is in general redundant. Also we would like programs that use on-disk .debug files and .debug_* sections to be able to quickly read them and/or mmap them and not have to decompress the whole file or section upon use which would use extra resources, time and memory. Which is especially troublesome for profilers and tracers which have to act quickly. So if they were compressed then programs would probably have to setup some uncompressed cache of these files.

Comment 13 Vít Ondruch 2020-11-09 14:12:27 UTC
(In reply to Michal Domonkos from comment #9)
> (In reply to Vít Ondruch from comment #7)
> > I spent the time with all the research, discussions, preparing workarounds,
> > etc.
> 
> And just to be clear, it is highly appreciated that you tracked down the
> issue and filed this BZ, regardless of whether the outcome was to make
> adjustments to your own package or us making changes in rpm.  Either way is
> a successful outcome in my book :)

Don't worry, I am fine with whatever decision. You just asked ;)


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