Hi,
I tried to run valgrind on my cavium octeon3 mips64 board, but failed to let
it work. please give me help!
--------------------------------------------------------------------------------------------------------------------------------
root@Openwrt:/tmp# valgrind -v /bin/true
==9303== Memcheck, a memory error detector
==9303== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9303== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h
for copyright info
==9303== Command: /bin/true
==9303==
--9303-- Valgrind options:
--9303-- -v
--9303-- Contents of /proc/version:
--9303-- Linux version 3.10.87 (root@PowerEdge-T130) (gcc version 4.7.0
(Cavium Inc. Version: SDK_BUILD build 49) ) #931 SMP Sat Jul 6 13:36:22 CST 2019
--9303--
--9303-- Arch and hwcaps: MIPS64, BigEndian, Cavium-baseline
--9303-- Page sizes: currently 4096, max supported 65536
--9303-- Valgrind library directory: /usr/lib/valgrind
--9303-- Reading syms from /lib/ld-2.16.so
--9303-- Reading syms from /bin/busybox
--9303-- warning: DiCfSI 0x0 .. 0x17 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x0 .. 0x3 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x4 .. 0x7 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x8 .. 0x17 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x18 .. 0x2b outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x2c .. 0x73 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x0 .. 0x3 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x4 .. 0x7 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x8 .. 0x17 outside mapped rx segments (NONE)
--9303-- warning: DiCfSI 0x18 .. 0x77 outside mapped rx segments (NONE)
--9303-- Reading syms from /usr/lib/valgrind/memcheck-mips64-linux
--9303-- object doesn't have a dynamic symbol table
--9303-- Scheduler: using generic scheduler lock implementation.
--9303-- Reading suppressions file: /usr/lib/valgrind/default.supp
==9303== embedded gdbserver: reading from
/tmp/vgdb-pipe-from-vgdb-to-9303-by-superroot-on-???
==9303== embedded gdbserver: writing to
/tmp/vgdb-pipe-to-vgdb-from-9303-by-superroot-on-???
==9303== embedded gdbserver: shared mem
/tmp/vgdb-pipe-shared-mem-vgdb-9303-by-superroot-on-???
==9303==
==9303== TO CONTROL THIS PROCESS USING vgdb (which you probably
==9303== don't want to do, unless you know exactly what you're doing,
==9303== or are doing some strange experiment):
==9303== /usr/lib/valgrind/../../bin/vgdb --pid=9303 ...command...
==9303==
==9303== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==9303== /path/to/gdb /bin/true
==9303== and then give GDB the following command
==9303== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=9303
==9303== --pid is optional if only one valgrind process is running
==9303==
--9303-- REDIR: 0x401ce00 (ld.so.1:strlen) redirected to 0x58115be4
(vgPlain_mips64_linux_REDIR_FOR_strlen)
--9303-- REDIR: 0x401ca80 (ld.so.1:index) redirected to 0x58115bc0
(vgPlain_mips64_linux_REDIR_FOR_index)
--9303-- Reading syms from /usr/lib/valgrind/vgpreload_core-mips64-linux.so
--9303-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-mips64-linux.so
--9303-- REDIR: 0x401d930 (ld.so.1:mempcpy) redirected to 0x40631c0 (mempcpy)
--9303-- REDIR: 0x401d2e0 (ld.so.1:bcmp) redirected to 0x405bef0 (bcmp)
--9303-- REDIR: 0x401da40 (ld.so.1:memcpy) redirected to 0x4056b18 (memcpy)
--9303-- Reading syms from /lib/libcrypt-2.16.so
--9303-- Reading syms from /lib/libm-2.16.so
--9303-- Reading syms from /lib/libpam.so.0.83.1
--9303-- Reading syms from /lib/libpam_misc.so.0.82.0
--9303-- Reading syms from /lib/libc-2.16.so
--9303-- Reading syms from /lib/libdl-2.16.so
--9303-- REDIR: 0x42ab310 (libc.so.6:rindex) redirected to 0x404b700 (rindex)
==9303== Invalid read of size 8
==9303== at 0x4251EE4: __ctype_init (ctype-info.c:32)
==9303== by 0x4242C8C: _init (init-first.c:97)
==9303== by 0x40129D8: call_init (dl-init.c:69)
==9303== by 0x40129D8: call_init (dl-init.c:34)
==9303== by 0x4012BC8: _dl_init (dl-init.c:133)
==9303== by 0x400328C: _dl_start_user (in /lib/ld-2.16.so)
==9303== Address 0xffffffffffff9000 is not stack'd, malloc'd or (recently)
free'd
==9303==
==9303==
==9303== Process terminating with default action of signal 10 (SIGBUS)
==9303== at 0x4251EE4: __ctype_init (ctype-info.c:32)
==9303== by 0x4242C8C: _init (init-first.c:97)
==9303== by 0x40129D8: call_init (dl-init.c:69)
==9303== by 0x40129D8: call_init (dl-init.c:34)
==9303== by 0x4012BC8: _dl_init (dl-init.c:133)
==9303== by 0x400328C: _dl_start_user (in /lib/ld-2.16.so)
==9303==
==9303== Process terminating with default action of signal 10 (SIGBUS)
==9303== at 0x4019508: __dl_runtime_resolve (dl-trampoline.c:178)
==9303== by 0x40192D8: _dl_runtime_resolve (in /lib/ld-2.16.so)
==9303==
==9303== HEAP SUMMARY:
==9303== in use at exit: 0 bytes in 0 blocks
==9303== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==9303==
==9303== All heap blocks were freed -- no leaks are possible
==9303==
==9303== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 1 from 1)
==9303==
==9303== 1 errors in context 1 of 1:
==9303== Invalid read of size 8
==9303== at 0x4251EE4: __ctype_init (ctype-info.c:32)
==9303== by 0x4242C8C: _init (init-first.c:97)
==9303== by 0x40129D8: call_init (dl-init.c:69)
==9303== by 0x40129D8: call_init (dl-init.c:34)
==9303== by 0x4012BC8: _dl_init (dl-init.c:133)
==9303== by 0x400328C: _dl_start_user (in /lib/ld-2.16.so)
==9303== Address 0xffffffffffff9000 is not stack'd, malloc'd or (recently)
free'd
==9303==
--9303--
--9303-- used_suppression: 1 ld(Addr4) /usr/lib/valgrind/default.supp:14
==9303==
==9303== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 1 from 1)
Bus error
------------------------------------------------------------------------------------------------------------
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
another log to run pthread app:
root@openwrt:~# valgrind -v /bin/linkmgr
==25092== Memcheck, a memory error detector
==25092== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==25092== Using Valgrind-3.15.0-608cb11914-20190413 and LibVEX; rerun with -h
for copyright info
==25092== Command: /bin/linkmgr
==25092==
--25092-- Valgrind options:
--25092-- -v
--25092-- Contents of /proc/version:
--25092-- Linux version 3.10.87 (root@PowerEdge-T130) (gcc version 4.7.0
(Cavium Inc. Version: SDK_BUILD build 49) ) #931 SMP Sat Jul 6 13:36:22 CST 2019
--25092--
--25092-- Arch and hwcaps: MIPS64, BigEndian, Cavium-baseline
--25092-- Page sizes: currently 4096, max supported 65536
--25092-- Valgrind library directory: /usr/lib/valgrind
--25092-- Reading syms from /lib/ld-2.16.so
--25092-- Reading syms from /bin/linkmgr
--25092-- Reading syms from /usr/lib/valgrind/memcheck-mips64-linux
--25092-- object doesn't have a dynamic symbol table
--25092-- Scheduler: using generic scheduler lock implementation.
--25092-- Reading suppressions file: /usr/lib/valgrind/default.supp
==25092== embedded gdbserver: reading from
/tmp/vgdb-pipe-from-vgdb-to-25092-by-superroot-on-???
==25092== embedded gdbserver: writing to
/tmp/vgdb-pipe-to-vgdb-from-25092-by-superroot-on-???
==25092== embedded gdbserver: shared mem
/tmp/vgdb-pipe-shared-mem-vgdb-25092-by-superroot-on-???
==25092==
==25092== TO CONTROL THIS PROCESS USING vgdb (which you probably
==25092== don't want to do, unless you know exactly what you're doing,
==25092== or are doing some strange experiment):
==25092== /usr/lib/valgrind/../../bin/vgdb --pid=25092 ...command...
==25092==
==25092== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==25092== /path/to/gdb /bin/linkmgr
==25092== and then give GDB the following command
==25092== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=25092
==25092== --pid is optional if only one valgrind process is running
==25092==
--25092-- REDIR: 0x401ce00 (ld.so.1:strlen) redirected to 0x58115be4
(vgPlain_mips64_linux_REDIR_FOR_strlen)
--25092-- REDIR: 0x401ca80 (ld.so.1:index) redirected to 0x58115bc0
(vgPlain_mips64_linux_REDIR_FOR_index)
--25092-- Reading syms from /usr/lib/valgrind/vgpreload_core-mips64-linux.so
--25092-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-mips64-linux.so
--25092-- REDIR: 0x401d930 (ld.so.1:mempcpy) redirected to 0x40631c0 (mempcpy)
--25092-- REDIR: 0x401d2e0 (ld.so.1:bcmp) redirected to 0x405bef0 (bcmp)
--25092-- REDIR: 0x401da40 (ld.so.1:memcpy) redirected to 0x4056b18 (memcpy)
--25092-- Reading syms from /lib/libpthread-2.16.so
--25092-- Reading syms from /lib/librt-2.16.so
--25092-- Reading syms from /lib/libstdc++.so.6.0.17
--25092-- Reading syms from /lib/libdl-2.16.so
--25092-- Reading syms from /usr/lib/libz.so.1.2.8
--25092-- Reading syms from /lib/libm-2.16.so
--25092-- Reading syms from /lib/libuci.so
--25092-- Reading syms from /lib/libubox.so
--25092-- Reading syms from /lib/libubus.so
--25092-- Reading syms from /lib/libblobmsg_json.so
--25092-- Reading syms from /usr/lib/libjson-c.so.2.0.1
--25092-- Reading syms from /usr/lib/libssl.so.1.0.0
--25092-- Reading syms from /usr/lib/libcrypto.so.1.0.0
--25092-- Reading syms from /lib/libgcc_s.so.1
--25092-- Reading syms from /lib/libc-2.16.so
==25092== Invalid write of size 1
==25092== at 0x4085044: __pthread_initialize_minimal (nptl-init.c:309)
==25092== by 0x4083A58: ??? (in /lib/libpthread-2.16.so)
==25092== Address 0xffffffffffff8d12 is not stack'd, malloc'd or (recently)
free'd
==25092==
==25092==
==25092== Process terminating with default action of signal 10 (SIGBUS)
==25092== at 0x4085044: __pthread_initialize_minimal (nptl-init.c:309)
==25092== by 0x4083A58: ??? (in /lib/libpthread-2.16.so)
==25092==
==25092== Process terminating with default action of signal 10 (SIGBUS)
==25092== at 0x4019508: __dl_runtime_resolve (dl-trampoline.c:178)
==25092== by 0x40192D8: _dl_runtime_resolve (in /lib/ld-2.16.so)
==25092==
==25092== HEAP SUMMARY:
==25092== in use at exit: 0 bytes in 0 blocks
==25092== total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==25092==
==25092== All heap blocks were freed -- no leaks are possible
==25092==
==25092== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 1 from 1)
==25092==
==25092== 1 errors in context 1 of 1:
==25092== Invalid write of size 1
==25092== at 0x4085044: __pthread_initialize_minimal (nptl-init.c:309)
==25092== by 0x4083A58: ??? (in /lib/libpthread-2.16.so)
==25092== Address 0xffffffffffff8d12 is not stack'd, malloc'd or (recently)
free'd
==25092==
--25092--
--25092-- used_suppression: 1 ld(Addr4) /usr/lib/valgrind/default.supp:14
==25092==
==25092== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 1 from 1)
Bus error
--------------------------------------------------------------------------------------------------------------
Thanks in advance.
Bryan
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users