[AAA-235] StackOverflowError in aaa-filterchain Created: 20/Sep/22  Updated: 19/Oct/22  Resolved: 22/Sep/22

Status: Resolved
Project: aaa
Component/s: None
Affects Version/s: 0.16.0, 0.16.1, 0.16.2
Fix Version/s: 0.16.3

Type: Bug Priority: Highest
Reporter: Sangwook Ha Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: pt, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File aaa235-self-reference.png     PNG File aaa235-update.png    
Issue Links:
Duplicate
is duplicated by AAA-236 StackOverFlowError in the AAAFilterChain Resolved
Issue split
split to AAA-237 Select only specifically-marked Filte... Resolved

 Description   

NETCONF throws this error after adopting aaa-0.16.2:

2022-09-19T16:57:01,087 | WARN  | qtp710793964-460 | HttpChannel                      | 145 - org.eclipse.jetty.util - 9.4.48.v20220622 | /rests/data/network-topology:network-topology
java.lang.StackOverflowError: null
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:57) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:91) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.CustomFilterAdapter.doFilter(CustomFilterAdapter.java:75) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:57) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:91) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.CustomFilterAdapter.doFilter(CustomFilterAdapter.java:75) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:57) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:91) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.CustomFilterAdapter.doFilter(CustomFilterAdapter.java:75) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:57) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:91) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.CustomFilterAdapter.doFilter(CustomFilterAdapter.java:75) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:57) ~[?:?]
        at org.opendaylight.aaa.filterchain.filters.AAAFilterChain.doFilter(AAAFilterChain.java:91) ~[?:?]


 Comments   
Comment by Robert Varga [ 22/Sep/22 ]

The reason for this is that CustomFilterAdapter ends up self-referencing itself after being notified of the change. See aaa-235-self-reference.png and see how InstanceFilterDTO's getInstance() returns the same object as the listener being registered.

Also see aaa235-update.png to see the self-reference being injected upon init.

Comment by Robert Varga [ 22/Sep/22 ]

And that in turn is caused by the CustomFilterAdapter being published to OSGi registry for HTTP Whiteboard's use – hence it gets confused with a plain instance filter.

So what needs to happen is that CustomFilterAdapterConfigurationImpl must ignore all filters marked for HTTP Whiteboard.

Comment by Ivan Hrasko [ 22/Sep/22 ]

Yes, we have come to the same conclusion.

Generated at Wed Feb 07 19:09:00 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.