RFR: 8196751: Add jhsdb option to specify debug server RMI connector port

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Tue Feb 25 19:07:16 UTC 2020


Hi Daniil,

Thank you for reply.
I agree with the approach to avoid using system properties.
Then it is better to be consistent.
I'd consider adding an RMI registry port option as well.
Will look at your comments in the CSR and reply there.

Thanks,
Serguei


On 2/25/20 10:05 AM, Daniil Titov wrote:
> Hi Serguei,
>
> I added my comments there. In brief, I believe that in long term in the serviceability tools we should avoid
> using the system properties and prefer the command line options instead.
>
> Thanks,
> Daniil
>
> On 2/24/20, 11:04 AM, "serguei.spitsyn at oracle.com" <serguei.spitsyn at oracle.com> wrote:
>
>      Hi Daniil,
>      
>      I've looked at CSR and posted a couple of questions there.
>      It'd be nice if you help to resolve my confusion. :)
>      
>      Thanks,
>      Serguei
>      
>      
>      On 2/23/20 20:21, Daniil Titov wrote:
>      > Please review change that adds a new command line option to jhsdb tool for the debugd mode to specify a RMI connector port.
>      > Currently a random port is used that prevents the debug server from being used behind a firewall or in a container.
>      >
>      > New CSR [3] was created for this change and it needs to be reviewed as well.
>      >
>      > Man pages for jhsdb will be updated in a separate issue.
>      >
>      > The current implementation (sun.jvm.hotspot.SALauncher)  parses the command line options passed to jhsdb tool,
>      > converts them to the ones for the debug server and then delegates the call  to sun.jvm.hotspot.DebugServer.main().
>      >
>      >                // delegate to the actual SA debug server.
>      >   367         DebugServer.main(newArgArray.toArray(new String[0]));
>      >
>      > However,  sun.jvm.hotspot.DebugServer  doesn't support named options and that prevents from efficiently adding new options to the tool.
>      > I found it more suitable to start Hotspot agent directly in  SALauncher rather than  adding a new option in  both sun.jvm.hotspot.SALauncher
>      >   and sun.jvm.hotspot.DebugServer and  delegating the call.  With this change I think sun.jvm.hotspot.DebugServer could be marked as a deprecated
>      > but I would prefer to address it in a separate issue.
>      >
>      > Testing: Manual testing with attaching the debug server to the running Java process or to the core file inside a docker
>      >                  container  and connecting  to it with the GUI debugger.
>      >                 Mach5 tier1-tier3 tests (that include serviceability/sa/sadebugd tests) succeeded.
>      >
>      > [1] Webrev: http://cr.openjdk.java.net/~dtitov/8196751/webrev.01
>      > [2] Jira issue: https://bugs.openjdk.java.net/browse/JDK-8196751
>      > [3] CSR: https://bugs.openjdk.java.net/browse/JDK-8239831
>      >
>      > Thank you,
>      > Daniil
>      >
>      >
>      
>      
>
>



More information about the serviceability-dev mailing list