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

zebra: Ebgp neighbor stuck in active state if multihop cli given befo… #3387

Closed
wants to merge 4 commits into from

Conversation

bisdhdh
Copy link
Member

@bisdhdh bisdhdh commented Nov 28, 2018

…re the update-source #3264

Summary

[What is happening here is, when we try to create a BGP session b/w two neighbour, we open two sockets per neighbour.   Out of theses two sockets (which BGP opens per peer in the initial stage to bring up the session i.e one socket for sending connect request to the neighbour and the other is the listening socket, which would be waiting for the connect request from the neighbour.), the connect socket is kind of closed for this peer and the listening socket path is working fine.]

Related Issue

[ Zebra was not responding to re-registration messages from bgp due to which the next hop (which was reset in BGP) was not getting resolved. So bgp was not preceding ahead with this next hop and there was a deadlock
created for this next hop. If similar scenario happens in the neighbour FRR router. As a result of that both the neighbour would NOT try to connect each other and will depend on each other to initiate the connection ,which is never going to happen
if both the neighbours are having this same bug, it’s a deadlock.

So, in-order to avoid this deadlock Zebra would respond to the client registration request, even if next-hop is already registered. This change is needed as bgp's neighbour machine, for this particular neighbour goes into dead lock state, and never send
any connect request to this neighbour.
]

Components

[zebra]

Signed-off-by: Biswajit Sadhu bsadhu@vmware.com

…re the update-source FRRouting#3264

What is happening here is, when we try to create a BGP session b/w two neighbour, we open two sockets per neighbour.   Out of theses two sockets (which BGP opens per peer in the initial stage to bring up the session i.e one socket for sending connect request to the neighbour and the other is the listening socket, which would be waiting for the connect request from the neighbour.), the connect socket is kind of closed for this peer and the listening socket path is working fine.
So if a new connection request doesn’t arrive to either of this two neighbour, this session b/w these two peers would never come up. It’s a kind of deadlock where either of the peer is waiting on the other to initiate the connection.

Zebra was not responding to re-registration messages from bgp due to  which the next hop (which was reset in BGP) was not getting resolved. So bgp was not preceding ahead with this next hop and there was a deadlock
created for this next hop.  If similar scenario happens in the neighbour FRR router. As a result of that both the neighbour would NOT try to connect each other and will depend on each other to initiate the connection ,which is never going to happen
if both the neighbours are having this same bug, it’s a deadlock.

So, in-order to avoid this deadlock Zebra would respond to the client registration request, even if next-hop is already registered. This change is needed as bgp's neighbour machine, for this particular neighbour goes into dead lock state, and never send
any connect request to this neighbour.
@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 28, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3387 30eb2cf
Date 11/28/2018
Start 05:30:20
Finish 05:53:51
Run-Time 23:31
Total 1813
Pass 1813
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-11-28-05:30:20.txt
Log autoscript-2018-11-28-05:31:03.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6013/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

