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

Improve dyncfg exit #15824

Merged
merged 2 commits into from Aug 17, 2023
Merged

Improve dyncfg exit #15824

merged 2 commits into from Aug 17, 2023

Conversation

underhood
Copy link
Contributor

@underhood underhood commented Aug 16, 2023

Summary

Fix #15821
Cherry picks some of the fixes from other PRs to merge it sooner

Test Plan

You should not see
2023-08-16 17:59:04: netdata ERROR : MAIN : Main thread DYNCFG takes too long to exit. Giving up...
on netdatacli shutdown-agent and netdata should exit faster

Additional Information
For users: How does this change affect me?

Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

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

The PR reached the goal:

[root@archlinux netdata]# grep DYNCFG /var/log/netdata/*
/var/log/netdata/error.log:2023-08-17 00:01:14: netdata INFO  : DYNCFG : (0250@libnetdata/threads/t:netdata_thread_): thread created with task id 26684
/var/log/netdata/error.log:2023-08-17 00:01:14: netdata INFO  : DYNCFG : (0210@libnetdata/threads/t:thread_set_name): set name of thread 26684 to DYNCFG
/var/log/netdata/error.log:2023-08-17 00:07:58: netdata INFO  : MAIN : (0671@daemon/main.c       :cancel_main_thr): EXIT: Stopping main thread: DYNCFG
/var/log/netdata/error.log:2023-08-17 00:07:58: netdata INFO  : DYNCFG : (0895@libnetdata/dyn_conf/:dyncfg_cleanup ): cleaning up...
/var/log/netdata/error.log:2023-08-17 00:07:58: netdata INFO  : DYNCFG : (0176@libnetdata/threads/t:thread_cleanup ): thread with task id 26684 finished
/var/log/netdata/error.log:2023-08-17 00:16:31: netdata INFO  : DYNCFG : (0250@libnetdata/threads/t:netdata_thread_): thread created with task id 27116
/var/log/netdata/error.log:2023-08-17 00:16:31: netdata INFO  : DYNCFG : (0210@libnetdata/threads/t:thread_set_name): set name of thread 27116 to DYNCFG
/var/log/netdata/error.log:2023-08-17 00:26:14: netdata INFO  : MAIN : (0671@daemon/main.c       :cancel_main_thr): EXIT: Stopping main thread: DYNCFG
/var/log/netdata/error.log:2023-08-17 00:26:14: netdata INFO  : DYNCFG : (0895@libnetdata/dyn_conf/:dyncfg_cleanup ): cleaning up...
/var/log/netdata/error.log:2023-08-17 00:26:14: netdata INFO  : DYNCFG : (0176@libnetdata/threads/t:thread_cleanup ): thread with task id 27116 finished

LGTM!

@ilyam8 ilyam8 merged commit cec38dd into netdata:master Aug 17, 2023
129 checks passed
@underhood underhood deleted the improve_dyncfg_exit branch August 17, 2023 09:28
Ferroin pushed a commit that referenced this pull request Aug 22, 2023
stelfrag pushed a commit to stelfrag/netdata that referenced this pull request Aug 23, 2023
(cherry picked from commit cec38dd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: On every restart: "Main thread DYNCFG takes too long to exit. Giving up..."
4 participants