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 867221 - Build-id mismatch: "kernel" vs. "vmlinux" on kernel 2.6.32-279.1.1
Summary: Build-id mismatch: "kernel" vs. "vmlinux" on kernel 2.6.32-279.1.1
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Frank Ch. Eigler
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-17 05:50 UTC by hydra35
Modified: 2012-10-19 09:22 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-19 09:22:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
results of stap-report (8.21 KB, text/plain)
2012-10-18 04:22 UTC, hydra35
no flags Details

Description hydra35 2012-10-17 05:50:48 UTC
Description of problem: stap fails on kernel version 2.6.32-279.1.1 with error: Build-id mismatch: "kernel" vs. "vmlinux" byte 0 (0x8c vs 0x4e) address 0xffffffff81508170 rc 0


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

systemtap-1.7-5.el6_3.1.x86_64
kernel-2.6.32-279.1.1.el6.x86_64
kernel-debuginfo-2.6.32-279.1.1.el6.x86_64
kernel-debuginfo-common-x86_64-2.6.32-279.1.1.el6.x86_64
kernel-devel-2.6.32-279.1.1.el6.x86_64
kernel-headers-2.6.32-279.1.1.el6.x86_64


How reproducible: Always


Steps to Reproduce:
1. run stap -we 'probe vfs.read {printf("read performed\n"); exit()}'

  
Actual results:

ERROR: Build-id mismatch: "kernel" vs. "vmlinux" byte 0 (0x8c vs 0x4e) address 0xffffffff81508170 rc 0
Pass 5: run failed.  Try again with another '--vp 00001' option.

Expected results:

stap print "read performed" and exit

Additional info:

Comment 1 hydra35 2012-10-17 05:52:30 UTC
Note that kernel 2.6.32-279.5.2 does not have this problem. All the things being same

Comment 3 Frank Ch. Eigler 2012-10-17 12:54:33 UTC
Please run stap-report (newest version at http://sourceware.org/git/?p=systemtap.git;a=blob_plain;f=stap-report); it attempts to report on build-ids running rampant on the machine.

Comment 4 hydra35 2012-10-18 04:22:25 UTC
Created attachment 629142 [details]
results of stap-report

Comment 5 Mark Wielaard 2012-10-18 09:00:28 UTC
(In reply to comment #4)
> Created attachment 629142 [details]
> results of stap-report

You don't seem to have the kernel-debuginfo package installed. Is that correct?
Also the stap-report from comment #3 should try to explicitly extract the kernel build-id by running:

run "eu-readelf -n /boot/vmlinuz-`uname -r` | grep Build"
run "eu-readelf -n /usr/lib/debug/lib/modules/`uname -r`/vmlinux | grep Build"

But it seems it didn't get that far in your report.
Could you try running those commands by hand?

Comment 6 hydra35 2012-10-19 08:45:55 UTC
> You don't seem to have the kernel-debuginfo package installed.

kernel-debuginfo pkg is installed using rpm not yum.

# rpm -qi kernel-debuginfo
Name        : kernel-debuginfo             Relocations: (not relocatable)
Version     : 2.6.32                            Vendor: CentOS
Release     : 279.1.1.el6                   Build Date: Tue 10 Jul 2012 10:56:04 PM CST

Result of run "eu-readelf" manually:

# eu-readelf -n /boot/vmlinuz-`uname -r` | grep Build
    Build ID: 4ee1e0af35a7a7233f725fb72fddace5e4e5a1c0
# eu-readelf -n /usr/lib/debug/lib/modules/`uname -r`/vmlinux | grep Build
    Build ID: 8c33eab01b34cdde6dbb46ebcb2ae3c9929c836d

Since we are sure two packages are built from identical source code, we've worked around this by hacking "/usr/share/systemtap/runtime/sym.c":

              notes_addr = m->build_id_offset;
/*
              notes_addr = _stp_kmodule_relocate("kernel",
                  "_stext", m->build_id_offset);
*/

Comment 7 Mark Wielaard 2012-10-19 09:22:50 UTC
(In reply to comment #6)
> # rpm -qi kernel-debuginfo
> Name        : kernel-debuginfo             Relocations: (not relocatable)
> Version     : 2.6.32                            Vendor: CentOS
> Release     : 279.1.1.el6                   Build Date: Tue 10 Jul 2012 [...]

> Result of run "eu-readelf" manually:
> 
> # eu-readelf -n /boot/vmlinuz-`uname -r` | grep Build
>     Build ID: 4ee1e0af35a7a7233f725fb72fddace5e4e5a1c0
> # eu-readelf -n /usr/lib/debug/lib/modules/`uname -r`/vmlinux | grep Build
>     Build ID: 8c33eab01b34cdde6dbb46ebcb2ae3c9929c836d

That indicates a problem. They should match. It means they don't come from the same build/package.

> Since we are sure two packages are built from identical source code [...]

If the build-ids don't match, that means that they were not created from identical sources in the same build (or not in the exact same build environment). That indicates the debuginfo and the executable bits don't match exactly. Which means you cannot rely on the debuginfo to be completely correct.

Since these builds seem to come from CentOS you might want to file a bug report with them.


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