Skip to content
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

Deadlock on hazelcast client shutdown #466

Closed
pablotdl opened this issue Apr 19, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@pablotdl
Copy link

commented Apr 19, 2013

Hi,

we have run into a deadlock issue with hazelcast client. From what I could gather, when the shutdown starts (initiated by Spring's shutdown hook) the connection manager is closed as the first step in the shutdown cycle.

After that, but before the in and out runnables are shutdown, the out runnable detects that the connection is down and tries to recover it (OutRunnable#clusterIsDown()), which of course fails because the connection manager has already shut down. Since it can't recover the connection, it calls lifecycleService#shutdown() which blocks waiting for the lock.

This scenario causes that the client never finishes shutdown, since the customRun method in the OutRunnable is blocking for a shutdown call that can never finish.

pablotdl added a commit to pablotdl/hazelcast that referenced this issue Apr 19, 2013

Issue hazelcast#466, hazelcast client shutdown deadlock.
Changed the execution order so that the connection manager is shut down after the runnables are, this should avoid the reconnection attempt and deadlock.
@pablotdl

This comment has been minimized.

Copy link
Author

commented Apr 19, 2013

I created pull request #467 that should fix the issue. Can someone please review?

pablotdl added a commit to pablotdl/hazelcast that referenced this issue Apr 19, 2013

Issue hazelcast#466, hazelcast client shutdown deadlock.
Changed the execution order so that the connection manager is shut down after the runnables are, this should avoid the reconnection attempt and deadlock.

mdogan added a commit that referenced this issue Apr 20, 2013

@mdogan

This comment has been minimized.

Copy link
Member

commented Apr 20, 2013

Fixed by pull request #467

@mdogan mdogan closed this Apr 20, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.