RFR JDK-8225474: JDI connector accept fails "Address already in use" with concurrent listeners
David Holmes
david.holmes at oracle.com
Sun Jun 9 13:30:37 UTC 2019
+1 from me.
What thread-safety should mean here needs to be defined.
David
On 8/06/2019 7:11 pm, Alan Bateman wrote:
> On 08/06/2019 05:53, serguei.spitsyn at oracle.com wrote:
>> Hi Andrew,
>>
>> It looks good to me.
>> Thank you for your investigation and taking care about this!
> I think this one needs further analysis as changing listenMap to be a
> CHM does not make this connector thread safe and doesn't address a
> number of other places where the map is accessed without
> synchronization. For example, startListening would need to be changed to
> use `putIfAbsent`, stopListening would need to use `remove` rather than
> get + remote. There are several others once you start looking at the
> sub-classes, e.g. SocketListeningConnector.updateArgumentMapIfRequired.
>
> At the API level, JDI does not require connectors to be thread safe. I
> agree it is desirable for some of the connector implementations to be
> thread safe, particularly ListeningConnectors as an obvious usage will
> be for a listener thread to hand off a VirtualMachine to another thread.
>
> Andrew - do you have cycles to investigate this further? I'm not opposed
> to changing the map to be a CHM but I think it needs further work.
>
> -Alan
More information about the serviceability-dev
mailing list