RFR: 7903730: Enhance the agentvm to be tolerant to unexpected connection on the port the Agent listens on for handshake with the AgentServer [v4]

Jaikiran Pai jpai at openjdk.org
Fri Jun 7 11:36:46 UTC 2024


On Tue, 21 May 2024 08:17:09 GMT, Ludvig Janiuk <lujaniuk at openjdk.org> wrote:

>>> Use Throwable.addSuppressed -- it is for exactly this situation.
>> 
>> But we wouldn't be throwing any exception to which we would be adding this as a suppressed exception. This failure is during close()ing a connection on which we either had a read timeout or an IOException when reading off it. We log that failure a few lines above this and then go and close this connection and then attempt to accept() a next connection (if any).
>> 
>> I can update this catch block to log a message which states the close() failed, along with the reason. Is that reasonable?
>
>> if any errors result during that close, we don't want to propagate it 
> 
> I understand that we want to drop the rogue connection, but if closing fails, I do want to propagate that exception. The exception from close() could be something we didn't expect and I want to be able to troubleshoot it if it should happen.

I've now updated the PR to log the exception stacktrace if/when it fails. This should help debug any unexpected failures in this part of the code.

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

PR Review Comment: https://git.openjdk.org/jtreg/pull/195#discussion_r1631069854


More information about the jtreg-dev mailing list