RFR(S): 8008102: SA on OS X does not stop the attached process
David Holmes
david.holmes at oracle.com
Thu Feb 14 02:40:32 PST 2013
On 14/02/2013 1:05 AM, Staffan Larsen wrote:
> 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.
I would question how you can know for certain that the signal race [1]
can not happen on OSX? Would it not be prudent (and lend itself to
future code sharing) to follow the same approach as now used on Linux?
I kind of dismayed that the OSX SA support has been found to be in such
poor shape. Makes me wonder what else in that port is lacking robustness.
David
> webrev: http://cr.openjdk.java.net/~sla/8008102/webrev.00/
>
> Thanks,
> /Staffan
>
> [1] http://mail.openjdk.java.net/pipermail/serviceability-dev/2013-February/008432.html
>
More information about the serviceability-dev
mailing list