[crac] Integrated: 8371462: [CRaC] Improve listening socket reopen through FD policies

Radim Vansa rvansa at openjdk.org
Fri Nov 28 15:37:30 UTC 2025


On Fri, 7 Nov 2025 10:00:10 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

> The current tests for listening socket reopen have two defects:
> * there is no thread calling accept() during the checkpoint, while normally servers would be waiting for new connections
> * non-blocking server sockets where `Selector.select()` is used for the blocking is not exercised at all
> 
> As a result the scenario with Selector.select() fails to even close such server socket, due to FDs not in the `EpollSelectorImpl` not being processed after the selection keys are cancelled.
> 
> Second problem is the reopen: servers can use long-lived key with `SelectionKey.OP_ACCEPT` interest. When the server socket is closed the key is cancelled; to handle this transparently we need to make the key valid again and register it with the channel and selector.

This pull request has now been integrated.

Changeset: 01229e60
Author:    Radim Vansa <rvansa at openjdk.org>
URL:       https://git.openjdk.org/crac/commit/01229e606e0fc307db11e1fc5f6fc196265eba77
Stats:     410 lines in 19 files changed: 332 ins; 22 del; 56 mod

8371462: [CRaC] Improve listening socket reopen through FD policies

Reviewed-by: tpushkin

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

PR: https://git.openjdk.org/crac/pull/275


More information about the crac-dev mailing list