|
From: stecca m. <ms...@ya...> - 2010-02-12 14:30:30
|
Hi all,
I'm trying to use Valgrind on the following system setup:
PC QuadCore 64bit 4 GB RAM
Ubuntu 8.04, Hardy Heron, 64 bit
JVM 64 bit (jdk1.6.0_18).
The following problems occur when I try to start the cachegrind tool on the JVM:
root@user-desktop:/home/user/Scrivania/ElaboraLog1G# valgrind -v --tool=cachegrind /home/user/Scrivania/jdk1.6.0_18/bin/java Elabora==31924== Cachegrind, a cache and branch-prediction profiler
==31924== Copyright (C) 2002-2009, and GNU GPL'd, by Nicholas Nethercote et al.
==31924== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==31924== Command: /home/michele/Scrivania/jdk1.6.0_18/bin/java Elabora
==31924==
--31924-- Valgrind options:
--31924-- -v
--31924-- --tool=cachegrind
--31924-- Contents of /proc/version:
--31924-- Linux version 2.6.24-19-generic (buildd@yellow) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Wed Jun 18 14:15:37 UTC 2008
--31924-- Arch and hwcaps: AMD64, amd64-sse3-cx16
--31924-- Page sizes: currently 4096, max supported 4096
--31924-- Valgrind library directory: /usr/local/lib/valgrind
==31924== Cache configuration used:
==31924== I1: 32768B, 8-way, 64B lines
==31924== D1: 32768B, 8-way, 64B lines
==31924== L2: 4194304B, 16-way, 64B lines
--31924-- Reading syms from /lib/ld-2.7.so (0x4000000)
--31924-- Reading debug info from /lib/ld-2.7.so ..
--31924-- .. CRC mismatch (computed fd7d1ffe wanted 17cc7b66)
--31924-- Reading debug info from /usr/lib/debug/lib/ld-2.7.so ..
--31924-- Reading syms from /usr/local/lib/valgrind/cachegrind-amd64-linux (0x38000000)
--31924-- object doesn't have a dynamic symbol table
--31924-- Reading syms from /home/michele/Scrivania/jdk1.6.0_18/bin/java (0x40000000)
--31924-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-amd64-linux.so (0x421f000)
--31924-- Reading syms from /lib/libpthread-2.7.so (0x4420000)
--31924-- Reading debug info from /lib/libpthread-2.7.so ..
--31924-- .. CRC mismatch (computed b064431f wanted 03c6976c)
--31924-- Reading debug info from /usr/lib/debug/lib/libpthread-2.7.so ..
--31924-- Reading syms from /home/michele/Scrivania/jdk1.6.0_18/jre/lib/amd64/jli/libjli.so (0x4031000)
--31924-- Reading syms from /lib/libdl-2.7.so (0x463c000)
--31924-- Reading debug info from /lib/libdl-2.7.so ..
--31924-- .. CRC mismatch (computed 13394ae2 wanted 5c0f7518)
--31924-- Reading debug info from /usr/lib/debug/lib/libdl-2.7.so ..
--31924-- Reading syms from /lib/libc-2.7.so (0x4840000)
--31924-- Reading debug info from /lib/libc-2.7.so ..
--31924-- .. CRC mismatch (computed bed91adb wanted 5f03a3d5)
--31924-- Reading debug info from /usr/lib/debug/lib/libc-2.7.so ..
Here is the output of the ./configure execution (I successfully installed Valgrind on my machine):
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking for diff -u... yes
checking for a supported version of gcc... ok (4.2.4)
checking build system type... x86_64-unknown-linux
checking host system type... x86_64-unknown-linux
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... no
checking for a 32-bit only build... no
checking for a supported OS... ok (linux)
checking for the kernel version... 2.6 family (2.6.24-19-generic)
checking for 32 bit build support... no
checking for a supported CPU/OS combination... ok (amd64-linux)
checking for use as an inner Valgrind.... no
checking for egrep... grep -E
checking the GLIBC_VERSION version.... 2.7 family
checking for CLOCK_MONOTONIC... yes
checking for PTHREAD_MUTEX_ADAPTIVE_NP... yes
checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes
checking for PTHREAD_MUTEX_RECURSIVE_NP... yes
checking for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP... yes
checking for pthread_mutex_t::__m_kind... no
checking for pthread_mutex_t::__data.__kind... yes
checking for Altivec... no
checking for pthread_create@GLIBC2.0()... no
checking for eventfd()... no
checking if gcc accepts -m32... yes
checking if gcc accepts -maix32... no
checking if gcc accepts -m64... yes
checking if gcc accepts -maix64... no
checking if gcc accepts -mmmx... yes
checking if gcc accepts -msse... yes
checking if gcc accepts -mpreferred-stack-boundary... no
checking if gcc accepts -Wno-pointer-sign... yes
checking if gcc accepts -Wdeclaration-after-statement... yes
checking if gcc accepts -Wno-empty-body... yes
checking if gcc accepts -Wno-format-zero-length.... yes
checking if gcc accepts -Wno-uninitialized... yes
checking if gcc accepts -Wextra or -W... -Wextra
checking if gcc accepts -fno-stack-protector... yes
checking if gcc accepts --param inline-unit-growth... yes
checking if gcc supports __builtin_expect... yes
checking if ppc32/64 as supports mtocrf/mfocrf... no
checking if x86/amd64 assembler speaks SSE3.... yes
checking if x86/amd64 assembler speaks SSSE3... yes
checking for TLS support... yes
checking for /proc/self/fd... yes
checking for /proc/self/exe... yes
checking for /proc/self/maps... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd..h... yes
checking asm/unistd.h usability... yes
checking asm/unistd.h presence... yes
checking for asm/unistd.h... yes
checking endian.h usability... yes
checking endian.h presence... yes
checking for endian.h... yes
checking mqueue.h usability... yes
checking mqueue.h presence... yes
checking for mqueue.h... yes
checking sys/endian.h usability... no
checking sys/endian.h presence... no
checking for sys/endian.h... no
checking sys/epoll.h usability... yes
checking sys/epoll.h presence... yes
checking for sys/epoll.h... yes
checking sys/eventfd.h usability.... no
checking sys/eventfd.h presence... no
checking for sys/eventfd.h.... no
checking sys/klog.h usability... yes
checking sys/klog.h presence.... yes
checking for sys/klog.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking sys/signal.h usability... yes
checking sys/signal.h presence.... yes
checking for sys/signal.h... yes
checking sys/signalfd.h usability... no
checking sys/signalfd.h presence... no
checking for sys/signalfd.h... no
checking sys/syscall.h usability... yes
checking sys/syscall..h presence... yes
checking for sys/syscall.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for sys/types.h... (cached) yes
checking for uid_t in sys/types.h... yes
checking for off_t... yes
checking for size_t.... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking return type of signal handlers... void
checking for clock_gettime in -lrt... yes
checking for clock_gettime... yes
checking for epoll_create... yes
checking for epoll_pwait... yes
checking for floor... no
checking for klogctl... yes
checking for mallinfo... yes
checking for memchr... yes
checking for memset.... yes
checking for mkdir... yes
checking for mremap... yes
checking for ppoll... yes
checking for pthread_barrier_init... yes
checking for pthread_condattr_setclock... yes
checking for pthread_mutex_timedlock... yes
checking for pthread_rwlock_timedrdlock... yes
checking for pthread_rwlock_timedwrlock... yes
checking for pthread_spin_lock... yes
checking for semtimedop... yes
checking for signalfd... yes
checking for sigwaitinfo... yes
checking for syscall... yes
checking for strchr... yes
checking for strdup... yes
checking for strpbrk... yes
checking for strrchr... yes
checking for strstr... yes
checking for timerfd... no
checking for utimensat... yes
checking primary target for usable MPI2-compliant C compiler and mpi.h... no
checking secondary target for usable MPI2-compliant C compiler and mpi.h... no
configure: WARNING: pkg-config has not been installed or is too old.
configure: WARNING: Detection of Qt4 will be skipped.
checking for boost... no
checking for OpenMP... yes
checking if gcc supports __sync_bool_compare_and_swap... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating VEX/Makefile
config.status: creating valgrind.spec
config.status: creating valgrind.pc
config.status: creating glibc-2.X.supp
config..status: creating docs/Makefile
config.status: creating tests/Makefile
config.status: creating tests/vg_regtest
config.status: creating perf/Makefile
config.status: creating perf/vg_perf
config.status: creating include/Makefile
config.status: creating auxprogs/Makefile
config.status: creating mpi/Makefile
config.status: creating coregrind/Makefile
config.status: creating memcheck/Makefile
config.status: creating memcheck/tests/Makefile
config.status: creating memcheck/tests/amd64/Makefile
config.status: creating memcheck/tests/x86/Makefile
config.status: creating memcheck/tests/linux/Makefile
config.status: creating memcheck/tests/darwin/Makefile
config.status: creating memcheck/tests/x86-linux/Makefile
config.status: creating memcheck/perf/Makefile
config.status: creating cachegrind/Makefile
config.status: creating cachegrind/tests/Makefile
config.status: creating cachegrind/tests/x86/Makefile
config.status: creating cachegrind/cg_annotate
config.status: creating callgrind/Makefile
config.status: creating callgrind/callgrind_annotate
config.status: creating callgrind/callgrind_control
config.status: creating callgrind/tests/Makefile
config.status: creating helgrind/Makefile
config.status: creating helgrind/tests/Makefile
config.status: creating massif/Makefile
config.status: creating massif/tests/Makefile
config.status: creating massif/perf/Makefile
config.status: creating massif/ms_print
config.status: creating lackey/Makefile
config.status: creating lackey/tests/Makefile
config.status: creating none/Makefile
config.status: creating none/tests/Makefile
config.status: creating none/tests/amd64/Makefile
config.status: creating none/tests/ppc32/Makefile
config.status: creating none/tests/ppc64/Makefile
config.status: creating none/tests/x86/Makefile
config.status: creating none/tests/linux/Makefile
config.status: creating none/tests/darwin/Makefile
config.status: creating none/tests/x86-linux/Makefile
config.status: creating exp-ptrcheck/Makefile
config.status: creating exp-ptrcheck/tests/Makefile
config.status: creating drd/Makefile
config.status: creating drd/scripts/download-and-build-splash2
config.status: creating drd/tests/Makefile
config.status: creating exp-bbv/Makefile
config.status: creating exp-bbv/tests/Makefile
config.status: creating exp-bbv/tests/x86/Makefile
config.status: creating exp-bbv/tests/x86-linux/Makefile
config.status: creating exp-bbv/tests/amd64-linux/Makefile
config.status: creating exp-bbv/tests/ppc32-linux/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Maximum build arch: amd64
Primary build arch: amd64
Secondary build arch:
Build OS: linux
Primary build target: AMD64_LINUX
Secondary build target:
Default supp files: exp-ptrcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp
Thanks in advance,.
Cheers,
Michele
|
|
From: stecca m. <ms...@ya...> - 2010-02-15 08:24:02
|
Hi all...
The problem is not related to the CRC error but to JAVA 1.6.
I successfully used Valgrind with a C program and with a JAVA 1.5 too.
The problem is related to JAVA 1.6. I tried to run it with the --tool=cachegrind and --trace-children=yes options enabled but I get the following error:
Unable to initialize VM.
Any idea?
|
|
From: Tom H. <to...@co...> - 2010-02-15 08:39:24
|
On 15/02/10 08:23, stecca michele wrote: > Hi all... > The problem is not related to the CRC error but to JAVA 1.6. > I successfully used Valgrind with a C program and with a JAVA 1.5 too. > The problem is related to JAVA 1.6. I tried to run it with the --tool=cachegrind and --trace-children=yes options enabled but I get the following error: The error just means that your debug packages are out of date and don't match your main packages. It won't actually stop anything working but it may mean that the backtraces reported for errors are not accurate. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: stecca m. <ms...@ya...> - 2010-02-15 09:18:55
|
Tnx Tom. I agree with you but if I try to run Valgrind with JAVA 6, it simply doesn't work. It returns the following error and the JAVA program doesn't run. Error occured during initialization of VM Unknown x64 processor: SS2 not supported I run it with the --tool=cachegrind and --trace-children=yes options enabled. The JVM works when it is started standalone (i.e., without valgrind). Cheers, Michele --- Lun 15/2/10, Tom Hughes <to...@co...> ha scritto: > Da: Tom Hughes <to...@co...> > Oggetto: Re: JAVA + UBUNTU "CRC mismatch problem" > A: "stecca michele" <ms...@ya...> > Cc: val...@li... > Data: Lunedì 15 febbraio 2010, 09:39 > On 15/02/10 08:23, stecca michele > wrote: > > Hi all... > > The problem is not related to > the CRC error but to JAVA 1.6. > > I successfully used Valgrind with a C program and with > a JAVA 1.5 too. > > The problem is related to JAVA 1.6. I tried to run it > with the --tool=cachegrind and --trace-children=yes options > enabled but I get the following error: > > The error just means that your debug packages are out of > date and don't match your main packages. It won't actually > stop anything working but it may mean that the backtraces > reported for errors are not accurate. > > Tom > > -- Tom Hughes (to...@co...) > http://www.compton.nu/ > |
|
From: Tom H. <to...@co...> - 2010-02-15 09:31:26
|
On 15/02/10 09:18, stecca michele wrote: > Tnx Tom. I agree with you but if I try to run Valgrind with JAVA 6, it simply doesn't work. It returns the following error and the JAVA program doesn't run. > > Error occured during initialization of VM > Unknown x64 processor: SS2 not supported That's an entirely separate issue to the CRC thing - you'll need Julian for that as valgrind will need to set some extra bits in the emulated CPUID it presents. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Julian S. <js...@ac...> - 2010-02-15 09:40:03
|
On Monday 15 February 2010, stecca michele wrote: > Tnx Tom. I agree with you but if I try to run Valgrind with JAVA 6, it > simply doesn't work. It returns the following error and the JAVA program > doesn't run. > > Error occured during initialization of VM > Unknown x64 processor: SS2 not supported That doesn't sound very likely to me. Valgrind-3.5.0 claims, via the CPUID instruction, to be a Core 2 E6600, so the VM really should work. What is this "SS2" that it refers to? J |
|
From: stecca m. <ms...@ya...> - 2010-02-15 10:12:59
|
This is the CPU mounted on my machine:
Intel® Core2 Quad Q6600(2,4 GHz,FSB 1066 MHZ,2 cache L2 8 Mb) iAMT System Mngt
Does it help?
--- Lun 15/2/10, Julian Seward <js...@ac...> ha scritto:
> Da: Julian Seward <js...@ac...>
> Oggetto: Re: [Valgrind-users] JAVA + UBUNTU "CRC mismatch problem"
> A: "stecca michele" <ms...@ya...>
> Cc: val...@li..., "Tom Hughes" <to...@co...>
> Data: Lunedì 15 febbraio 2010, 10:58
> On Monday 15 February 2010, stecca
> michele wrote:
> > Tnx Tom. I agree with you but if I try to run Valgrind
> with JAVA 6, it
> > simply doesn't work. It returns the following error
> and the JAVA program
> > doesn't run.
> >
> > Error occured during initialization of VM
> > Unknown x64 processor: SS2 not supported
>
> That doesn't sound very likely to me. Valgrind-3.5.0
> claims, via the
> CPUID instruction, to be a Core 2 E6600, so the VM really
> should work.
>
> What is this "SS2" that it refers to?
>
> J
>
|
|
From: Julian S. <js...@ac...> - 2010-02-15 09:18:24
|
On Monday 15 February 2010, Tom Hughes wrote: > On 15/02/10 08:23, stecca michele wrote: > > Hi all... > > The problem is not related to the CRC error but to JAVA 1.6. > > I successfully used Valgrind with a C program and with a JAVA 1.5 too. > > The problem is related to JAVA 1.6. I tried to run it with the > > --tool=cachegrind and --trace-children=yes options enabled but I get the > > following error: > > The error just means that your debug packages are out of date and don't > match your main packages. It won't actually stop anything working but it > may mean that the backtraces reported for errors are not accurate. I think there's more to it than that though. I see this a lot on Ubuntu, eg: --4274-- Reading debug info from /lib/libc-2.10.1.so .. --4274-- .. CRC mismatch (computed e2035481 wanted a2d8b96b) --4274-- Reading debug info from /usr/lib/debug/lib/libc-2.10.1.so .. So first it tries to read the debug info from the main .so, complains about a CRC mismatch, and then reads from the debug .so, and what it gets from that seems to me to be fine. So I'm not sure what's going on there. This happens even with clean installs of Ubuntu so I would have thought it unlikely to really be a mismatch. J |
|
From: Julian S. <js...@ac...> - 2010-02-15 09:23:38
|
> --4274-- Reading debug info from /lib/libc-2.10.1.so ..
> --4274-- .. CRC mismatch (computed e2035481 wanted a2d8b96b)
> --4274-- Reading debug info from /usr/lib/debug/lib/libc-2.10.1.so ..
Seems like find_debug_file calls open_debug_file with various different
names to see if any of them actually exists. This seems to produce
the confusing messages:
if ((addr = open_debug_file(debugpath, crc, size)) == 0) {
VG_(sprintf)(debugpath, "%s/.debug/%s", objdir, debugname);
if ((addr = open_debug_file(debugpath, crc, size)) == 0) {
VG_(sprintf)(debugpath, "/usr/lib/debug%s/%s", objdir, debugname);
addr = open_debug_file(debugpath, crc, size);
}
}
J
|
|
From: Tom H. <to...@co...> - 2010-02-15 09:30:45
|
On 15/02/10 09:42, Julian Seward wrote: > >> --4274-- Reading debug info from /lib/libc-2.10.1.so .. >> --4274-- .. CRC mismatch (computed e2035481 wanted a2d8b96b) >> --4274-- Reading debug info from /usr/lib/debug/lib/libc-2.10.1.so .. > > Seems like find_debug_file calls open_debug_file with various different > names to see if any of them actually exists. This seems to produce > the confusing messages: Well if you have debug files in more that one of those locations and some match and some don't then yes, it will. We generally expect that we'll only find a file in one of the locations and it will either match or not. Tom -- Tom Hughes (to...@co...) http://www.compton.nu/ |
|
From: Julian S. <js...@ac...> - 2010-02-15 09:34:55
|
> if ((addr = open_debug_file(debugpath, crc, size)) == 0) {
> VG_(sprintf)(debugpath, "%s/.debug/%s", objdir, debugname);
> if ((addr = open_debug_file(debugpath, crc, size)) == 0) {
> VG_(sprintf)(debugpath, "/usr/lib/debug%s/%s", objdir, debugname);
> addr = open_debug_file(debugpath, crc, size);
> }
> }
A bit of futzing with the message printing makes it make more sense:
--5122-- Reading syms from /lib/libc-2.10.1.so (0x5031000)
--5122-- Considering /lib/libc-2.10.1.so ..
--5122-- .. CRC mismatch (computed e2035481 wanted a2d8b96b)
--5122-- Considering /usr/lib/debug/lib/libc-2.10.1.so ..
--5122-- .. CRC is valid
Index: coregrind/m_debuginfo/readelf.c
===================================================================
--- coregrind/m_debuginfo/readelf.c (revision 11040)
+++ coregrind/m_debuginfo/readelf.c (working copy)
@@ -942,7 +942,7 @@
}
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, "Reading debug info from %s ..\n", name);
+ VG_(message)(Vg_DebugMsg, " Considering %s ..\n", name);
*size = stat_buf.size;
@@ -960,9 +960,12 @@
vg_assert(!sr_isError(res));
if (VG_(clo_verbosity) > 1)
VG_(message)(Vg_DebugMsg,
- ".. CRC mismatch (computed %08x wanted %08x)\n", calccrc, crc);
+ " .. CRC mismatch (computed %08x wanted %08x)\n", calccrc, crc);
return 0;
}
+
+ VG_(message)(Vg_DebugMsg,
+ " .. CRC is valid\n");
return sr_Res(sres);
}
|