[ 
https://issues.apache.org/jira/browse/NIFI-5377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16540980#comment-16540980
 ] 

ASF subversion and git services commented on NIFI-5377:
-------------------------------------------------------

Commit 54bb511e579a00535c976159fa2903385af74f77 in nifi's branch 
refs/heads/support/nifi-1.7.x from [~markap14]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=54bb511 ]

NIFI-5377: Addressed issue of infinite recursion when enabling/disabling 
controller services if there is a recursive loop (i.e., Service A references 
Service B references Service A). This closes #2847

Signed-off-by: Matt Gilman <[email protected]>


> StandardNiFiServiceFacade: Recursive method call allows for Stack Overflow 
> when a circular reference exists
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5377
>                 URL: https://issues.apache.org/jira/browse/NIFI-5377
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.7.0
>            Reporter: Jon Kessler
>            Assignee: Mark Bean
>            Priority: Minor
>             Fix For: 1.8.0, 1.7.1
>
>         Attachments: 
> 0001-NIFI-5377-Addressed-issue-of-infinite-recursion-when.patch
>
>
> At a minimum, when you attempt to view a list of controller services in the 
> gui this specific method is called to obtain a set of referenced controller 
> service identifiers. If there is a circular dependency in that set, you end 
> up with an infinite loop that ultimately results the user being redirected to 
> an error page in the gui.
> The method in question is 
> findControllerServiceReferencingComponentIdentifiers. It checks to see if 
> each node has been visited already but does not add them to the set until 
> after recursively calling itself again. If the line "visited.add(node);" is 
> moved above the method call, this will be resolved.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to