RFR: 8263565: NPE was thrown when sun.jvm.hotspot.rmi.serverNamePrefix was set

Chris Plummer cjplummer at openjdk.java.net
Tue Mar 16 01:22:08 UTC 2021


On Tue, 16 Mar 2021 00:57:48 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

>> That looks fine, although I'm a little unclear about the need for `--disableregistry`, and how that applies to existing code. 
>> 
>> Also, I think a bit of explanation of `[:registryport]` is needed since it is not also specified by the `jhsdb debugd` command. That's just the port that it chooses to communicate over, and can be any available port, right? If one is not specified, what port is chosen, and what would be a reason that you would want to specify a port?
>
>> That looks fine, although I'm a little unclear about the need for `--disableregistry`, and how that applies to existing code.
> 
> We can use it when we want to register SA endpoint to RMI registry that exists (e.g. rmid). I think it is simple to proxy to `sun.jvm.hotspot.rmi.startRegistry` like `--registryport` option in jhsdb.
> 
> https://github.com/openjdk/jdk/blob/master/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/SALauncher.java#L392-L400
> 
>> Also, I think a bit of explanation of `[:registryport]` is needed since it is not also specified by the `jhsdb debugd` command. That's just the port that it chooses to communicate over, and can be any available port, right? If one is not specified, what port is chosen, and what would be a reason that you would want to specify a port?
> 
> We can specify any available port as you said.
> For example, if we run multiple debugd instances on same OS, we need to use different port. We can use `--registryport` and `[:registryport]` in that case.
> However we will not have many opportunities to use this.

I think the default rmi registry port is 1099. However, do we need to also support something like [JDK-8196729](https://bugs.openjdk.java.net/browse/JDK-8196729) for the rmi communications port?

-------------

PR: https://git.openjdk.java.net/jdk/pull/3000


More information about the serviceability-dev mailing list