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

[MSC-204] Fixing invalid shutdown listener notifications #65

Merged
merged 3 commits into from
Feb 23, 2018

Conversation

ropalka
Copy link
Contributor

@ropalka ropalka commented Feb 23, 2018

No description provided.

…otification.

Before this fix there were scenarios possible that
shutdown listener have been invoked more than once
and it caused service container to freeze because
container executor have been shutdown prematurely.

Problematic usecase exposing this problem was:
 * service container have been shutdown (registering
   shutdown listener with all available service controllers)
 * problematic service controller entered REMOVED state and
   called listener.controllerDied() on shutdown listener
 * another concurrent thread later called addListener()
   on such problematic already dead controller
   (it happened because shutdown was initiated during server boot)
   and it resulted in two listeners being created:
    - one for LISTENER_ADDED notification
    - and one for Transition.REMOVING_to_REMOVED transition
   When last transition listener finished execution
   and because shutdown listener wasn't cleared
   it called shutdown listener.controllerDied() second time
   on dead controller which resulted in incorrect notification.
@ropalka ropalka merged commit 0a73413 into jboss-msc:master Feb 23, 2018
@ropalka ropalka deleted the MSC-204 branch February 23, 2018 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants