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

broker: misc cleanup / refactoring #2178

Merged
merged 7 commits into from Jun 6, 2019

Conversation

@chu11
Copy link
Contributor

commented Jun 6, 2019

While looking at #1036, fixed up a bunch of tiny issues I saw. Also refactored a few things for consistency. Note that some of these might eventually lead to more cleanup / refactoring (i.e. some type of ctx_init() type of the function), but I'll leave that for another day. I thought this was a good stopping point of cleanups.

chu11 added 7 commits Jun 5, 2019
When trying to restore default sigmasks, do not log_err_exit()
on error, just fallthrough to continue cleanup path of broker.
For consistency, make all create functions (i.e. attr_create(),
heartbeat_create(), etc.) return ENOMEM on error.  Check for error
appropriately from callers.
Move several ctx initializations to same place in broker main.
Rename to shutdown_set_flux() for consistency to rest of broker
(i.e. content_cache_set_flux(), hello_set_flux(), etc.).
Move unregistration into attr_destroy().  Call attr_destroy() at
appropriate point in broker instead of attr_unregister_handlers().
@chu11 chu11 force-pushed the chu11:broker_cleanup1 branch from b7fe269 to d5b632e Jun 6, 2019
@chu11

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

Hmmm, hit a valgrind issue in 1 run, but nothing obvious. Re-run

==31779== 
==31779== HEAP SUMMARY:
==31779==     in use at exit: 27,632 bytes in 70 blocks
==31779==   total heap usage: 25,667 allocs, 25,597 frees, 17,205,479 bytes allocated
==31779== 
==31779== LEAK SUMMARY:
==31779==    definitely lost: 0 bytes in 0 blocks
==31779==    indirectly lost: 0 bytes in 0 blocks
==31779==      possibly lost: 0 bytes in 0 blocks
==31779==    still reachable: 27,632 bytes in 70 blocks
==31779==         suppressed: 0 bytes in 0 blocks
==31779== Reachable blocks (those to which a pointer was found) are not shown.
==31779== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==31779== 
==31779== For counts of detected and suppressed errors, rerun with: -v
==31779== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
flux-start: 0 (pid 31778) Killed
not ok 1 - valgrind reports no new errors on 2 broker run
@garlick

This comment has been minimized.

Copy link
Member

commented Jun 6, 2019

This all looks fine to me. Ready?

@chu11

This comment has been minimized.

Copy link
Contributor Author

commented Jun 6, 2019

yup

@garlick garlick merged commit c3f4723 into flux-framework:master Jun 6, 2019
2 checks passed
2 checks passed
Summary 1 potential rule
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.