Bug 971119 - /usr/lib/debug CRC mismatch without build-id
/usr/lib/debug CRC mismatch without build-id
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
Blocks: 980534
  Show dependency treegraph
Reported: 2013-06-05 14:13 EDT by Jan Kratochvil
Modified: 2013-07-11 11:22 EDT (History)
14 users (show)

See Also:
Fixed In Version: rpm-4.11.1-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 980534 (view as bug list)
Last Closed: 2013-07-07 20:54:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/usr/lib/rpm/sepdebugcrcfix and its integration. (17.80 KB, patch)
2013-06-24 14:58 EDT, Jan Kratochvil
no flags Details | Diff
/usr/lib/rpm/sepdebugcrcfix and its integration #2. (19.13 KB, patch)
2013-06-24 17:16 EDT, Jan Kratochvil
no flags Details | Diff
/usr/lib/rpm/sepdebugcrcfix and its integration #3. (19.13 KB, patch)
2013-06-24 17:33 EDT, Jan Kratochvil
no flags Details | Diff

  None (edit)
Description Jan Kratochvil 2013-06-05 14:13:26 EDT
Description of problem:
rm -rf /usr/lib/debug/.build-id
GDB stops working.

Version-Release number of selected component (if applicable):

How reproducible:
On one system.

Steps to Reproduce:
gdb keyctl
gdb cal

Actual results:
Reading symbols from /usr/bin/keyctl...Missing separate debuginfo for /usr/bin/keyctl
warning: the debug information found in "/usr/lib/debug//usr/bin/cal.debug" does not match "/usr/bin/cal" (CRC mismatch).

Expected results:
Reading symbols from /usr/bin/keyctl...Reading symbols from /usr/lib/debug/bin/keyctl.debug...done.
Reading symbols from /usr/bin/cal...Reading symbols from /usr/lib/debug/usr/bin/cal.debug...done.

Additional info:
Comment 1 Jan Kratochvil 2013-06-13 09:38:07 EDT
The keyctl problem is due to toplevel symlinks in 'filesystem': Bug 974130

The cal problem is due to dwz: Changing .debug file CRC not updating it in the main file referencing it.
Comment 2 Jan Kratochvil 2013-06-13 13:35:35 EDT
Jakub, do you suggest how to fix it?

I/whoever could write small tool to update CRC in the binary files according to new recomputed CRC from the referenced dwz-ed .debug file.
Comment 3 Jakub Jelinek 2013-06-13 13:39:01 EDT
Maybe, yeah.  dwz doesn't know about the original file, so isn't able to adjust the crc in it.
Comment 4 Jan Kratochvil 2013-06-24 14:58:36 EDT
Created attachment 764751 [details]
/usr/lib/rpm/sepdebugcrcfix and its integration.

/usr/lib/rpm/sepdebugcrcfix and its integration with /usr/lib/rpm/find-debuginfo.sh .

As special package representatives I have tested glibc and kernel and both do not use dwz so sepdebugcrcfix is run there but it does not change the files.
kernel build:
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32, matched 1564 CRC32.
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32, matched 1486 CRC32.
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32, matched 1412 CRC32.
/usr/lib/rpm/sepdebugcrcfix: Updated 0 CRC32, matched 591 CRC32.

It modifies mtime (if the file is updated).  dwz also modifies mtime so it is probably OK.
Comment 6 Jan Kratochvil 2013-06-24 17:16:42 EDT
Created attachment 764787 [details]
/usr/lib/rpm/sepdebugcrcfix and its integration #2.
Comment 7 Jan Kratochvil 2013-06-24 17:33:41 EDT
Created attachment 764790 [details]
/usr/lib/rpm/sepdebugcrcfix and its integration #3.
Comment 8 Panu Matilainen 2013-07-04 04:38:40 EDT
Ugh. I dont question the need for this, but the debuginfo department is starting to get a bit ... thick.

Anyway, added to rawhide now (rpm-4.11.1-2.fc20), lets give it a few days to see if anything breaks before pulling elsewhere. RHEL-7 will obviously need (and benefit from) this as there's a mass-rebuild pending, but what about F19 and F18? Those would only see a limited benefit (through updates) at this point.
Comment 9 Jan Kratochvil 2013-07-04 04:52:11 EDT
wrt the F-18 and F-19 backport:

As all the tools I am aware of already use /usr/lib/debug/.build-id/ this problem should not affect normal users.  OTOH for tools hackers like me I currently use this tool by hand when doing some hand rpm rebuilds needing to load uninstalled .debug file.

Also most used packages also get some updates which would benefit from such a rpmbuild fix backported in F-18/F-19.

Up to you.
Comment 10 Panu Matilainen 2013-07-05 04:56:37 EDT
Ok. Given the rather limited to scope of affected users and distro life cycle, I'll pull it into F19 but leave F18 alone.
Comment 11 Fedora Update System 2013-07-05 05:00:10 EDT
rpm-4.11.1-1.fc19 has been submitted as an update for Fedora 19.
Comment 12 Fedora Update System 2013-07-05 20:54:13 EDT
Package rpm-4.11.1-1.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing rpm-4.11.1-1.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 13 Fedora Update System 2013-07-07 20:54:31 EDT
rpm-4.11.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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