|
From: Richard Frith-M. <ri...@br...> - 2006-01-16 10:42:19
|
On 16 Jan 2006, at 08:55, Tom Hughes wrote: > In message <ABD...@br...> > Richard Frith-Macdonald <ri...@br...> wrote: > >> Unfortunately, valgrind doesn't seem to work with Sun's Java >> implementation. After much searching the 'resolved' bug #69508 seems >> to describe what is happening ... the last two comments in the bug >> report talk about Java re-execing to put its own directory at the >> front of LD_LIBRARY_PATH and valgrind doing the same ... getting into >> an infinite loop. > > Possibly - if you use --trace-children=yes do you see a whole stream > of valgrind startup messages appearing? No ... I guess I misdiagnosed the problem ... what I actually got was 1. a valgrind log file saying that there were too many errors and logging had stopped. 2. a system where the tomcat log was empty, and attempts to connect to it by apache were failing. This made me assume it was looping, as starting tomcat normally (ie without valgrind) results in a working tomcat setup visible in my web browser. >> I guess the bug being marked as 'resolved' refers to the original >> problem (a 'stack size too small' report) ... but it doesn't actually >> explain how to get valgrind/java to work together. has this actually >> been done? Is there a known workaround? > > I'm not sure when the bug was resolved, but we no longer change > the value of LD_LIBRARY_PATH as it was only ever needed to allow > us to replace libpthread with our own one and we haven't done that > since the 2.2.x releases. > > I think there was a delay in removing the LD_LIBRARY_PATH code, but > the 3.x releases should all be fine - none of them will try and > change it. > > What version are you using? Valgrind 3.1.0 built from source, Java jdk1.5.0_06 from Sun, Tomcat 4.1.29 on a Debian AMD64 'sid' system. I just tried adding '--error-limit=no' to the command line to start tomcat. It generates a bigger log file ... but the log file has stopped growing, though the valgrind/tomcat process looks like it is in a loop of some sort (ie a 'ps' shows it in an 'R' state). The log file stopped growing at 10:13, but it's now 10:40 and 'ps' shows the the process has now used over 28 minutes of CPU time. I don't know if it's any use at all, but the end of the log (the whole log is nearly 300KB ... too big to post to a list) looks like this ... ==7476== Invalid write of size 4 ==7476== at 0x70E3E710: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5DE0: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5DE0: ??? ==7476== by 0x70DD332C: ??? ==7476== by 0x4BF2BA4: JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4DC8EB8: os::os_exception_wrapper(void (*) (JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4BF29B4: JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) (in /usr/local/jdk1.5.0_06/jre/lib/amd64/ server/libjvm.so) ==7476== by 0x4C1FF54: jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) (in /usr/local/jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== Address 0x7FEFF7B88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E332F0: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5DE0: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5EFD: ??? ==7476== by 0x70DD5DE0: ??? ==7476== by 0x70DD332C: ??? ==7476== by 0x4BF2BA4: JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4DC8EB8: os::os_exception_wrapper(void (*) (JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4BF29B4: JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) (in /usr/local/jdk1.5.0_06/jre/lib/amd64/ server/libjvm.so) ==7476== by 0x4C1FF54: jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, Thread*) (in /usr/local/jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== Address 0x7FEFF7B08 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E3574D: ??? ==7476== Address 0x7FEFF7B08 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC49: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFFCA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC50: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFFBA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC57: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFFAA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC5E: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFF9A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC65: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFF8A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC6C: ??? ==7476== by 0x70E3577F: ??? ==7476== Address 0x7FEFF7A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E354CD: ??? ==7476== Address 0x7FEFF7B08 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC49: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFFCA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC50: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFFBA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC57: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFFAA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC5E: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFF9A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC65: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFF8A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC6C: ??? ==7476== by 0x70E35503: ??? ==7476== Address 0x7FEFF7A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E3524D: ??? ==7476== Address 0x7FEFF7B08 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC49: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFFCA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC50: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFFBA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC57: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFFAA88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC5E: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFF9A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC65: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFF8A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC6C: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFF7A88 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E31840: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFF7A78 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E31F80: ??? ==7476== by 0x70E3527B: ??? ==7476== Address 0x7FEFF7A48 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70E33B4D: ??? ==7476== Address 0x7FEFF7B08 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC49: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFFCA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC50: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFFBA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC57: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFFAA60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC5E: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFF9A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC65: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFF8A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid write of size 4 ==7476== at 0x70DDDC6C: ??? ==7476== by 0x70E33B7F: ??? ==7476== Address 0x7FEFF7A60 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Invalid read of size 8 ==7476== at 0x70E3F260: ??? ==7476== Address 0x8 is not stack'd, malloc'd or (recently) free'd ==7476== ==7476== Conditional jump or move depends on uninitialised value(s) ==7476== at 0x4E31AEB: SharedRuntime::continuation_for_implicit_exception(JavaThread*, unsigned char*, SharedRuntime::ImplicitExceptionKind) (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4DCA625: JVM_handle_linux_signal (in /usr/local/ jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x4DC812D: signalHandler(int, siginfo*, void*) (in / usr/local/jdk1.5.0_06/jre/lib/amd64/server/libjvm.so) ==7476== by 0x432B79F: (within /lib/libpthread-2.3.5.so) |