This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ERROR: Build-id mismatch: "kernel" vs. "vmlinux" byte 0 (0x00 vs 0x00)


Karl Hiramoto <karl@hiramoto.org> writes:

> I'm a systemtap newbie.  I get the following error with the
> tcp_trace.stp example and others.
> [...]
> ERROR: Build-id mismatch: "kernel" vs. "vmlinux" byte 0 (0x00 vs 0x00)

> The dropwatch.stp example and others work fine.

Interesting.

> I just upgraded from systemtap 1.1 to 1.2 and also tried the latest
> snapshot.  When using systemtap 1.1 a few days ago the tcp_trace.stp
> example worked fine.

There were indeed some changes in the way the build-id matching is
done.  What is the output of 'readelf -x .notes' on your vmlinux file?
Can you try applying the following patch to .../systemtap/runtime/sym.c
and rerun your test?

- FChE

diff --git a/runtime/sym.c b/runtime/sym.c
index 3c69fb1..e1e6e22 100644
--- a/runtime/sym.c
+++ b/runtime/sym.c
@@ -311,15 +311,15 @@ static int _stp_module_check(void)
                              loc2c-runtime.h were more easily usable,
                              a deref() loop could do it too. */
                             mm_segment_t oldfs = get_fs();
-                            int rc;
+                            int rc1, rc2;
                             unsigned char theory, practice;
 
                             set_fs(KERNEL_DS);
-                            rc = get_user(theory,((unsigned char*) &m->build_id_bits[j]));
-                            rc = get_user(practice,((unsigned char*) (void*) (notes_addr+j)));
+                            rc1 = get_user(theory,((unsigned char*) &m->build_id_bits[j]));
+                            rc2 = get_user(practice,((unsigned char*) (void*) (notes_addr+j)));
                             set_fs(oldfs);
 
-                            if (rc || theory != practice) {
+                            if (rc1 || rc2 || (theory != practice)) {
                                     const char *basename;
                                     basename = strrchr(m->path, '/');
                                     if (basename)
@@ -328,15 +328,15 @@ static int _stp_module_check(void)
                                             basename = m->path;
                                     
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
-                                    _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x)\n",
-                                                m->name, basename, j, theory, practice);
+                                    _stp_error ("Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n",
+                                                m->name, basename, j, theory, practice, rc1, rc2);
                                     return 1;
 #else
                                     /* This branch is a surrogate for kernels
                                      * affected by Fedora bug #465873. */
                                     _stp_warn (KERN_WARNING
-                                               "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x)\n",
-                                               m->name, basename, j, theory, practice);
+                                               "Build-id mismatch: \"%s\" vs. \"%s\" byte %d (0x%02x vs 0x%02x) rc %d %d\n",
+                                               m->name, basename, j, theory, practice, rc1, rc2);
 #endif
                                     break;
                             } /* end mismatch */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]