I have downloaded latest Valgrind 3.10.0.SVN and cross compiled it for MIPS64. After put Valgrind on the board and try valgrind ls (and even with valgrind --tool=callgrind ls), I got below assertion from ld.so then valgrind exit without continue execute the program (ls in this case): ==32644== Memcheck, a memory error detector ==32644== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==32644== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==32644== Command: ls ==32644== Inconsistency detected by ld.so: rtld.c: 1257: dl_main: Assertion `_rtld_local._dl_rtld_map.l_relocated' failed! ==32644== ==32644== HEAP SUMMARY: ==32644== in use at exit: 0 bytes in 0 blocks ==32644== total heap usage: 0 allocs, 0 frees, 0 bytes allocated ==32644== ==32644== All heap blocks were freed -- no leaks are possible ==32644== ==32644== For counts of detected and suppressed errors, rerun with: -v ==32644== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) There's one special point when cross compiling Valgrind is that I have changed Optimize level of drd from O2 to O0 (since compilation hangs in middle for drd with O2). I think that is not a problem since there's one bug report and resolve for that already. I have searched through the bug list but currently there's no entry for this kind of behavior. May you please help to have a look and give your idea? Please feedback if you need more information. Regards, Vien Mai. Reproducible: Always Steps to Reproduce: 1. Put valgrind on mips64 board 2. valgrind ls 3. valgrind --tool=callgrind ls Actual Results: Valgrind shows Inconsistency detected by ld.so: rtld.c: 1257: dl_main: Assertion `_rtld_local._dl_rtld_map.l_relocated' failed! when loading tool(s) Expected Results: Valgrind should not show Inconsistency detected by ld.so: rtld.c: 1257: dl_main: Assertion `_rtld_local._dl_rtld_map.l_relocated' failed! and execute the program normally.
I wonder if this some variant of the SHMBLA problem. Petar, any idea?
@Vien Mai Can you share the command line that you use to configure Valgrind? What's the pagesize value on the Cavium board? What's the system you use to run Valgrind on? What board/CPU are you running it on?
Hi Petar, 1. Belows are commands I have used: export PATH=<path_to_mips64_gcc>:$PATH export CC=mips64-gcc export LD=mips64-ld export AR=mips64-ar export RANLIB=mips64-ranlib export CXX=mips64-g++ export STRIP=mips64-strip On the first try, I configure: ./configure --prefix=/ --host=mips64-linux-gnu --with-pagesize=4 The issue comes, so I try with: ./configure --host=mips64-target-linux-gnu --build=x86_64-crosscompile-linux-gnu --prefix=/ Issue comes also. 2. I have written one executable to invoke getpagesize() function. The value comes out as 4096 (4kb). Hence, I think the configuration is correct. 3. I'm running valgrind on a Calvium Octeaon ii mips64 with Linux kernel 2.6. This is a big-endian mips64. Please check if provided information is useful from your site. Regards, Vien Mai.
(In reply to Vien from comment #3) Are you using c-lib compatible toolchain for Valgrind (i.e. compatible with the system libraries on the board)? What C-library do you have on the system? Can you give more details on the toolchain you are using? Does Valgrind executable work if you do not pass any parameter to it? Is the rootfs built with Cavium specific toolchain or a regular MIPS64 toolchain?
Any update here?
Any update here, Vien?
As there have been no updates to this issue for years now, I think we should close it.