Bug 867221 - Build-id mismatch: "kernel" vs. "vmlinux" on kernel 2.6.32-279.1.1
Build-id mismatch: "kernel" vs. "vmlinux" on kernel 2.6.32-279.1.1
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: systemtap (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Frank Ch. Eigler
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-17 01:50 EDT by hydra35
Modified: 2012-10-19 05:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-19 05:22:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description hydra35 2012-10-17 01:50:48 EDT
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 01:52:30 EDT
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 08:54:33 EDT
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 00:22:25 EDT
Created attachment 629142 [details]
results of stap-report
Comment 5 Mark Wielaard 2012-10-18 05:00:28 EDT
(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 04:45:55 EDT
> 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 05:22:50 EDT
(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.