United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-5042659 : hsperfdata is not being created on non-NTFS partitions

Details
Type:
Bug
Submit Date:
2004-05-05
Status:
Closed
Updated Date:
2004-05-05
Project Name:
JDK
Resolved Date:
2004-05-05
Component:
hotspot
OS:
windows_2000
Sub-Component:
runtime
CPU:
x86
Priority:
P4
Resolution:
Not an Issue
Affected Versions:
1.4.2
Fixed Versions:

Related Reports

Sub Tasks

Description

Name: rmT116609			Date: 05/05/2004


FULL PRODUCT VERSION :
java version "1.4.2_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195] SP 4

A DESCRIPTION OF THE PROBLEM :
Since 1.4.2, the JDK will  create shared memory perfdata in a folder named  hsperfdata_user in the temp directory. This only works, if the temp directory is on a NTFS partition under Windows 2000. 

If I set this to "E:\Temp", where E:\ is a FAT32 partition, then shared perfdata is not available and I cannot connect to the JVM with tools like jvmstat.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a FAT32 partition E:set TMP=E:\Temp
Start any java program.
hsperfdata_user folder is not being generated.


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
hsperfdata should be available,  also if temp dir is on a FAT32 partition.
ACTUAL -
No hsperfdata.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Use NTFS partition for TMP directory.
(Incident Review ID: 261067) 
======================================================================

                                    

Comments
WORK AROUND

The feature works as designed. The following FAQ was requested to be
added to the jvmstat CoolStuff website on 3/23/04 and should be available
soon at http://developers.sun.com/dev/coolstuff/jvmstat/faq.html

Q: I'm running on Windows and I've installed J2SE 1.4.2 and jvmstat
    2.0, but when I run jvmps it does not display any java processes.
    I can run 'visualgc 0' and it will work, but I cannot get visualgc
    or any other jvmstat tool to monitor other Java processes.

A: The problem is most likely that your default Windows temporary
    directory is on a FAT type file system. For security reasons,
    the shared memory exported by the HotSpot JVM is disabled whenever
    the JVM encounters a FAT type file system (more precisely, any
    file system that does not support persistent access control lists)
    as such file systems provide insufficient access controls.

    There are two potential work-arounds for this issue:

       1) Set the TMP environment variable to refer to a directory
          on an NTFS file system, or any file system that supports
          persistent access control lists. Note that this file system
          should be local to the machine.  Setting this option for
          target applications is application specific. To set this
          variable in a command prompt or in a batch script, simply
          enter the following:

             set TMP=<path>

          The environment variable can be set globally by adding it
          to the list of environment variables in the System Properties
          (Control Panel->System, select the "Advanced" tab and click
          on the "Environment Variables" button). Through this interface,
          you can choose to set the variable for all processes run by
          the current user or globally as a system variable for all
          processes run by the system.

          The TMP variable must refer to the same location for both
          the monitored applications and the jvmstat tools.

       2) Changing the TMP environment variable to refer to an NTFS
          type file system is not always a viable option. For these
          cases, the HotSpot JVM provides a mechanism to bypass the
          the file system type check. However, using this mechanism
          instructs the HotSpot JVM to create the jvmstat shared memory
          without any access controls, allowing access to the instrumentation
          exported by the JVM to any user on the system.

          To bypass the file system type check, set the -XX:+PerfBypassFileSystemCheck option
          on the java command line for both the applications you want
          to monitor and for the jvmstat tools. Setting this option for
          target applications is application specific. For the jvmstat
          tools, the following environment variable can be set before
          running any of the commands:

              set VMARGS=-XX:+PerfBypassFileSystemCheck
                                     
2004-09-01
EVALUATION

The feature works as designed. At the request of the security team,
the shared memory backing store files is not created on Windows if
th files system type for the temporary directory (as determined by
the windows GetTempPath() API) does not support Persistent Access
Control List. FAT type file systems do not support PACLs and NTFS
file systems do. Without Persistent Access Controls, the backing
store file would be readable by any user on the system.


###@###.### 2004-05-05
-----------------------------------------------------------------
                                     
2004-05-05



Hardware and Software, Engineered to Work Together