Request for review (S) 7009828: Fix for 6938627 breaks visualvm monitoring when -Djava.io.tmpdir is defined
Alan.Bateman at oracle.com
Thu Jan 13 01:21:28 PST 2011
David Holmes wrote:
> So I understand that various tools will break because the tool process
> puts a file in a "tmp" location for the target VM to see, under the
> assumption that they both have the same notion of what "tmp" is.
> My question is do we have a clear specification for what things in the
> JDK (the user often can't tell the difference between VM usage and
> library usage) will be affected by java.io.tmpdir, and what will use
> some hard-wired notion of "tmp" ?
The problem arises when someone runs an application with java.io.tmpdir
set to some alternative location. Specifying that property should just
mean that the application's temporary files (created by
File.createTempFile usually) will go to that location and it shouldn't
impact the ability to monitor the app with tools that use jvmstat or the
attach API. So I think Coleen's change to back this out is really the
only solution for the short term (esp, for jdk6). It can be worked
around by running the tools with -J-Djava.io.tmpdir but that is painful
and requires knowing the target VM's tmpdir setting (and of course you
will want to use jps to get the status of all your VMs even if they all
run with different temporary directories).
More information about the hotspot-runtime-dev