Cancelled key may fail select()

Simone Bordet simone.bordet at gmail.com
Tue Feb 11 22:30:21 UTC 2020


Hi,

On Tue, Feb 11, 2020 at 11:11 PM Alan Bateman <Alan.Bateman at oracle.com> wrote:
> Do you have a reproducer?

No. It seems to happen more frequently on the FreeBSD port of OpenJDK.

> I assume this doesn't duplicate with JDK 13 or
> newer, the reason is that the SocketChannelImpl::kill implementation
> doesn't throw.

I see that SelChImpl.kill() still declares throws IOException.

When you say "does not throw" you mean that the native implementation
for all OSes does not throw even if the signature declares it?
Would be it possible for other implementations (e.g. FreeBSD) to throw
and still comply with the signature, but be handled badly by common
OpenJDK classes?

Thanks!

-- 
Simone Bordet
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


More information about the nio-dev mailing list