RFR(S): 8008102: SA on OS X does not stop the attached process

Staffan Larsen staffan.larsen at oracle.com
Wed Feb 13 07:05:28 PST 2013

Please review the following change.

When SA attaches to a JVM on OS X, it does not stop the process. If the JVM keeps running while SA inspects it can lead to all kinds of inconsistencies in SA. The proposed solution uses ptrace to attach to the process to keep it from running. Ptrace works a little bit differently on OS X, than on linux. For example, there is no need to attach to all threads, just attaching to the main process is enough. Additionally, the race that was recently found on linux [1] does not seem to be present on OS X (or at least I have not been able to reproduce it), so I have omitted that code.

webrev: http://cr.openjdk.java.net/~sla/8008102/webrev.00/


[1] http://mail.openjdk.java.net/pipermail/serviceability-dev/2013-February/008432.html

More information about the hotspot-runtime-dev mailing list