RFR: SA: MacOS X: 8184042: several serviceability/sa tests timed out on MacOS X
Jini George
jini.george at oracle.com
Fri Sep 15 03:17:17 UTC 2017
Thanks much, Dan.
-Jini.
On 9/15/2017 4:18 AM, Daniel D. Daugherty wrote:
> On 8/18/17 4:00 AM, Jini George wrote:
>> Hi all,
>>
>> Requesting reviews for: https://bugs.openjdk.java.net/browse/JDK-8184042
>>
>> Webrev: http://cr.openjdk.java.net/~jgeorge/8184042/webrev.00/
>
> hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/MacosxDebuggerLocal.m
> L832: result = mach_port_insert_right (mach_task_self(),
> Nit - extra blank before '('
>
> L860-863 - nit - indents don't match the other func calls.
>
> I read through all the changes and looked at logic flow, error
> returns, variable usage, etc. The problem is I'm not conversant
> in Mach exception programming so there could easily be things
> that I missed here.
>
> You really need to have a MacOS X person look at these changes
> also.
>
> hotspot/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java
> No comments.
>
> hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/mach_exc.h
> hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/mach_excServer.c
> hotspot/src/jdk.hotspot.agent/macosx/native/libsaproc/mach_excUser.c
> These files are generated by a tool and will be replaced
> by build changes. I didn't review them.
>
> hotspot/test/serviceability/sa/TestAttachDetach.java
> L35: import java.util.ArrayList;
> L36: import java.util.List;
> L37: import java.util.Arrays;
> L38: import java.util.Optional;
> L40: import jdk.test.lib.Utils;
> L41: import jdk.test.lib.process.OutputAnalyzer;
> L42: import jdk.test.lib.process.ProcessTools;
> These imports do not seem to be needed.
>
> L45: import jdk.test.lib.JDKToolLauncher;
> Duplicate import.
>
> L98: "The String 'Attaching to
> process' appears " +
> L99: numberOfMatches + " number of
> times");
> Would be helpful to include the expected value also.
>
> jdk/test/ProblemList.txt
> Thanks for remembering to update the ProblemList.txt file!
>
> I don't have any comments other than nits. However, I don't
> know mach exceptions so I can't really do a functional review.
>
> We need someone that knows MacOS X mach exceptions to chime
> in on this thread. I'm adding Gerard Z to this review thread
> in the hopes that he can help...
>
> Dan
>
>
>>
>> Problem gist: The deprecated ptrace() command, PT_ATTACH was changed
>> to PT_ATTACHEXC, which causes mach exceptions (and not UNIX signals)
>> to be delivered via mach messages.This caused SA to hang at waitpid()
>> waiting for a signal, which does not arrive.
>>
>> Solution in a nutshell: The solution is to make the required changes
>> to handle mach 'soft signal' exceptions in the form of mach messages
>> instead of signals, while attaching to and detaching from the target
>> process. The detailed steps are outlined in JBS.
>>
>> The changes appear huge due to the inclusion of pre-generated mach
>> exception handling files (mach_exc*). Since this is an integration
>> blocker, it would be great to get quick reviews on this.
>>
>> Thank you,
>> Jini.
>>
>>
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20170915/d240a19f/attachment-0001.html>
More information about the serviceability-dev
mailing list