|
From: Keith <kei...@gm...> - 2006-01-10 01:33:07
|
I am trying to valgrind a java application (our code is written in C and published through a JNI layer) and when running under valgrind, it uses 100% CPU but it appears to hang. I don't see any activity but one of the CPUs is always maxed out. I'm using the latest code because I need a very recent fix to even get it to run. What can I do to troubleshoot? Thanks, Keith |
|
From: Dirk M. <dm...@gm...> - 2006-01-10 08:44:11
|
On Tuesday 10 January 2006 02:32, Keith wrote: > I am trying to valgrind a java application (our code is written in C and > published through a JNI layer) and when running under valgrind, it uses > 100% CPU but it appears to hang. I don't see any activity but one of the > CPUs is always maxed out. Well, it *could* be very slow (like factor 150 or more slower than without valgrind). Is that not the case? |
|
From: Keith M. <kei...@ch...> - 2006-01-10 13:00:07
|
The application normally takes a few seconds to load. I gave it 4 hours running under valgrind before giving up. -Keith -----Original Message----- From: val...@li... [mailto:val...@li...] On Behalf Of Dirk Mueller Sent: Tuesday, January 10, 2006 2:44 AM To: val...@li... Subject: Re: [Valgrind-users] 100% CPU On Tuesday 10 January 2006 02:32, Keith wrote: > I am trying to valgrind a java application (our code is written in C and > published through a JNI layer) and when running under valgrind, it uses > 100% CPU but it appears to hang. I don't see any activity but one of the > CPUs is always maxed out. Well, it *could* be very slow (like factor 150 or more slower than without valgrind). Is that not the case? ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Valgrind-users mailing list Val...@li... https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Dirk M. <dm...@gm...> - 2006-01-10 13:12:14
|
On Tuesday 10 January 2006 13:59, Keith Mange wrote:
> The application normally takes a few seconds to load. I gave it 4 hours
> running under valgrind before giving up.
Ok, then it probably really hung somewhere. strace/ltrace telling something?
does an attached gdb produce a sensible backtrace (most likely not, but it
would be worth a try).
then you either have to figure out how to reduce it to a small code snippet
that reproduces the valgrind lockup or try to look through the valgrind debug
output to see if you can find something obvious on why it locks up. see
valgrind --help-debug output:
--sanity-level=<number> level of sanity checking to do [1]
--profile=no|yes profile? (tool must be built for it) [no]
--trace-flags=<XXXXXXXX> show generated code? (X = 0|1) [00000000]
--profile-flags=<XXXXXXXX> ditto, but for profiling (X = 0|1) [00000000]
--trace-notbelow=<number> only show BBs above <number> [0]
--trace-syscalls=no|yes show all system calls? [no]
--trace-signals=no|yes show signal handling details? [no]
--trace-symtab=no|yes show symbol table details? [no]
--trace-cfi=no|yes show call-frame-info details? [no]
--trace-sched=no|yes show thread scheduler details? [no]
--wait-for-gdb=yes|no pause on startup to wait for gdb attach
--command-line-only=no|yes only use command line options [no]
Also, try if "valgrind --tool=none" works for your application. that would be
very important to know.
Dirk
|
|
From: Julian S. <js...@ac...> - 2006-01-10 14:05:49
|
[On amd64, once clflush is fixed, java JIT spins at 100% CPU] Keith You're the second person to report this problem - Martin has the same on x86. I don't know why the spin happens. One possibility is that it could be due to atomic insns used for synchronisation: http://www.valgrind.org/docs/manual/manual-core.html#manual-core.limits: Atomic instruction sequences are not properly supported, in the sense that their atomicity is not preserved. This will affect any use of synchronization via memory shared between processes. They will appear to work, but fail sporadically. At this point perhaps the best thing is for you to put together a simple test case so I can at least try and reproduce the problem at this end. It's going to take a bit of GDBing to see what's going on. One quick thing to do: rerun V with --trace-flags=10000000 --trace-notbelow=999999. This prints out one line for each block translated and might give a clue about the names of the function it gets stuck in. Send the last hundred or so lines of the log. J |
|
From: Tom S. <to...@pl...> - 2006-01-10 16:40:40
|
Keith wrote: > I am trying to valgrind a java application (our code is written in C and > published through a JNI layer) and when running under valgrind, it uses 100% > CPU but it appears to hang. I don't see any activity but one of the CPUs is > always maxed out. > > > > I'm using the latest code because I need a very recent fix to even get it to > run. > > > > What can I do to troubleshoot? > > > > Thanks, > > Keith > > You didn't mention which JVM you are using. I have never been able to valgrind our JNI app using the Sun JVM. After testing a number of JVMs, the SableVM is the one that works best for me when valgrinding. -- Tom Schutter (mailto:to...@pl...) Platte River Associates, Inc. (http://www.platte.com) |