[crac] RFR: 8349560: [CRaC] Close EPoll FDs when FD policies close registered sockets
Radim Vansa
rvansa at openjdk.org
Thu Feb 6 17:02:20 UTC 2025
FD policies are applied as the last set of JDK resources. When these are meant to close server sockets, it’s rather too late: open EPoll FDs won’t be closed automatically as these have the socket still registered when the automatic close is performed.
We can apply FD policies on sockets and close these if requested before EPoll FD handling. The downside is that we would not handle sockets opened during checkpoint, but generally the application should not do that.
Besides changing the order of closing this PR also improves the way EPoll FDs are reported: the Selector throws BusySelectorException listing channels registered on that selector, and EPoll FD and Event Epoll FD are claimed through Java code with message referencing the selector (this suppresses native open FD detection that wouldn't provide much info).
-------------
Commit messages:
- Improve EPoll FDs printout and close these when the registered channel is closed by FD policies
Changes: https://git.openjdk.org/crac/pull/202/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=202&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349560
Stats: 147 lines in 5 files changed: 139 ins; 4 del; 4 mod
Patch: https://git.openjdk.org/crac/pull/202.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/202/head:pull/202
PR: https://git.openjdk.org/crac/pull/202
More information about the crac-dev
mailing list