-
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
zebra: FPM should have a way of shutting down #5361
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just had one small question
@@ -2029,11 +2031,21 @@ static int zfpm_init(struct thread_master *master) | |||
return 0; | |||
} | |||
|
|||
static int zfpm_fini(void) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do stop_stats_timer
also, or is that one ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
0a07623
to
fada54a
Compare
When we shut down zebra, we were not doing anything to shut down the FPM. Perform the necessary occult rituals and stop the threads from running during early shutdown. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
fada54a
to
f0c459f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good to me
@@ -2029,11 +2031,24 @@ static int zfpm_init(struct thread_master *master) | |||
return 0; | |||
} | |||
|
|||
static int zfpm_fini(void) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we take care of the below two or these are taken care else where for closing the FPM connection ?
- close the zfpm_g->sock socket ?
- reset zfpm_g->ibuf and zfpm_g->obuf ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are all sorts of memory leaks in the fpm code upon shutdown. I made no attempt to actually resolve those as that I believe a crash is worse than a memory leak on shutdown. imo someone needs to take ownership of the fpm code and fix this issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donaldsharp I will investigate to find such leaks and will take care of fixing. Could you please list if you have any thing on top of you mind ?
I will go ahead and merge after CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the socket is not closed, ibuf and obuf are not freed there is a mac hash table that is not freed. That is just off the top of my head
🚧 Basic BGPD CI results: Partial FAILURE, 1 tests failedResults table
For details, please contact louberger |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9751/ This is a comment from an automated CI system. clang_check |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9752/ This is a comment from an automated CI system. clang_check |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-9753/ This is a comment from an automated CI system. clang_check |
When we shut down zebra, we were not doing anything to shut
down the FPM. Perform the necessary occult rituals and
stop the threads from running during early shutdown.
Signed-off-by: Donald Sharp sharpd@cumulusnetworks.com