-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
OSPF does not fully free up MTYPE memory on shutdown as it should #14855
Comments
As a note this might not be a full example of all the ospf mtype leaks as that this is only one of the tests being run. There are probably some more that should be looked at and handled |
I dont know if there is any relation, but I observed a strange behavior with GR (frr 9.0.1) in bgpd (sorry for off topic, but could be somehow useful). When 'graceful-restart-disable' is set per neighboor, after some time I see in the logs this: "buffer_flush_available: write error on fd XX: Bad file descriptor", which makes me thing something is wrong with the structure (in the memory) which holds data about the connection peer info (where fd is stored), maybe wrong pointer swap for that structure (if the logic on init new peer connection, is forget old make new), or something similar. Not debug enough to tell exactly. |
The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes FRRouting#14855. Signed-off-by: Renato Westphal <[email protected]>
The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes FRRouting#14855. Signed-off-by: Renato Westphal <[email protected]>
The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes FRRouting#14855. Signed-off-by: Renato Westphal <[email protected]>
The ospfd cleanup code is relatively complicated given the need to appropriately handle the "max-metric router-lsa on-shutdown (5-100)" command. When that command is configured and an OSPF instance is unconfigured, the removal of the instance should be deferred to allow other routers sufficient time to find alternate paths before the local Router-LSAs are flushed. When ospfd is killed, however, deferred shutdown shouldn't take place and all instances should be cleared immediately. This commit fixes a problem where ospf_deferred_shutdown_finish() was prematurely exiting the daemon when no instances were left, inadvertently preventing ospf_terminate() from clearing the ospfd global variables. Additionally, the commit includes code refactoring to enhance readability and maintainability. Fixes FRRouting#14855. Signed-off-by: Renato Westphal <[email protected]>
Running our topotests ospfd is spitting out a bunch of memory being leaked on shutdown:
As far as I can tell this is a result of the ospf gr changes that were made. This should be cleaned up.
The text was updated successfully, but these errors were encountered: