Integrated: 8201183: sjavac build failures: "Connection attempt failed: Connection refused"
Daniel Jeliński
djelinski at openjdk.org
Thu Apr 11 12:45:51 UTC 2024
On Wed, 10 Apr 2024 11:32:43 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
> The "Connection attempt failed: Connection refused" error may happen if the client tries to connect to a server that is no longer listening, which in turn may happen if the server shuts down without removing the port file. I added a check that the delete operation succeeded, and retry as necessary.
>
> I removed the comment about asynchronous deletes on Windows. I don't think it's correct; it's more likely that the file existed because the delete operation failed.
>
> I added a 1 second delay after deleting the port file; this delay is intended to allow any clients that managed to read the port file before it was deleted to finish connecting. It should also take care of the "IOException caught during compilation: Connection reset" issue.
>
> And finally, the portfile is now closed when not in use. This was necessary to fix the failures on Windows, where the file cannot be deleted as long as it is open in any process.
>
> In order to verify the fix, I modified `IdleMonitor.KEEPALIVE` to 1 second. Without the changes from this PR this resulted in at least a few failures in every mach5 run. With this PR I was able to build tier1-5 with no failures.
This pull request has now been integrated.
Changeset: ecc603ca
Author: Daniel Jeliński <djelinski at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/ecc603ca9b441cbb7ad27fbc2529fcb0b1da1992
Stats: 32 lines in 1 file changed: 12 ins; 8 del; 12 mod
8201183: sjavac build failures: "Connection attempt failed: Connection refused"
Reviewed-by: erikj, ihse
-------------
PR: https://git.openjdk.org/jdk/pull/18712
More information about the compiler-dev
mailing list