Integrated: 8309200: java/net/httpclient/ExecutorShutdown fails intermittently, if connection closed during upgrade

Daniel Fuchs dfuchs at openjdk.org
Fri Jun 2 14:38:15 UTC 2023


On Wed, 31 May 2023 16:52:02 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

> The ExecutorShutdown test has been observed failing intermittently, notably if by misfortune the shutdown sequence causes a connection to get aborted while upgrading. The issue is that the `ConnectionAborter` class that allows to mark the connection as being scheduled for closing before a handle to the connection is actually available isn't forwarding the original exception for which closing the connection was requested. When the connection is eventually closed, a generic `IOException: connection closed locally` is raised at the `SocketTube` level, which unfortunately can race with the original cause. 
> 
> The fix makes it possible to relay the original cause to the place where the IOException is raised, in order to set it as the cause of the new exception.

This pull request has now been integrated.

Changeset: 931913fb
Author:    Daniel Fuchs <dfuchs at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/931913fbb299fbed7485ab8229100e6e56d8bada
Stats:     63 lines in 7 files changed: 45 ins; 3 del; 15 mod

8309200: java/net/httpclient/ExecutorShutdown fails intermittently, if connection closed during upgrade

Reviewed-by: jpai, djelinski

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

PR: https://git.openjdk.org/jdk/pull/14251


More information about the net-dev mailing list