On Wed, 29 Dec 2010, James Bottomley wrote: > > Dec 26 12:30:57 mx3210 kernel: INEQUIVALENT ALIASES 0x402a7000 and 0x402a6000 in file libc-2.11.2.so > > > > This is with 2.6.36.2 and your two patches on a SMP kernel. I've also seen > > these messages with a similar UP build in the gcc guality tests. These > > check debug info with gdb. > > Yes, I still don't know why, but fortunately the one above is the same > one I see, which only occurs when the system goes down. I suspect > something is specifying a fixed offset for the library mappings which > violates our 4MB equivalency rule. Attached is an application that triggers similar errors: Dec 29 23:27:02 mx3210 kernel: INEQUIVALENT ALIASES 0x11000 and 0x12000 in file example.exe If I was to guess, I think the problem is likely caused by the brk system calls from popen: ... mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40001000 mprotect(0x40518000, 1413120, PROT_READ|PROT_WRITE) = 0 mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40002000 mprotect(0x40518000, 1413120, PROT_READ|PROT_EXEC) = 0 munmap(0x40185000, 24154) = 0 brk(0) = 0x13000 brk(0x34000) = 0x34000 pipe2([3, 4], O_CLOEXEC) = 0 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x40000a68) = 3035 close(3) = 0 ... It's hard to debug because gdb needs to attach. Dave -- J. David Anglin dave.anglin@xxxxxxxxxxxxxx National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
/* { dg-do run { xfail *-*-* } } */ /* { dg-options "-g" } */ #define GUALITY_DONT_FORCE_LIVE_AFTER -1 #ifndef STATIC_INLINE #define STATIC_INLINE /*static*/ #endif #include "guality.h" #include <assert.h> /* Test the debug info for the functions used in the VTA presentation at the GCC Summit 2008. */ typedef struct list { struct list *n; int v; } elt, *node; STATIC_INLINE node find_val (node c, int v, node e) { while (c < e) { GUALCHK (c); GUALCHK (v); GUALCHK (e); if (c->v == v) return c; GUALCHK (c); GUALCHK (v); GUALCHK (e); c++; } return NULL; } STATIC_INLINE node find_prev (node c, node w) { while (c) { node o = c; c = c->n; GUALCHK (c); GUALCHK (o); GUALCHK (w); if (c == w) return o; GUALCHK (c); GUALCHK (o); GUALCHK (w); } return NULL; } STATIC_INLINE node check_arr (node c, node e) { if (c == e) return NULL; e--; while (c < e) { GUALCHK (c); GUALCHK (e); if (c->v > (c+1)->v) return c; GUALCHK (c); GUALCHK (e); c++; } return NULL; } STATIC_INLINE node check_list (node c, node t) { while (c != t) { node n = c->n; GUALCHK (c); GUALCHK (n); GUALCHK (t); if (c->v > n->v) return c; GUALCHK (c); GUALCHK (n); GUALCHK (t); c = n; } return NULL; } struct list testme[] = { { &testme[1], 2 }, { &testme[2], 3 }, { &testme[3], 5 }, { &testme[4], 7 }, { &testme[5], 11 }, { NULL, 13 }, }; int main (int argc, char *argv[]) { int n = sizeof (testme) / sizeof (*testme); node first, last, begin, end, ret; GUALCHKXPR (n); begin = first = &testme[0]; last = &testme[n-1]; end = &testme[n]; GUALCHKXPR (first); GUALCHKXPR (last); GUALCHKXPR (begin); GUALCHKXPR (end); ret = find_val (begin, 13, end); GUALCHK (ret); assert (ret == last); ret = find_prev (first, last); GUALCHK (ret); assert (ret == &testme[n-2]); ret = check_arr (begin, end); GUALCHK (ret); assert (!ret); ret = check_list (first, last); GUALCHK (ret); assert (!ret); }
Attachment:
example.exe.gz
Description: application/gunzip