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

charts.d kills process twice #6190

Closed
Steve8291 opened this issue Jun 2, 2019 · 1 comment · Fixed by #6387
Closed

charts.d kills process twice #6190

Steve8291 opened this issue Jun 2, 2019 · 1 comment · Fixed by #6387
Assignees
Labels
area/daemon bug priority/low A 'nice to have' not critical issue

Comments

@Steve8291
Copy link
Contributor

Bug report summary

The following show up in the error.log every time netdata is stopped:
systemctl stop netdata
or
systemctl restart netdata
or
reboot

2019-06-01 07:48:55: netdata ERROR : PLUGINSD[charts.d] : read failed
2019-06-01 07:48:55: netdata ERROR : PLUGINSD[charts.d] : '/usr/libexec/netdata/plugins.d/charts.d.plugin' (pid 27374) disconnected after 50 successful data collections (ENDs).
2019-06-01 07:48:56: netdata INFO : PLUGINSD : stopping plugin thread: plugin:charts.d
2019-06-01 07:48:56: netdata INFO : PLUGINSD[charts.d] : data collection thread exiting
2019-06-01 07:48:56: netdata INFO : PLUGINSD[charts.d] : killing child process pid 27374
2019-06-01 07:48:56: netdata ERROR : PLUGINSD[charts.d] : Request to kill pid 27374, but it is not running. (errno 3, No such process)
2019-06-01 07:48:56: netdata INFO : PLUGINSD[charts.d] : thread with task id 27366 finished

This doesn't really affect netdata running but it does fill up the logs with errors that make it harder to troubleshoot what is really going wrong with a plugin.

It seems like when a shutdown command is given:
/collectors/plugins.d/plugins_d.c keeps trying to read and produces the "read failed" error.
/collectors/plugins.d/plugins_d.c sends the "disconnected after xx successful data collections (ENDs)" error.
This is produced whenever any plugin (charts.d, python.d, etc) exits so I'm guessing it is intended.
collectors/plugins.d/plugins_d.c then attempts to stop the process by calling "killpid" from /daemon/main.c
Somewhere the process has already been killed so /daemon/main.c sends the error "(errno 3, No such process)"

OS / Environment

Ubuntu 18.04 headless server

Netdata version (ouput of netdata -V)

netdata v1.15.0-42-nightly

Component Name

/collectors/charts.d.plugin/charts.d.plugin.in

Steps To Reproduce

Disable all modules except apcupsd or sensors in charts.d.conf (sensors disabled in python.d.conf)
Note: I have tested this with only apcupsd or sensors modules enabled. Both individually produce the same errors on exit. So I'm assuming the errors do not have to do with the modules but with the charts.d plugin
systemctl stop netdata.service
truncate -s 0 /var/log/netdata/error.log
systemctl start netdata.service
No errors will show on start.
systemctl stop netdata.service
All the above errors show.

Expected behavior

Stop or restart without causing exit errors.

@Steve8291 Steve8291 added bug needs triage Issues which need to be manually labelled labels Jun 2, 2019
@cakrit cakrit added area/daemon priority/low A 'nice to have' not critical issue and removed needs triage Issues which need to be manually labelled labels Jun 3, 2019
@cakrit cakrit self-assigned this Jun 3, 2019
@cakrit
Copy link
Contributor

cakrit commented Jun 3, 2019

Thanks @Steve8291 . Not the highest priority, but very good report and what you say makes sense. I'll see what we can do...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/daemon bug priority/low A 'nice to have' not critical issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants