|
From: Nishant S. <ns...@in...> - 2006-05-02 15:04:42
|
Hello,
I was trying to compile valgrind 3.1.1 for a powerpc
target using gcc2.96. Compilation
seems to go fine but the build process conks while linking saying :
make[4]: Leaving directory `/home/nsharma/valgrind-3.1.1/VEX'
/opt/eldk/usr/bin/ppc_82xx-gcc -O -g -Wmissing-prototypes -Winline
-Wall -Wshadow -Wpointer-arith -Wstrict-prototypes
-Wmissing-declarations -Wno-long-long -o memcheck-ppc32-linux -static
-Wl,-defsym,valt_load_address=0x70000000 -nodefaultlibs -nostartfiles -u
_start -Wl,-T,../valt_load_address_ppc32_linux.lds
memcheck_ppc32_linux-mac_leakcheck.o
memcheck_ppc32_linux-mac_malloc_wrappers.o
memcheck_ppc32_linux-mc_main.o memcheck_ppc32_linux-mac_shared.o
memcheck_ppc32_linux-mc_translate.o
../coregrind/libcoregrind_ppc32_linux.a ../VEX/libvex_ppc32_linux.a -lgcc
memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_4':
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: undefined reference
to `__builtin_expect'
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: undefined reference
to `__builtin_expect'
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
memcheck_ppc32_linux-mc_main.o: In function `vgMAC_die_mem_stack_4':
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: undefined reference
to `__builtin_expect'
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: undefined reference
to `__builtin_expect'
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8':
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: undefined reference
to `__builtin_expect'
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
memcheck_ppc32_linux-mc_main.o:/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887:
more undefined references to `__builtin_expect' follow
memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8':
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation
truncated to fit: R_PPC_REL24 __builtin_expect
...
I am using Denx distribution (gcc2.96) to cross-compile valgrind for
my target machine which runs
linux 2.4.20 , glibc 2.2. My configure command line was :
./configure --host=ppc-linux --disable-tls
CC=/opt/eldk/usr/bin/ppc_82xx-gcc --libdir=/tmp/
TIA
nishant
|
|
From: Tim G. <tg...@sh...> - 2006-05-02 15:29:21
|
I do not know whether this relates to your error message, but 2.96 never was an official release of gcc. It was a patch from RedHat and it was very buggy, producing no or wrong binaries. Use a different compiler! -- Tim Gruene Institut fuer anorganische Chemie Tammannstr. 4 D-37077 Goettingen GPG Key ID = A46BEE1A On Tue, 2 May 2006, Nishant Sharma wrote: > Hello, > I was trying to compile valgrind 3.1.1 for a powerpc > target using gcc2.96. Compilation > seems to go fine but the build process conks while linking saying : > > make[4]: Leaving directory `/home/nsharma/valgrind-3.1.1/VEX' > /opt/eldk/usr/bin/ppc_82xx-gcc -O -g -Wmissing-prototypes -Winline > -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes > -Wmissing-declarations -Wno-long-long -o memcheck-ppc32-linux -static > -Wl,-defsym,valt_load_address=0x70000000 -nodefaultlibs -nostartfiles -u > _start -Wl,-T,../valt_load_address_ppc32_linux.lds > memcheck_ppc32_linux-mac_leakcheck.o > memcheck_ppc32_linux-mac_malloc_wrappers.o > memcheck_ppc32_linux-mc_main.o memcheck_ppc32_linux-mac_shared.o > memcheck_ppc32_linux-mc_translate.o > ../coregrind/libcoregrind_ppc32_linux.a ../VEX/libvex_ppc32_linux.a -lgcc > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_4': > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: undefined reference > to `__builtin_expect' > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: undefined reference > to `__builtin_expect' > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_die_mem_stack_4': > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: undefined reference > to `__builtin_expect' > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: undefined reference > to `__builtin_expect' > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8': > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: undefined reference > to `__builtin_expect' > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > memcheck_ppc32_linux-mc_main.o:/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887: > more undefined references to `__builtin_expect' follow > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8': > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation > truncated to fit: R_PPC_REL24 __builtin_expect > ... > > > I am using Denx distribution (gcc2.96) to cross-compile valgrind for > my target machine which runs > linux 2.4.20 , glibc 2.2. My configure command line was : > ./configure --host=ppc-linux --disable-tls > CC=/opt/eldk/usr/bin/ppc_82xx-gcc --libdir=/tmp/ > > TIA > nishant > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > |
|
From: Nishant S. <ns...@in...> - 2006-05-02 15:33:47
|
From the 3.1.1 release notes it seems that a PR to this effect has been fixed : 120658 Build fixes for gcc 2.96 am i not supposed to believe that ? Tim Gruene wrote: >I do not know whether this relates to your error message, but 2.96 never >was an official release of gcc. It was a patch from RedHat and it was very >buggy, producing no or wrong binaries. Use a different compiler! > > > >-- >Tim Gruene >Institut fuer anorganische Chemie >Tammannstr. 4 >D-37077 Goettingen > >GPG Key ID = A46BEE1A > > >On Tue, 2 May 2006, Nishant Sharma wrote: > > > >> Hello, >> I was trying to compile valgrind 3.1.1 for a powerpc >>target using gcc2.96. Compilation >> seems to go fine but the build process conks while linking saying : >> >>make[4]: Leaving directory `/home/nsharma/valgrind-3.1.1/VEX' >>/opt/eldk/usr/bin/ppc_82xx-gcc -O -g -Wmissing-prototypes -Winline >>-Wall -Wshadow -Wpointer-arith -Wstrict-prototypes >>-Wmissing-declarations -Wno-long-long -o memcheck-ppc32-linux -static >>-Wl,-defsym,valt_load_address=0x70000000 -nodefaultlibs -nostartfiles -u >>_start -Wl,-T,../valt_load_address_ppc32_linux.lds >>memcheck_ppc32_linux-mac_leakcheck.o >>memcheck_ppc32_linux-mac_malloc_wrappers.o >>memcheck_ppc32_linux-mc_main.o memcheck_ppc32_linux-mac_shared.o >>memcheck_ppc32_linux-mc_translate.o >>../coregrind/libcoregrind_ppc32_linux.a ../VEX/libvex_ppc32_linux.a -lgcc >>memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_4': >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: undefined reference >>to `__builtin_expect' >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: undefined reference >>to `__builtin_expect' >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>memcheck_ppc32_linux-mc_main.o: In function `vgMAC_die_mem_stack_4': >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: undefined reference >>to `__builtin_expect' >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:830: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: undefined reference >>to `__builtin_expect' >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:842: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8': >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: undefined reference >>to `__builtin_expect' >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:875: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>memcheck_ppc32_linux-mc_main.o:/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887: >>more undefined references to `__builtin_expect' follow >>memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_8': >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:887: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:799: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>/home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: relocation >>truncated to fit: R_PPC_REL24 __builtin_expect >>... >> >> >> I am using Denx distribution (gcc2.96) to cross-compile valgrind for >>my target machine which runs >> linux 2.4.20 , glibc 2.2. My configure command line was : >> ./configure --host=ppc-linux --disable-tls >>CC=/opt/eldk/usr/bin/ppc_82xx-gcc --libdir=/tmp/ >> >>TIA >>nishant >> >> >> >>------------------------------------------------------- >>Using Tomcat but need to do more? Need to support web services, security? >>Get stuff done quickly with pre-integrated technology to make your job easier >>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>_______________________________________________ >>Valgrind-users mailing list >>Val...@li... >>https://lists.sourceforge.net/lists/listinfo/valgrind-users >> >> >> > > > |
|
From: Igmar P. <mai...@jd...> - 2006-05-03 06:32:12
|
> From the 3.1.1 release notes it seems that a PR to this effect has been > fixed : > 120658 Build fixes for gcc 2.96 > am i not supposed to believe that ? That still doesn't resolve the issue that 2.96 is an extremely crappy compiler which has known issues of miscompiling code. What is the reason for not doing the upgrade ? Igmar |
|
From: Igmar P. <mai...@jd...> - 2006-05-02 15:33:01
|
> I was trying to compile valgrind 3.1.1 for a powerpc > target using gcc2.96. Yuck. Please use a decent compiler, gcc 2.96 is known to be (extremely) buggy. > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_4': > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: undefined reference > to `__builtin_expect' Your version of gcc doesn't support this. The best thing to do is upgrade it to a gcc 3.x.x release, which should solve your build problems (and probably a lot of other gcc 2.96 related problems). Igmar |
|
From: Julian S. <js...@ac...> - 2006-05-02 17:11:16
|
> > memcheck_ppc32_linux-mc_main.o: In function `vgMAC_new_mem_stack_4': > > /home/nsharma/valgrind-3.1.1/memcheck/mc_main.c:787: undefined reference > > to `__builtin_expect' > > Your version of gcc doesn't support this. The best thing to do is upgrade > it to a gcc 3.x.x release, which should solve your build problems (and > probably a lot of other gcc 2.96 related problems). True; however in the meantime in mc_main.c find this #define EXPECTED_TAKEN(cond) __builtin_expect((cond),1) #define EXPECTED_NOT_TAKEN(cond) __builtin_expect((cond),0) and change them both to #define EXPECTED_TAKEN(cond) (cond) #define EXPECTED_NOT_TAKEN(cond) (cond) J |
|
From: Nishant S. <ns...@in...> - 2006-05-03 06:03:43
|
Julian Seward wrote: >> >>True; however in the meantime in mc_main.c find this >> >>#define EXPECTED_TAKEN(cond) __builtin_expect((cond),1) >>#define EXPECTED_NOT_TAKEN(cond) __builtin_expect((cond),0) >> >>and change them both to >> >>#define EXPECTED_TAKEN(cond) (cond) >>#define EXPECTED_NOT_TAKEN(cond) (cond) >> >>J >> >> >> Thanks, it compiles fine now, however it crashes on PPC target. A problem to this effect has already been reported : http://sourceforge.net/mailarchive/forum.php?thread_id=10079534&forum_id=32038 though on a QEMU image. What I see is : ./valgrind /bin/ls ==795== Memcheck, a memory error detector. ==795== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. ==795== Using LibVEX rev 1575, a library for dynamic binary translation. ==795== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. ==795== Using valgrind-3.1.1, a dynamic binary instrumentation framework. ==795== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==795== For more details, rerun with: -v ==795== ==795== ==795== Process terminating with default action of signal 11 (SIGSEGV) ==795== Bad permissions for mapped region at address 0x4024BF4 ==795== at 0x4024BF4: ??? ==795== by 0x40100E4: (within /lib/ld-2.2.5.so) ==795== ==795== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==795== malloc/free: in use at exit: 0 bytes in 0 blocks. ==795== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==795== For counts of detected errors, rerun with: -v ==795== All heap blocks were freed -- no leaks are possible. Segmentation fault I had already done what Julian had asked for in the above mentioned thread, however the crash persists. Are there any workarounds ? I am having a 2.4.20 kernel running on target with glibc 2.2 (and ofcourse crosscompiled valgrind with gcc2.96 ;)). >>------------------------------------------------------- >>Using Tomcat but need to do more? Need to support web services, security? >>Get stuff done quickly with pre-integrated technology to make your job easier >>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>_______________________________________________ >>Valgrind-users mailing list >>Val...@li... >>https://lists.sourceforge.net/lists/listinfo/valgrind-user >> >> |
|
From: Igmar P. <mai...@jd...> - 2006-05-03 06:36:34
|
> Thanks, it compiles fine now, however it crashes on PPC target. A > problem to this effect > has already been reported : > > http://sourceforge.net/mailarchive/forum.php?thread_id=10079534&forum_id=32038 Looks unrelated to me, this was a issue of a CPU feature detection not working as intended AFAIK. > though on a QEMU image. What I see is : > ./valgrind /bin/ls > ==795== Memcheck, a memory error detector. > ==795== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al. > ==795== Using LibVEX rev 1575, a library for dynamic binary translation. > ==795== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP. > ==795== Using valgrind-3.1.1, a dynamic binary instrumentation framework. > ==795== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. > ==795== For more details, rerun with: -v > ==795== > ==795== > ==795== Process terminating with default action of signal 11 (SIGSEGV) > ==795== Bad permissions for mapped region at address 0x4024BF4 > ==795== at 0x4024BF4: ??? > ==795== by 0x40100E4: (within /lib/ld-2.2.5.so) > ==795== > ==795== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) > ==795== malloc/free: in use at exit: 0 bytes in 0 blocks. > ==795== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. > ==795== For counts of detected errors, rerun with: -v > ==795== All heap blocks were freed -- no leaks are possible. > Segmentation fault > > I had already done what Julian had asked for in the above mentioned > thread, however the > crash persists. Are there any workarounds ? I am having a 2.4.20 kernel > running on target > with glibc 2.2 (and ofcourse crosscompiled valgrind with gcc2.96 ;)). You might want to try a strace of the binary and post it here, so someone can look at what is actually going on. Igmar |
|
From: Nishant S. <ns...@in...> - 2006-05-03 07:14:32
|
Igmar Palsenberg wrote: >>reported : >> >>http://sourceforge.net/mailarchive/forum.php?thread_id=10079534&forum_id=32038 >> > >Looks unrelated to me, this was a issue of a CPU feature detection not >working as intended AFAIK. > >> >>==795== Process terminating with default action of signal 11 (SIGSEGV) >>==795== Bad permissions for mapped region at address 0x4024BF4 >>==795== at 0x4024BF4: ??? >>==795== by 0x40100E4: (within /lib/ld-2.2.5.so) >>==795== >>==795== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) >>==795== malloc/free: in use at exit: 0 bytes in 0 blocks. >>==795== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. >>==795== For counts of detected errors, rerun with: -v >>==795== All heap blocks were freed -- no leaks are possible. >>Segmentation fault >> >>You might want to try a strace of the binary and post it here, so someone >>can look at what is actually going on. >> As you had asked for, I have two outputs one with a verbose flag turned on and other one a stack trace . The verbose output (on doing valgrind /bin/ls)is : ==858== Using valgrind-3.1.1, a dynamic binary instrumentation framework. ==858== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al. ==858== --858-- Command line --858-- /bin/ls --858-- Startup, with flags: --858-- -v --858-- Contents of /proc/version: --858-- Linux version 2.4.20-denx-tejas-TJMC16_XPCx_LINUX_04p1 (shebbar@earth) (gcc version 2.95.4 20010319 (prerelease/franzo/20011204)) #2 Mon Dec 27 09:44:22 IST 2004 --858-- Arch and subarch: PPC32, ppc32-int-and-fp --858-- Valgrind library directory: /tmp//valgrind --858-- Reading syms from /lib/ld-2.2.5.so (0x4000000) --858-- object doesn't have a symbol table --858-- Reading syms from /bin/busybox (0x10000000) --858-- object doesn't have a symbol table --858-- Reading syms from /var/tmp/valgrind/ppc32-linux/memcheck (0x70000000) --858-- object doesn't have a dynamic symbol table --858-- Reading suppressions file: /tmp//valgrind/default.supp ==858== ==858== Process terminating with default action of signal 11 (SIGSEGV) ==858== Bad permissions for mapped region at address 0x4024BF4 ==858== at 0x4024BF4: ??? ==858== by 0x40100E4: (within /lib/ld-2.2.5.so) ==858== ==858== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) ==858== malloc/free: in use at exit: 0 bytes in 0 blocks. ==858== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==858== ==858== All heap blocks were freed -- no leaks are possible. --858-- memcheck: sanity checks: 0 cheap, 1 expensive --858-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --858-- memcheck: auxmaps: 0 searches, 0 comparisons --858-- memcheck: secondaries: 7 issued (448k, 0M) --858-- memcheck: secondaries: 4 accessible and distinguished (256k, 0M) --858-- tt/tc: 5 tt lookups requiring 4 probes --858-- tt/tc: 4 fast-cache updates, 2 flushes --858-- translate: new 2 (100 -> 1,104; ratio 110:10) [0 scs] --858-- translate: dumped 0 (0 -> ??) --858-- translate: discarded 0 (0 -> ??) --858-- scheduler: 2 jumps (bb entries). --858-- scheduler: 0/3 major/minor sched events. --858-- sanity: 1 cheap, 1 expensive checks. --858-- exectx: 30,011 lists, 0 contexts (avg 0 per list) --858-- exectx: 0 searches, 0 full compares (0 per 1000) --858-- exectx: 0 cmp2, 0 cmp4, 0 cmpAll Segmentation fault ------------------------------------------------------ The strace of the same is (relevant crash area is ) : read(3, "#", 1) = 1 read(3, "#", 1) = 1 read(3, "\n", 1) = 1 read(3, "", 1) = 0 close(3) = 0 mmap2(0x4267f000, 81920, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x4267f000 mprotect(0x4267f000, 8192, PROT_NONE) = 0 mprotect(0x42691000, 8192, PROT_NONE) = 0 gettid() = 870 read(1017, "T", 2) = 1 gettid() = 870 getpid() = 870 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 mmap2(0x42693000, 20127744, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x42693000 mmap2(0x439c5000, 5241680, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x439c5000 mmap2(0x43ec5000, 65536, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, 0, 0) = 0x43ec5000 ugetrlimit(0x4, 0x42690cb8) = 0 write(1016, "==", 2==) = 2 getpid() = 870 write(1016, "870== ", 6870== ) = 6 write(1016, "\n", 1 ) = 1 write(1016, "==", 2==) = 2 getpid() = 870 write(1016, "870== ", 6870== ) = 6 write(1016, "Process terminating with default"..., 62Process terminating with default action of signal 11 (SIGSEGV) write(1016, "\n", 1 ) = 1 write(1016, "==", 2==) = 2 getpid() = 870 write(1016, "870== ", 6870== ) = 6 write(1016, " Bad permissions for mapped regi"..., 55 Bad permissions for mapped region at address 0x4024BF4) = 55 write(1016, "\n", 1 ) = 1 write(1016, "==", 2==) = 2 getpid() = 870 write(1016, "870== ", 6870== ) = 6 write(1016, " at 0x4024BF4: ???", 20 at 0x4024BF4: ???) = 20 write(1016, "\n", 1 ) = 1 write(1016, "==", 2==) = 2 getpid() = 870 write(1016, "870== ", 6870== ) = 6 write(1016, " by 0x40100E4: (within /lib/ld"..., 42 by 0x40100E4: (within /lib/ld-2.2.5.so)) = 42 write(1016, "\n", 1 ) = 1 rt_sigprocmask(SIG_SETMASK, ~[], ~[ILL TRAP BUS FPE KILL SEGV STOP], 8) = 0 rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP BUS FPE KILL SEGV STOP], NULL, 8) = 0 tia nishant >>------------------------------------------------------- >>Using Tomcat but need to do more? Need to support web services, security? >>Get stuff done quickly with pre-integrated technology to make your job easier >>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>_______________________________________________ >>Valgrind-users mailing list >>Val...@li... >>https://lists.sourceforge.net/lists/listinfo/valgrind-users >> >> >> |
|
From: Igmar P. <mai...@jd...> - 2006-05-03 08:27:56
|
> The strace of the same is (relevant crash area is ) : Can you put the whole trace online somewhere ? It looks like the dynamic loader is in a non-exec segment or something like that, and I want to know in what segment the faulting address falls. The contents of /proc/self/maps is also usefull, which can be obtained by running valgrind with the -d argument. I've seen multiple occurances of this using glibc 2.2.x, but I have no idea if that is platform-specific. Igmar |
|
From: Nishant S. <ns...@in...> - 2006-05-03 09:18:44
Attachments:
valgrind_log.gz
|
Igmar Palsenberg wrote: >> The strace of the same is (relevant crash area is ) : >> >> > >Can you put the whole trace online somewhere ? It looks like the dynamic >loader is in a non-exec segment or something like that, and I want to know >in what segment the faulting address falls. > >The contents of /proc/self/maps is also usefull, which can be obtained by >running valgrind with the -d argument. I've seen multiple occurances of >this using glibc 2.2.x, but I have no idea if that is platform-specific. > > > Just attached the gzipped log file of the straced valgrind session .. nishant > > Igmar > > >------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Valgrind-users mailing list >Val...@li... >https://lists.sourceforge.net/lists/listinfo/valgrind-users > > > |
|
From: Nishant S. <ns...@in...> - 2006-05-03 09:30:32
|
>>
>> The contents of /proc/self/maps is also usefull, which can be
>> obtained by running valgrind with the -d argument. I've seen multiple
>> occurances of this using glibc 2.2.x, but I have no idea if that is
>> platform-specific.
>>
>
Valgrind output with -d flag :
--1614:1:debuglog DebugLog system started by Stage 1, level 1 logging
requested
--1614:1:launcher no tool requested, defaulting to 'memcheck'
--1614:1:launcher no platform detected, defaulting platform to 'ppc32-linux'
--1614:1:launcher launching /tmp//valgrind/ppc32-linux/memcheck
--1614:1:debuglog DebugLog system started by Stage 2 (main), level 1
logging requested
--1614:1:main Welcome to Valgrind version 3.1.1 debug logging
--1614:1:main Checking current stack is plausible
--1614:1:main Checking initial stack was noted
--1614:1:main Starting the address space manager
--1614:1:main Address space manager is running
--1614:1:main Starting the dynamic memory manager
--1614:1:mallocfr newSuperblock at 0x42001000 (pszB 1048560) owner
VALGRIND/tool
--1614:1:main Dynamic memory manager is running
--1614:1:main Getting stage1's name
--1614:1:main Get hardware capabilities ...
--1614:1:main ... arch = PPC32, subarch = ppc32-int-and-fp
--1614:1:main Split up command line
--1614:1:main Preprocess command line opts
--1614:1:main Loading client
--1614:1:main Setup client env
--1614:1:main Setup client stack
--1614:1:main Setup client data (brk) segment
--1614:1:main Setup file descriptors
--1614:1:main Create fake /proc/<pid>/cmdline
--1614:1:main Initialise the tool part 1 (pre_clo_init)
--1614:1:main Print help and quit, if requested
--1614:1:main Process Valgrind's command line options, setup logging
--1614:1:mallocfr newSuperblock at 0x42101000 (pszB 1048560) owner
VALGRIND/core
--1614:1:main Print the preamble...
==1614== Memcheck, a memory error detector.
==1614== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==1614== Using LibVEX rev 1575, a library for dynamic binary translation.
==1614== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==1614== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==1614== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==1614== For more details, rerun with: -v
==1614==
--1614:1:main ...finished the preamble
--1614:1:main Initialise the tool part 2 (post_clo_init)
--1614:1:main Initialise TT/TC
--1614:1:main Initialise redirects
--1614:1:mallocfr newSuperblock at 0x42201000 (pszB 1048560) owner
VALGRIND/symtab
--1614:1:main Load initial debug info
--1614:1:mallocfr newSuperblock at 0x42301000 (pszB 1048560) owner
VALGRIND/symtab
--1614:1:mallocfr newSuperblock at 0x42401000 (pszB 1048560) owner
VALGRIND/symtab
--1614:1:mallocfr newSuperblock at 0x42501000 (pszB 1048560) owner
VALGRIND/symtab
--1614:1:redir transfer ownership V -> C of 0x70028000 .. 0x70028FFF
--1614:1:main Tell tool about initial permissions
--1614:1:main Initialise scheduler
--1614:1:main Initialise thread 1's state
--1614:1:main Initialise signal management --1614:1:main Load
suppressions
--1614:1:main
--1614:1:main
--1614:1:aspacem <<< SHOW_SEGMENTS: Memory layout at client startup (27
segments, 3 segnames)
--1614:1:aspacem ( 0) /var/tmp/valgrind/ppc32-linux/memcheck
--1614:1:aspacem ( 1) /bin/busybox
--1614:1:aspacem ( 2) /lib/ld-2.2.5.so
--1614:1:aspacem 0: RSVN 0000000000-0003FFFFFF 64m ----- SmFixed
--1614:1:aspacem 1: file 0004000000-0004012FFF 77824 r-x-- d=0x1F02
i=977784 o=0 (2)
--1614:1:aspacem 2: 0004013000-0004021FFF 61440
--1614:1:aspacem 3: file 0004022000-0004025FFF 16384 rw--- d=0x1F02
i=977784 o=73728 (2)
--1614:1:aspacem 4: 0004026000-000FFFFFFF 191m
--1614:1:aspacem 5: file 0010000000-001003CFFF 249856 r-x-- d=0x1F02
i=340832 o=0 (1)
--1614:1:aspacem 6: 001003D000-001004BFFF 61440
--1614:1:aspacem 7: file 001004C000-001004DFFF 8192 rw--- d=0x1F02
i=340832 o=245760 (1)
--1614:1:aspacem 8: anon 001004E000-0010057FFF 40960 rw---
--1614:1:aspacem 9: anon 0010058000-0010058FFF 4096 rwx--
--1614:1:aspacem 10: RSVN 0010059000-0010857FFF 8384512 ----- SmLower
--1614:1:aspacem 11: 0010858000-0041FFFFFF 791m
--1614:1:aspacem 12: RSVN 0042000000-0042000FFF 4096 ----- SmFixed
--1614:1:aspacem 13: ANON 0042001000-004267EFFF 6807552 rwx--
--1614:1:aspacem 14: 004267F000-006FFFFFFF 729m
--1614:1:aspacem 15: FILE 0070000000-0070027FFF 163840 r-x-- d=0x008
i=352724 o=0 (0)
--1614:1:aspacem 16: file 0070028000-0070028FFF 4096 r-x-- d=0x008
i=352724 o=163840 (0)
--1614:1:aspacem 17: FILE 0070029000-007015AFFF 1253376 r-x-- d=0x008
i=352724 o=167936 (0)
--1614:1:aspacem 18: 007015B000-0070169FFF 61440
--1614:1:aspacem 19: FILE 007016A000-007016BFFF 8192 rw--- d=0x008
i=352724 o=1417216 (0)
--1614:1:aspacem 20: ANON 007016C000-0070836FFF 7122944 rwx--
--1614:1:aspacem 21: 0070837000-007E7FFFFF 223m
--1614:1:aspacem 22: RSVN 007E800000-007EFFEFFF 8384512 ----- SmUpper
--1614:1:aspacem 23: anon 007EFFF000-007EFFFFFF 4096 rwx--
--1614:1:aspacem 24: 007F000000-007FFFEFFF 15m
--1614:1:aspacem 25: ANON 007FFFF000-007FFFFFFF 4096 rwx--
--1614:1:aspacem 26: RSVN 0080000000-00FFFFFFFF 2048m ----- SmFixed
--1614:1:aspacem >>>
--1614:1:main
--1614:1:main
--1614:1:main Running thread 1
--1614:1:syswrap- entering VG_(main_thread_wrapper_NORETURN)
--1614:1:aspacem allocated thread stack at 0x4267F000 size 81920
--1614:1:syswrap- run_a_thread_NORETURN(tid=1): pre-thread_wrapper
--1614:1:syswrap- thread_wrapper(tid=1): entry
--1614:1:transtab allocate sector 0
--1614:1:mallocfr newSuperblock at 0x43EC5000 (pszB 65520) owner
VALGRIND/ttaux
==1614==
==1614== Process terminating with default action of signal 11 (SIGSEGV)
==1614== Bad permissions for mapped region at address 0x4024BF4
==1614== at 0x4024BF4: ???
==1614== by 0x40100E4: (within /lib/ld-2.2.5.so)
--1614:1:syswrap- thread_wrapper(tid=1): exit
--1614:1:syswrap- run_a_thread_NORETURN(tid=1): post-thread_wrapper
--1614:1:syswrap- run_a_thread_NORETURN(tid=1): last one standing
--1614:1:main entering VG_(shutdown_actions_NORETURN)
==1614==
==1614== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==1614== malloc/free: in use at exit: 0 bytes in 0 blocks.
==1614== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==1614== For counts of detected errors, rerun with: -v
==1614== All heap blocks were freed -- no leaks are possible.
--1614:1:core_os VG_(terminate_NORETURN)(tid=1)
tia
nishant
>> Val...@li...
>> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>>
>>
>>
>
|
|
From: Julian S. <js...@ac...> - 2006-05-03 12:00:42
|
> --1614:1:aspacem <<< SHOW_SEGMENTS: Memory layout at client startup (27 > segments, 3 segnames) > --1614:1:aspacem ( 0) /var/tmp/valgrind/ppc32-linux/memcheck > --1614:1:aspacem ( 1) /bin/busybox > --1614:1:aspacem ( 2) /lib/ld-2.2.5.so > --1614:1:aspacem 0: RSVN 0000000000-0003FFFFFF 64m ----- SmFixed > --1614:1:aspacem 1: file 0004000000-0004012FFF 77824 r-x-- d=0x1F02 > i=977784 o=0 (2) > --1614:1:aspacem 2: 0004013000-0004021FFF 61440 > --1614:1:aspacem 3: file 0004022000-0004025FFF 16384 rw--- d=0x1F02 > i=977784 o=73728 (2) > ==1614== Process terminating with default action of signal 11 (SIGSEGV) > ==1614== Bad permissions for mapped region at address 0x4024BF4 > ==1614== at 0x4024BF4: ??? Yup, as Igmar says, 0x4024BF4 is a rw- mapping of /lib/ld-2.2.5.so. I have no idea why it would be trying to execute there. J |
|
From: Igmar P. <mai...@jd...> - 2006-05-03 12:38:47
|
> > ==1614== Process terminating with default action of signal 11 (SIGSEGV) > > ==1614== Bad permissions for mapped region at address 0x4024BF4 > > ==1614== at 0x4024BF4: ??? > > Yup, as Igmar says, 0x4024BF4 is a rw- mapping of /lib/ld-2.2.5.so. > I have no idea why it would be trying to execute there. Hmm.. And a real pain to debug unfortunately. Someone with a bit more understanding how those perms get set might comment on this. Could be either a buggy libc, or the kernel doing something weird with the ELF mappings. Igmar |