IBM User Guide for Java V7 on Windows > Troubleshooting and support > Problem determination



Attach API problem determination

This section helps you solve problems involving the Attach API.

The IBM Java™ Attach API uses shared semaphores, sockets, and file system artifacts to implement the attach protocol. Problems with these artifacts might adversely affect the operation of applications when they use the attach API.

Note: Error messages from agents on the target VM go to stderr or stdout for the target VM. They are not reported in the messages output by the attaching VM.


Deleting or changing permissions on directories and files in /tmp

The attach API depends on the contents of a common directory. By default the common directory is /tmp/.com_ibm_tools_attach. The common directory must have owner, group, and world read, write, and execute permissions, and the sticky bit must be set. The common files _attachlock, _master, and _notifier must have owner, group, and world read and write permissions. Execute permissions are not required.

Problems are caused if you modify the common directory in one of the following ways:

If you do modify the common directory, possible effects include:

If the common directory cannot be used, a Java VM attempts to re-create the common directory. However, the JVM cannot re-create the files related to currently executing VMs.


The VirtualMachine.attach(String id) method reports AttachNotSupportedException: No provider for virtual machine id

There are several possible reasons for this message:


The VirtualMachine.attach() method reports AttachNotSupportedException

There are several possible reasons for this message:


The VirtualMachine.loadAgent(), VirtualMachine.loadAgentLibrary(),, or VirtualMachine.loadAgentPath() methods report com.sun.tools.attach.AgentLoadException or com.sun.tools.attach.AgentInitializationException

There are several possible reasons for this message:


A process running as root can see a target using AttachProvider.listVirtualMachines(), but attempting to attach results in an AttachNotSupportedException

A process can attach only to processes owned by the same user. To attach to a non-root process from a root process, first use the su command to change the effective UID of the attaching process to the UID of the target UID, before attempting to attach.


The /tmp/.com_ibm_tools_attach directory contains many directories with numeric file names

Each Java process creates a private directory in the /tmp/.com_ibm_tools_attach directory, using its process ID as the directory name. When the process exits, it deletes this private directory. If the process, or the operating system, crashes, or you end the process by using the SIGKILL command, these obsolete directories are not removed.

Subsequent Java processes delete obsolete directories automatically over time. Each process examines a sample of the directories in /tmp/.com_ibm_tools_attach. If a directory is obsolete and is owned by the user that is running the process, the process deletes that directory.

To force deletion of all obsolete directories that are owned by the current user, run the jconsole command, found in the SDK bin directory. When the New Connection dialog is displayed, click Cancel, then exit the application.

To clean up all obsolete directories for all users, run the jconsole command as the

root user.


Parent: Problem determination








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.