<stdin>:11: trailing whitespace.
        /* 
<stdin>:12: trailing whitespace.
         * Zebra was not responding to re-registration messages from bgp due to 
<stdin>:15: trailing whitespace.
         * created for this next hop. 
<stdin>:16: trailing whitespace.
         * If similar scenario happens in the neighbour FRR router. As a result of that 
<stdin>:17: trailing whitespace.
         * both the neighbour would NOT try to connect each other and will depend on 
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.
Report for zebra_rnh.c | 66 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #216: FILE: /tmp/f1-20109/zebra_rnh.c:216:
< ERROR: trailing whitespace
< #219: FILE: /tmp/f1-20109/zebra_rnh.c:219:
< ERROR: code indent should use tabs where possible
< #219: FILE: /tmp/f1-20109/zebra_rnh.c:219:
< ERROR: trailing whitespace
< #220: FILE: /tmp/f1-20109/zebra_rnh.c:220:
< ERROR: code indent should use tabs where possible
< #220: FILE: /tmp/f1-20109/zebra_rnh.c:220:
< ERROR: code indent should use tabs where possible
< #221: FILE: /tmp/f1-20109/zebra_rnh.c:221:
< WARNING: line over 80 characters
< #222: FILE: /tmp/f1-20109/zebra_rnh.c:222:
< ERROR: code indent should use tabs where possible
< #222: FILE: /tmp/f1-20109/zebra_rnh.c:222:
< ERROR: trailing whitespace
< #223: FILE: /tmp/f1-20109/zebra_rnh.c:223:
< ERROR: code indent should use tabs where possible
< #223: FILE: /tmp/f1-20109/zebra_rnh.c:223:
< ERROR: trailing whitespace
< #224: FILE: /tmp/f1-20109/zebra_rnh.c:224:
< WARNING: line over 80 characters
< #224: FILE: /tmp/f1-20109/zebra_rnh.c:224:
< ERROR: code indent should use tabs where possible
< #224: FILE: /tmp/f1-20109/zebra_rnh.c:224:
< ERROR: trailing whitespace
< #225: FILE: /tmp/f1-20109/zebra_rnh.c:225:
< WARNING: line over 80 characters
< #225: FILE: /tmp/f1-20109/zebra_rnh.c:225:
< ERROR: code indent should use tabs where possible
< #225: FILE: /tmp/f1-20109/zebra_rnh.c:225:
< ERROR: code indent should use tabs where possible
< #226: FILE: /tmp/f1-20109/zebra_rnh.c:226:
< ERROR: code indent should use tabs where possible
< #227: FILE: /tmp/f1-20109/zebra_rnh.c:227:
< ERROR: trailing whitespace
< #228: FILE: /tmp/f1-20109/zebra_rnh.c:228:
< WARNING: line over 80 characters
< #228: FILE: /tmp/f1-20109/zebra_rnh.c:228:
< ERROR: code indent should use tabs where possible
< #228: FILE: /tmp/f1-20109/zebra_rnh.c:228:
< WARNING: line over 80 characters
< #229: FILE: /tmp/f1-20109/zebra_rnh.c:229:
< ERROR: code indent should use tabs where possible
< #229: FILE: /tmp/f1-20109/zebra_rnh.c:229:
< ERROR: trailing whitespace
< #230: FILE: /tmp/f1-20109/zebra_rnh.c:230:
< WARNING: line over 80 characters
< #230: FILE: /tmp/f1-20109/zebra_rnh.c:230:
< ERROR: code indent should use tabs where possible
< #230: FILE: /tmp/f1-20109/zebra_rnh.c:230:
< ERROR: trailing whitespace
< #231: FILE: /tmp/f1-20109/zebra_rnh.c:231:
< WARNING: line over 80 characters
< #231: FILE: /tmp/f1-20109/zebra_rnh.c:231:
< ERROR: code indent should use tabs where possible
< #231: FILE: /tmp/f1-20109/zebra_rnh.c:231:
< ERROR: trailing whitespace
< #232: FILE: /tmp/f1-20109/zebra_rnh.c:232:
< ERROR: code indent should use tabs where possible
< #232: FILE: /tmp/f1-20109/zebra_rnh.c:232:
< ERROR: trailing whitespace
< #233: FILE: /tmp/f1-20109/zebra_rnh.c:233:
< ERROR: code indent should use tabs where possible
< #233: FILE: /tmp/f1-20109/zebra_rnh.c:233:

CLANG Static Analyzer Summary

  • Github Pull Request 3387, comparing to Git base SHA 6c24111

No Changes in Static Analysis warnings compared to base

@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 29, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3387 991186c
Date 11/29/2018
Start 00:00:15
Finish 00:23:49
Run-Time 23:34
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-11-29-00:00:15.txt
Log autoscript-2018-11-29-00:00:56.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6023/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

<stdin>:19: trailing whitespace.
        /* 
<stdin>:20: trailing whitespace.
         * Zebra was not responding to re-registration messages from bgp due to 
<stdin>:23: trailing whitespace.
         * created for this next hop. 
<stdin>:24: trailing whitespace.
         * If similar scenario happens in the neighbour FRR router. As a result of that 
<stdin>:25: trailing whitespace.
         * both the neighbour would NOT try to connect each other and will depend on 
warning: squelched 5 whitespace errors
warning: 10 lines add whitespace errors.
Report for zebra_rnh.c | 66 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #216: FILE: /tmp/f1-29703/zebra_rnh.c:216:
< ERROR: trailing whitespace
< #220: FILE: /tmp/f1-29703/zebra_rnh.c:220:
< ERROR: code indent should use tabs where possible
< #220: FILE: /tmp/f1-29703/zebra_rnh.c:220:
< ERROR: trailing whitespace
< #221: FILE: /tmp/f1-29703/zebra_rnh.c:221:
< ERROR: code indent should use tabs where possible
< #221: FILE: /tmp/f1-29703/zebra_rnh.c:221:
< ERROR: code indent should use tabs where possible
< #222: FILE: /tmp/f1-29703/zebra_rnh.c:222:
< WARNING: line over 80 characters
< #223: FILE: /tmp/f1-29703/zebra_rnh.c:223:
< ERROR: code indent should use tabs where possible
< #223: FILE: /tmp/f1-29703/zebra_rnh.c:223:
< ERROR: trailing whitespace
< #224: FILE: /tmp/f1-29703/zebra_rnh.c:224:
< ERROR: code indent should use tabs where possible
< #224: FILE: /tmp/f1-29703/zebra_rnh.c:224:
< ERROR: trailing whitespace
< #225: FILE: /tmp/f1-29703/zebra_rnh.c:225:
< WARNING: line over 80 characters
< #225: FILE: /tmp/f1-29703/zebra_rnh.c:225:
< ERROR: code indent should use tabs where possible
< #225: FILE: /tmp/f1-29703/zebra_rnh.c:225:
< ERROR: trailing whitespace
< #226: FILE: /tmp/f1-29703/zebra_rnh.c:226:
< WARNING: line over 80 characters
< #226: FILE: /tmp/f1-29703/zebra_rnh.c:226:
< ERROR: code indent should use tabs where possible
< #226: FILE: /tmp/f1-29703/zebra_rnh.c:226:
< ERROR: code indent should use tabs where possible
< #227: FILE: /tmp/f1-29703/zebra_rnh.c:227:
< ERROR: code indent should use tabs where possible
< #228: FILE: /tmp/f1-29703/zebra_rnh.c:228:
< ERROR: trailing whitespace
< #229: FILE: /tmp/f1-29703/zebra_rnh.c:229:
< WARNING: line over 80 characters
< #229: FILE: /tmp/f1-29703/zebra_rnh.c:229:
< ERROR: code indent should use tabs where possible
< #229: FILE: /tmp/f1-29703/zebra_rnh.c:229:
< WARNING: line over 80 characters
< #230: FILE: /tmp/f1-29703/zebra_rnh.c:230:
< ERROR: code indent should use tabs where possible
< #230: FILE: /tmp/f1-29703/zebra_rnh.c:230:
< ERROR: trailing whitespace
< #231: FILE: /tmp/f1-29703/zebra_rnh.c:231:
< WARNING: line over 80 characters
< #231: FILE: /tmp/f1-29703/zebra_rnh.c:231:
< ERROR: code indent should use tabs where possible
< #231: FILE: /tmp/f1-29703/zebra_rnh.c:231:
< ERROR: trailing whitespace
< #232: FILE: /tmp/f1-29703/zebra_rnh.c:232:
< WARNING: line over 80 characters
< #232: FILE: /tmp/f1-29703/zebra_rnh.c:232:
< ERROR: code indent should use tabs where possible
< #232: FILE: /tmp/f1-29703/zebra_rnh.c:232:
< ERROR: trailing whitespace
< #233: FILE: /tmp/f1-29703/zebra_rnh.c:233:
< ERROR: code indent should use tabs where possible
< #233: FILE: /tmp/f1-29703/zebra_rnh.c:233:
< ERROR: trailing whitespace
< #234: FILE: /tmp/f1-29703/zebra_rnh.c:234:
< ERROR: code indent should use tabs where possible
< #234: FILE: /tmp/f1-29703/zebra_rnh.c:234:

CLANG Static Analyzer Summary

  • Github Pull Request 3387, comparing to Git base SHA d5215d5

No Changes in Static Analysis warnings compared to base

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

Can you fix the clang warnings above? I see a few trailing whitespace errors.

@srimohans srimohans added the submitter action required The author/submitter needs to do something (fix, rebase, add info, etc.) label Nov 29, 2018
@bisdhdh
Copy link
Member Author

bisdhdh commented Nov 30, 2018

@riw777 white spaces removed from comments.

@LabN-CI
Copy link
Collaborator

LabN-CI commented Nov 30, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/3387 5369c12
Date 11/29/2018
Start 23:10:13
Finish 23:33:42
Run-Time 23:29
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-11-29-23:10:13.txt
Log autoscript-2018-11-29-23:10:55.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6033/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

<stdin>:18: trailing whitespace.
	/* 
<stdin>:19: trailing whitespace.
	* Zebra was not responding to re-registration messages from bgp due to 
<stdin>:22: trailing whitespace.
	* created for this next hop. 
<stdin>:24: trailing whitespace.
	* both the neighbour would NOT try to connect each other and will depend on 
<stdin>:28: trailing whitespace.
	* even if next-hop is already registered. This change is needed as bgp's neighbour 
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Report for zebra_rnh.c | 28 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #216: FILE: /tmp/f1-10901/zebra_rnh.c:216:
< ERROR: trailing whitespace
< #220: FILE: /tmp/f1-10901/zebra_rnh.c:220:
< ERROR: trailing whitespace
< #221: FILE: /tmp/f1-10901/zebra_rnh.c:221:
< WARNING: Block comments should align the * on each line
< #221: FILE: /tmp/f1-10901/zebra_rnh.c:221:
< WARNING: line over 80 characters
< #223: FILE: /tmp/f1-10901/zebra_rnh.c:223:
< ERROR: trailing whitespace
< #224: FILE: /tmp/f1-10901/zebra_rnh.c:224:
< WARNING: line over 80 characters
< #225: FILE: /tmp/f1-10901/zebra_rnh.c:225:
< ERROR: trailing whitespace
< #226: FILE: /tmp/f1-10901/zebra_rnh.c:226:
< WARNING: line over 80 characters
< #226: FILE: /tmp/f1-10901/zebra_rnh.c:226:
< WARNING: line over 80 characters
< #229: FILE: /tmp/f1-10901/zebra_rnh.c:229:
< ERROR: trailing whitespace
< #230: FILE: /tmp/f1-10901/zebra_rnh.c:230:
< WARNING: line over 80 characters
< #230: FILE: /tmp/f1-10901/zebra_rnh.c:230:
< ERROR: trailing whitespace
< #231: FILE: /tmp/f1-10901/zebra_rnh.c:231:
< WARNING: line over 80 characters
< #231: FILE: /tmp/f1-10901/zebra_rnh.c:231:

CLANG Static Analyzer Summary

  • Github Pull Request 3387, comparing to Git base SHA d5215d5

No Changes in Static Analysis warnings compared to base

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-6034/

This is a comment from an EXPERIMENTAL automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.


Warnings Generated during build:

Checkout code: Successful with additional warnings:

<stdin>:18: trailing whitespace.
	/* 
<stdin>:19: trailing whitespace.
	* Zebra was not responding to re-registration messages from bgp due to 
<stdin>:22: trailing whitespace.
	* created for this next hop. 
<stdin>:24: trailing whitespace.
	* both the neighbour would NOT try to connect each other and will depend on 
<stdin>:28: trailing whitespace.
	* even if next-hop is already registered. This change is needed as bgp's neighbour 
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.
Report for zebra_rnh.c | 28 issues
===============================================
< WARNING: braces {} are not necessary for single statement blocks
< #216: FILE: /tmp/f1-16767/zebra_rnh.c:216:
< ERROR: trailing whitespace
< #219: FILE: /tmp/f1-16767/zebra_rnh.c:219:
< ERROR: trailing whitespace
< #220: FILE: /tmp/f1-16767/zebra_rnh.c:220:
< WARNING: Block comments should align the * on each line
< #220: FILE: /tmp/f1-16767/zebra_rnh.c:220:
< WARNING: line over 80 characters
< #222: FILE: /tmp/f1-16767/zebra_rnh.c:222:
< ERROR: trailing whitespace
< #223: FILE: /tmp/f1-16767/zebra_rnh.c:223:
< WARNING: line over 80 characters
< #224: FILE: /tmp/f1-16767/zebra_rnh.c:224:
< ERROR: trailing whitespace
< #225: FILE: /tmp/f1-16767/zebra_rnh.c:225:
< WARNING: line over 80 characters
< #225: FILE: /tmp/f1-16767/zebra_rnh.c:225:
< WARNING: line over 80 characters
< #228: FILE: /tmp/f1-16767/zebra_rnh.c:228:
< ERROR: trailing whitespace
< #229: FILE: /tmp/f1-16767/zebra_rnh.c:229:
< WARNING: line over 80 characters
< #229: FILE: /tmp/f1-16767/zebra_rnh.c:229:
< ERROR: trailing whitespace
< #230: FILE: /tmp/f1-16767/zebra_rnh.c:230:
< WARNING: line over 80 characters
< #230: FILE: /tmp/f1-16767/zebra_rnh.c:230:

CLANG Static Analyzer Summary

  • Github Pull Request 3387, comparing to Git base SHA d5215d5

No Changes in Static Analysis warnings compared to base

@donaldsharp
Copy link
Member

This has been fixed already, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
submitter action required The author/submitter needs to do something (fix, rebase, add info, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants