|
From: Maynard J. <may...@us...> - 2013-08-13 19:43:01
|
Hi, A user reported a problem trying to run Java under Valgrind 3.8.1 when specifying a large value for the Java '-Xmx' option (128G). The user was attempting to use Valgrind to do some analysis of "Watson" (of Jeopardy fame), running on a big IBM POWER7 system with tons of memory. I reproduced the problem using a lower value for -Xmx on my IBM POWER7 development system, as well as on my laptop (an Intel Core 2 Duo). On both systems, both the Valgrind and Java executables are 64-bit. Below is the failing output from my laptop: [maynard@oc3431575272 myJavaStuff]$ valgrind --tool=none java -Xmx16G ThreadLoop 1 ==13873== Nulgrind, the minimal Valgrind tool ==13873== Copyright (C) 2002-2012, and GNU GPL'd, by Nicholas Nethercote. ==13873== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==13873== Command: java -Xmx16G ThreadLoop 1 ==13873== JVMJ9VM015W Initialization error for library j9gc24(2): Failed to instantiate heap; 16G requested Could not create the Java virtual machine. ==13873== -------------------------------------------- On both systems, if I decreased the -Xmx value to 15G, the error did not occur. Is this a known limitation? Is there any way to work around this issue? I dumped the /proc/<pid>/maps file on my laptop for several runs, specifying different values for '-Xmx' (lower than 16G, of course). For each run, I saw a "[heap]" entry whose size matched whatever I specified for -Xmx. On the POWER7 system, the /proc/<pid>/maps file didn't have a '[heap]' entry. I've attached maps files from the POWER7 and my laptop in case they may be of help. I also tried the same test with current upstream Valgrind. On the POWER7 system, I did see a little improvement -- I was able to use -Xmx values up to 31G --but not enough improvement for the user doing the Watson analysis. I wasn't able to run the java test using upstream Valgrind on my laptop because Valgrind dies with a SIGSEGV (I'll report that problem in a separate posting). Thanks for any help anyone can offer. -Maynard |