[Bug 3109] New: Profiler does not work when agent runs as root

bugzilla-daemon at icedtea.classpath.org bugzilla-daemon at icedtea.classpath.org
Mon Jul 25 14:39:24 UTC 2016


http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3109

            Bug ID: 3109
           Summary: Profiler does not work when agent runs as root
           Product: Thermostat
           Version: hg
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: agent
          Assignee: unassigned at icedtea.classpath.org
          Reporter: sgehwolf at redhat.com
                CC: thermostat at icedtea.classpath.org

The Thermostat profiler uses a JVM Java agent which it tries to load into the
target JVM via VirtualMachine.loadAgent(). In order to get a VirtualMachine
instance the JDKs dynamic attach mechanism is being used
(VirtualMachine.attach()) which breaks when the monitoring tool (Thermostat
agent) runs as root and the target JVM as some unprivileged user. The attach
fails in the same way as described in bug 1460. The result is that profiling
won't work in that scenario.

We need to find a way to perform the attaching of an agent as the same unix
user as the target JVM. Similar to what the agent-proxy does. Perhaps even
extend agent proxy functionality.

Note that the same issue happens with the byteman plugin when trying to attache
the byteman agent. However, in that case the Byteman Java API does the
attaching internally (though in the same way).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20160725/d7a1d242/attachment.html>


More information about the distro-pkg-dev mailing list