[crac] RFR: 8369394: [CRaC] java.nio.channels.ClosedSelectorException in sun.nio.ch.SelectorImpl.ensureOpen [v2]

Roman Marchenko rmarchenko at openjdk.org
Thu Oct 9 06:38:50 UTC 2025


On Wed, 8 Oct 2025 14:42:53 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:

>> src/java.base/linux/classes/sun/nio/ch/EPollSelectorImpl.java line 89:
>> 
>>> 87:             try {
>>> 88:                 selector.select(1);
>>> 89:             } catch (IOException | RuntimeException e) {
>> 
>> I am worried that suppressing exceptions beyond `ClosedSelectorException` could hide a future underlying problem. Do you have a strong reason to suppress also NPEs, for instance?
>
> I have no strong reasons, I was thinking it could throw RuntimeException derived exceptions, like IllegalStateException, IllegalArgumentException, and ClosedSelectorException, so we can suppress them all, as it is just a "push" for a Selector here.
> 
> But you're right, we could miss something important doing this way, so I can replace it with ClosedSelectorException.

done

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

PR Review Comment: https://git.openjdk.org/crac/pull/267#discussion_r2415709592


More information about the crac-dev mailing list