|
From: Zaahir K. <kn....@gm...> - 2011-05-04 12:45:40
|
Hi All, I am new to valgrind. I am using valgrind 3.6.1 cross compiled for ARMv7. When I am memcheck getting SEGMENTATION FAULT @ /lib/ld-2.5.so. Is there any problem while configuration/Installation of valgrind? Log is below, any support highly appreciated. /home/administrator/valgrind$ bin/valgrind -v -v -d -d /root/valgrind_example --1078:1:debuglog DebugLog system started by Stage 1, level 2 logging requested --1078:1:launcher no tool requested, defaulting to 'memcheck' --1078:2:launcher selecting platform for '/root/valgrind_example' --1078:2:launcher selecting platform for '/root/valgrind_example' --1078:2:launcher opened '/root/valgrind_example' --1078:2:launcher read 4096 bytes from '/root/valgrind_example' --1078:2:launcher selected platform 'arm-linux' --1078:1:launcher selected platform 'arm-linux' --1078:1:launcher launching /home/administrator/valgrind/lib/valgrind/memcheck-arm-linux --1078:1:debuglog DebugLog system started by Stage 2 (main), level 2 logging requested --1078:1:main Welcome to Valgrind version 3.6.1 debug logging --1078:1:main Checking current stack is plausible --1078:1:main Checking initial stack was noted --1078:1:main Starting the address space manager --1078:2:aspacem sp_at_startup = 0x00befa4d50 (supplied) --1078:2:aspacem minAddr = 0x0004000000 (computed) --1078:2:aspacem maxAddr = 0x00befa3fff (computed) --1078:2:aspacem cStart = 0x0004000000 (computed) --1078:2:aspacem vStart = 0x00617d2000 (computed) --1078:2:aspacem suggested_clstack_top = 0x00bdfa4fff (computed) --1078:2:aspacem <<< SHOW_SEGMENTS: Initial layout (5 segments, 0 segnames) --1078:2:aspacem 0: RSVN 0000000000-0003ffffff 64m ----- SmFixed --1078:2:aspacem 1: 0004000000-00617d1fff 1495m --1078:2:aspacem 2: RSVN 00617d2000-00617d2fff 4096 ----- SmFixed --1078:2:aspacem 3: 00617d3000-00befa3fff 1495m --1078:2:aspacem 4: RSVN 00befa4000-00ffffffff 1040m ----- SmFixed --1078:2:aspacem >>> --1078:2:aspacem Reading /proc/self/maps --1078:2:aspacem <<< SHOW_SEGMENTS: With contents of /proc/self/maps (13 segments, 1 segnames) --1078:2:aspacem ( 0) /home/administrator/valgrind/lib/valgrind/memcheck-arm-linux --1078:2:aspacem 0: RSVN 0000000000-0003ffffff 64m ----- SmFixed --1078:2:aspacem 1: 0004000000-0037ffffff 832m --1078:2:aspacem 2: FILE 0038000000-003822afff 2273280 r-x-- d=0x1f02 i=3783 o=32768 (0) --1078:2:aspacem 3: 003822b000-0038231fff 28672 --1078:2:aspacem 4: FILE 0038232000-0038233fff 8192 rwx-- d=0x1f02 i=3783 o=2301952 (0) --1078:2:aspacem 5: ANON 0038234000-0038d25fff 10m rwx-- --1078:2:aspacem 6: 0038d26000-00617d1fff 650m --1078:2:aspacem 7: RSVN 00617d2000-00617d2fff 4096 ----- SmFixed --1078:2:aspacem 8: 00617d3000-00bef8ffff 1495m --1078:2:aspacem 9: ANON 00bef90000-00befa4fff 86016 rwx-- --1078:2:aspacem 10: RSVN 00befa5000-00fffeffff 1040m ----- SmFixed --1078:2:aspacem 11: anon 00ffff0000-00ffff0fff 4096 r-x-- --1078:2:aspacem 12: RSVN 00ffff1000-00ffffffff 61440 ----- SmFixed --1078:2:aspacem >>> --1078:1:main Address space manager is running --1078:1:main Starting the dynamic memory manager --1078:1:mallocfr newSuperblock at 0x617D3000 (pszB 4194288) owner VALGRIND/tool --1078:1:main Dynamic memory manager is running --1078:1:main Initialise m_debuginfo --1078:1:main VG_(libdir) = /home/administrator/valgrind/lib/valgrind --1078:1:main Getting launcher's name ... --1078:1:main ... /home/administrator/valgrind/bin/valgrind --1078:1:main Get hardware capabilities ... --1078:1:machine ARMv7 VFP 0 VFP2 0 VFP3 0 NEON 0 --1078:1:main ... arch = ARM, hwcaps = ARMv7 --1078:1:main Getting the working directory at startup --1078:1:main ... /home/administrator/valgrind --1078:1:main Split up command line --1078:1:main (early_) Process Valgrind's command line options --1078:1:main Create initial image --1078:1:initimg Loading client --1078:1:initimg Setup client env --1078:2:initimg preload_string: --1078:2:initimg "/home/administrator/valgrind/lib/valgrind/vgpreload_core-arm-linux.so:/home/administrator/valgrind/lib/valgrind/vgpreload_memcheck-ar" --1078:1:initimg Setup client stack: size will be 8388608 --1078:2:initimg ARM has-neon from-auxv: NO --1078:2:initimg Client info: initial_IP=0x40007E0 initial_TOC=0x0 brk_base=0x11000 --1078:2:initimg Client info: initial_SP=0xBDFA4D40 max_stack_size=8388608 --1078:1:initimg Setup client data (brk) segment --1078:1:main Setup file descriptors --1078:1:main Create fake /proc/<pid>/cmdline --1078:1:main Initialise the tool part 1 (pre_clo_init) --1078:1:mallocfr newSuperblock at 0x61BD3000 (pszB 1048560) owner VALGRIND/exectxt --1078:1:main Print help and quit, if requested --1078:1:main (main_) Process Valgrind's command line options, setup logging --1078:1:mallocfr newSuperblock at 0x61CD3000 (pszB 1048560) owner VALGRIND/core --1078:1:main Print the preamble... ==1078== Memcheck, a memory error detector ==1078== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==1078== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==1078== Command: /root/valgrind_example ==1078== --1078-- Valgrind options: --1078-- -v --1078-- -v --1078-- -d --1078-- -d --1078-- Contents of /proc/version: --1078-- Linux version 2.6.31-203-gee1fdae (root@intermec5) (gcc version 4.1.2) #118 PREEMPT Thu Mar 17 13:56:25 IST 2011 --1078-- Arch and hwcaps: ARM, ARMv7 --1078-- Page sizes: currently 4096, max supported 4096 --1078-- Valgrind library directory: /home/administrator/valgrind/lib/valgrind --1078:1:main ...finished the preamble --1078:1:main Initialise the tool part 2 (post_clo_init) --1078:1:main Initialise TT/TC --1078-- TT/TC: VG_(init_tt_tc) (startup of code management) --1078-- TT/TC: cache: 8 sectors of 24189984 bytes each = 193519872 total --1078-- TT/TC: table: 524168 total entries, max occupancy 340704 (65%) --1078:2:transtab cache: 8 sectors of 24189984 bytes each = 193519872 total --1078:2:transtab table: 524168 total entries, max occupancy 340704 (65%) --1078:1:main Initialise redirects --1078:1:mallocfr newSuperblock at 0x61E4E000 (pszB 1048560) owner VALGRIND/dinfo --1078:1:main Load initial debug info --1078-- Reading syms from /root/valgrind_example (0x8000) --1078-- svma 0x00000082f8, avma 0x00000082f8 --1078-- Reading syms from /lib/ld-2.5.so (0x4000000) --1078-- svma 0x00000007e0, avma 0x00040007e0 Segmentation fault Thanks & Regards, Zaahir Khan |
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-05-04 12:57:32
|
Hi /home/administrator/valgrind$ bin/valgrind -v -v -d -d > /root/valgrind_example > Can you try to move the program to more accessible directory such as /home/administrator and retry? > --1078-- Reading syms from /root/valgrind_example (0x8000) > --1078-- svma 0x00000082f8, avma 0x00000082f8 > --1078-- Reading syms from /lib/ld-2.5.so (0x4000000) > --1078-- svma 0x00000007e0, avma 0x00040007e0 > Segmentation fault > > Try to use strace to know at which address the fault come from. p/s : What system do you use to run valgrind? (ubuntu, android etc) -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Zaahir K. <kn....@gm...> - 2011-05-05 08:19:54
|
Hi,
Thanks Wan Mohd Fairuz Wan Ismail for your reply.
I am running valgrind on ARM based freescale iMX25 3 stack board.
Linux version 2.6.31.
I have moved the program more a accessible directory but result is same.
starce log :
munmap(0x401c000, 8192) = 0
stat64("/lib/ld-2.5.so", {st_mode=S_IFREG|0755, st_size=157500, ...}) = 0
open("/lib/ld-2.5.so", O_RDONLY|O_NOFOLLOW) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\340\7\0"...,
1024) = 1024
close(3) = 0
stat64("/lib/ld-2.5.so", {st_mode=S_IFREG|0755, st_size=157500, ...}) = 0
open("/lib/ld-2.5.so", O_RDONLY|O_NOFOLLOW) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\340\7\0"...,
1024) = 1024
close(3) = 0
open("/lib/ld-2.5.so", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0755, st_size=157500, ...}) = 0
mmap2(0x4825000, 157500, PROT_READ, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x4825000
fstat64(3, {st_mode=S_IFREG|0755, st_size=157500, ...}) = 0
readlink("/proc/self/fd/3", "/lib/ld-2.5.so", 4096) = 14
close(3) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 703 detached
Memory mapping:
cat /proc/iomem
43f90000-43f90fff : serial_mxc
43f94000-43f94fff : serial_mxc
43fa4000-43fa4fff : mxc_spi.0
43fa4000-43fa4fff : mxc_spi
50030000-50031000 : imx_adc.0
50038000-50038fff : fec.0
50038000-50038fff : fec
53fb4000-53fb4fff : mxsdhci.0
53fb4000-53fb4fff : mxsdhci
53fb8000-53fb8fff : mxsdhci.1
53ff0000-53ff0fff : mxc_iim.0
53ff4000-53ff41ff : fsl-usb2-udc
53ff4000-53ff41ff : fsl-ehci.1
53ff4000-53ff41ff : ehci_hcd
53ff4400-53ff45ff : fsl-ehci.0
53ff4400-53ff45ff : ehci_hcd
53ffc000-53ffc040 : imxdi_rtc.0
53ffc000-53ffc040 : imxdi_rtc
80000000-83ffffff : System RAM
80025000-8033ffff : Kernel text
8035a000-803be94b : Kernel data
Any help highly apperetiated.
Thanks & regards,
Zaahir Khan
On Wed, May 4, 2011 at 6:27 PM, Wan Mohd Fairuz Wan Ismail
<wan...@mc...> wrote:
> Hi
>
>
>> /home/administrator/valgrind$ bin/valgrind -v -v -d -d
>> /root/valgrind_example
>
> Can you try to move the program to more accessible directory such as
> /home/administrator and retry?
>>
>> --1078-- Reading syms from /root/valgrind_example (0x8000)
>> --1078-- svma 0x00000082f8, avma 0x00000082f8
>> --1078-- Reading syms from /lib/ld-2.5.so (0x4000000)
>> --1078-- svma 0x00000007e0, avma 0x00040007e0
>> Segmentation fault
>>
>
> Try to use strace to know at which address the fault come from.
> p/s : What system do you use to run valgrind? (ubuntu, android etc)
>
>
> --
> Wan Mohd Fairuz WAN ISMAIL
>
>
>
|
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-05-05 08:26:15
|
Hi, Did the test program works it you execute it without valgrind? ( /home/administrator/valgrind_example). --- SIGSEGV (Segmentation fault) @ 0 (0) --- > +++ killed by SIGSEGV +++ > Process 703 detached > > -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Zaahir K. <kn....@gm...> - 2011-05-05 09:13:29
|
Hi, Thanks for your support. No it was with valgrind. Without valgrind bin valgrind_example is not using /lib/ld-2.5.so linker. Thanks & regards, Zaahir Khan On Thu, May 5, 2011 at 1:56 PM, Wan Mohd Fairuz Wan Ismail <wan...@mc...> wrote: > Hi, > Did the test program works it you execute it without valgrind? ( > /home/administrator/valgrind_example). >> >> --- SIGSEGV (Segmentation fault) @ 0 (0) --- >> +++ killed by SIGSEGV +++ >> Process 703 detached >> > > > -- > Wan Mohd Fairuz WAN ISMAIL > > |
|
From: Wan M. F. W. I. <wan...@mc...> - 2011-05-05 12:26:22
|
Hi, I cross compiled valgrind using arm-none-linux-gnueabi from codesourcery and have no problem running it on an Ubuntu ARM machine. Do you run Ubuntu too? This is my configuration to build Valgrind: CC=arm-none-linux-gnueabi-gcc CFLAGS="-pipe -Os -mtune=cortex-a9 -march=armv7-a -mabi=aapcs-linux -msoft-float -DANDROID -static -I/apps/codesourcery/arm-gcc/arm-2010q1-202/arm-none-linux-gnueabi/libc/usr/include" LDFLAGS="-L/apps/codesourcery/arm-gcc/arm-2010q1-202/arm-none-linux-gnueabi/libc/usr/lib" ./configure --prefix=/opt/valgrind --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi --build=i386-ubuntu-linux --with-tmpdir=/tmp On Thu, May 5, 2011 at 11:13 AM, Zaahir Khan <kn....@gm...> wrote: > Hi, > > Thanks for your support. > > No it was with valgrind. Without valgrind bin valgrind_example is not > using /lib/ld-2.5.so linker. > > Thanks & regards, > > Zaahir Khan > > > > On Thu, May 5, 2011 at 1:56 PM, Wan Mohd Fairuz Wan Ismail > <wan...@mc...> wrote: > > Hi, > > Did the test program works it you execute it without valgrind? ( > > /home/administrator/valgrind_example). > >> > >> --- SIGSEGV (Segmentation fault) @ 0 (0) --- > >> +++ killed by SIGSEGV +++ > >> Process 703 detached > >> > > > > > > -- > > Wan Mohd Fairuz WAN ISMAIL > > > > > -- Wan Mohd Fairuz WAN ISMAIL |
|
From: Zaahir K. <kn....@gm...> - 2011-05-05 13:41:54
|
Hi, Thanks for your support. I am running valgrind on ARM based embedded board from freescale. I am cross compiling valgrind code on ubuntu PC. This board is ARMv5. Does valgrind support for ARMv5? I am configuring as below, is it correct way to do? CC=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc AR=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-ar ./configure --prefix=/valgrind --host=arm-none-linux-gnueabi --build=i386-ubuntu-linux --target=arm-none-linux-gnueabi Thanks & regards, Zaahir Khan On Thu, May 5, 2011 at 5:56 PM, Wan Mohd Fairuz Wan Ismail <wan...@mc...> wrote: > Hi, > I cross compiled valgrind using arm-none-linux-gnueabi from codesourcery and > have no problem running it on an Ubuntu ARM machine. Do you run Ubuntu too? > This is my configuration to build Valgrind: > CC=arm-none-linux-gnueabi-gcc CFLAGS="-pipe -Os -mtune=cortex-a9 > -march=armv7-a -mabi=aapcs-linux -msoft-float -DANDROID -static > -I/apps/codesourcery/arm-gcc/arm-2010q1-202/arm-none-linux-gnueabi/libc/usr/include" > LDFLAGS="-L/apps/codesourcery/arm-gcc/arm-2010q1-202/arm-none-linux-gnueabi/libc/usr/lib" > ./configure --prefix=/opt/valgrind --host=arm-none-linux-gnueabi > --target=arm-none-linux-gnueabi --build=i386-ubuntu-linux --with-tmpdir=/tmp > > > > On Thu, May 5, 2011 at 11:13 AM, Zaahir Khan <kn....@gm...> wrote: >> >> Hi, >> >> Thanks for your support. >> >> No it was with valgrind. Without valgrind bin valgrind_example is not >> using /lib/ld-2.5.so linker. >> >> Thanks & regards, >> >> Zaahir Khan >> >> >> >> On Thu, May 5, 2011 at 1:56 PM, Wan Mohd Fairuz Wan Ismail >> <wan...@mc...> wrote: >> > Hi, >> > Did the test program works it you execute it without valgrind? ( >> > /home/administrator/valgrind_example). >> >> >> >> --- SIGSEGV (Segmentation fault) @ 0 (0) --- >> >> +++ killed by SIGSEGV +++ >> >> Process 703 detached >> >> >> > >> > >> > -- >> > Wan Mohd Fairuz WAN ISMAIL >> > >> > > > > > -- > Wan Mohd Fairuz WAN ISMAIL > > |