New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[io] Thread leak after HazelcastInstance.shutdown() in 3.8.2 so JVM won't exit #10886
Comments
it looks so, thank you for reporting! |
Just tried 3.8.3, and the issue does not appear. Thanks! Regards, |
Good points. I'll have a closer look; the amount of code called from the IO thread is limited. Lets see if we can find the violating code. |
I see one potential problem already. If an InterruptedException is thrown in the SelectionHandler.handle method, it isn't correctly handled. It is just caught as Throwable and not checked for InterruptedException; and the flag isn't restored. |
Even though the above InterruptedException handling isn't correct, it isn't the cause. Another problem is with the PacketDispatcherImpl which also catches all exceptions and doesn't handle the InterruptedException specifically |
Also the PacketDispatcherImpl isn't the (last) cause. Search continues |
Provided a customer InterruptedException that provides some more info:
And finding one more source of gobbling the exception:
Which leads to
|
Hi all,
On my system, (Ubuntu 14.04, Java 1.8.0_131-b11, hazelcast-all.jar version 3.8.2), the following program often hangs after printing 'all instances shut down':
A jstack dump of the hanging Java process reveals a non-daemon Hazelcast thread hanging in NonBlockingIOThread.selectLoop():
Is this a bug in Hazelcast?
Kind regards,
Wil Evers
The text was updated successfully, but these errors were encountered: