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

[WFCORE-4774] Avoid circular recursion searching for capability status #4038

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

yersan
Copy link
Collaborator

@yersan yersan commented Dec 13, 2019

We could have capabilities with circular requirements, e.g. an attribute that adds a capability reference from a parent capability to a child capability when the child capability already requires its parent.

In those cases, when the server is in restart-required and the capability to check is not the one that was recorded as restart-required, a stack overflow exception is thrown.

Jira issue: https://issues.redhat.com/browse/WFCORE-4774

@wildfly-ci wildfly-ci added the deps-ok Dependencies have been checked, and there are no significant changes label Dec 13, 2019
} // else defer reload-required check until after we search requirements for restart-required

visited.add(id);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only relevant change, move it outside of the previous if to make it count when we have capabilities in the restartCapabilities. I'm not sure what was the original intention, looks like it was expected to have it in the restartCapabilities array, but that's not always true. I renamed it to visited instead of examined, since examined could mean already checked its status, which is not correct at this point. At the end of this method, the capability is checked (examined) to see if it is in the reloadCapabilities. I found visited more adequate.

@wildfly-ci
Copy link

Core - Full Integration Build 9245 outcome was UNKNOWN using a merge of 38aed9f
Summary: Canceled (Tests passed: 999, ignored: 14; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:21:13

@wildfly-ci
Copy link

Core - Full Integration Build 9243 outcome was UNKNOWN using a merge of 38aed9f
Summary: Canceled (Tests passed: 1857, ignored: 35; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:21:13

@yersan yersan changed the title [WFLY-12865] Avoid circular recursion searching for capability status [WFCORE-4774] Avoid circular recursion searching for capability status Dec 13, 2019
@jmesnil jmesnil merged commit e8bb504 into wildfly:master Dec 17, 2019
@jmesnil
Copy link
Member

jmesnil commented Dec 17, 2019

@yersan thanks

@yersan yersan deleted the bugs/WFLY-12865 branch February 20, 2020 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deps-ok Dependencies have been checked, and there are no significant changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants