[BGPCEP-525] BGP session creation potentially caused deadlock Created: 18/Aug/16 Updated: 03/Mar/19 Resolved: 19/Aug/16 |
|
| Status: | Resolved |
| Project: | bgpcep |
| Component/s: | BGP |
| Affects Version/s: | Bugzilla Migration |
| Fix Version/s: | Bugzilla Migration |
| Type: | Bug | ||
| Reporter: | Kevin Wang | Assignee: | Kevin Wang |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6470 |
| Description |
|
In AbstractBGPSessionNegotiator, handleMessage() was able to be invoked by channel.pipeline().replace(..) recursively. So when handling a BGP message, it could happen that this.state gets out of sync and exception got thrown. In handleOpen(..) of AbstractBGPSessionNegotiator, when we new a BGPSessionImpl(), we replace the handler in channel.pipeline() to change the extend message coder. If a message arrived during the replacement, another handleMessage() will be invoked (in the same thread). However, as the BGPSessionImpl hasn't returned and session is not set, handleMessage() will throw out a BGP_FSM error. This is causing an intermittent failure in BGPDispatcherImplTest. |
| Comments |
| Comment by Kevin Wang [ 18/Aug/16 ] |
| Comment by Milos Fabian [ 19/Aug/16 ] |
|
stable/boron: https://git.opendaylight.org/gerrit/#/c/44382/ |