> I am trying to profile an application with callgrind. The application
> uses hadoop's libhdfs api which in turn makes JNI calls to a JVM. This
> causes a crash in the JVM. When running normally the application seems
> to work fine.
> 
> I am running on Centos 6.7 with Valgrind 3.11.0. Java is 1.8 Oracle JDK
> (I have also tried open jdk without much luck).
> Here is my commandline:
> 
> valgrind -v --tool=callgrind --dump-instr=yes --trace-jump=yes
> --trace-children=yes --smc-check=all --collect-jumps=yes
> --simulate-cache=yes ./example
> 
>  Below are some of the output from valgrind:
<snip>
I've never programmed for hadoop or the jvm.
That said, here's my ideas.
First off, if you or the jvm are using jit compilation you could be
running into a permissions problem. For example, mmap requires PROT_EXEC
in order to execute mmap'ed pages. On a few arches, the implementation is
flawed so it is not so, but with valgrind the said bug will manifest
itself.

> # JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build
> 1.8.0_92-b14)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b14 mixed mode
> linux-amd64 compressed oops)
<snip>
Having experimented, and having had to run the the authorities on the
subject of java I can say that Hotspot is an evil thing. It gave me
much headache when compiling the openjdk on Gentoo (that's when I
asked, and learned about java's buggy history).

My recommendation is to find a java without hotspot, zero, or other old
stuff and try again. Here in Gentoo world the openjdk is build with
icedtea.
I hope this helps.
If it does not you aught to go to the openjdk/hadoop folks and ask them
for help and perhaps we can work together to find and fix this. Try to
create a minimal use case to submit.

BTW: Yes, I'm just now caching up on a month of email.

Sincerely,
David

------------------------------------------------------------------------------
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to