[Bug 224135] [net-mgmt/netdata] Spurious errors regarding PID 0 logged every second
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Dec 5 22:51:09 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224135
Bug ID: 224135
Summary: [net-mgmt/netdata] Spurious errors regarding PID 0
logged every second
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: Individual Port(s)
Assignee: mmokhi at freebsd.org
Reporter: nhoyle at hoyletech.com
Assignee: mmokhi at freebsd.org
Flags: maintainer-feedback?(mmokhi at freebsd.org)
When the apps.plugin plugins are enabled (as is common), netdata logs an error
every single poll (1 second by default) to /var/log/netdata/error.log in
regards to PID 0 [kernel], like such:
2017-12-05 17:13:11: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:12: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:13: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:14: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:15: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:16: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:17: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:18: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:19: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:20: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:21: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:22: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:23: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:24: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:25: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:26: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:27: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
2017-12-05 17:13:28: apps.plugin ERROR: Invalid pid 0 read (expected 1 to
99999). Ignoring process.
This appears to be based on a Linux-centric assumption that 1 will be the
lowest observed PID. Because of the logging rate, this quickly triggers the
following as well:
2017-12-05 17:13:29: apps.plugin Too many logs (101 logs in 100 seconds,
threshold is set to 100 logs in 3600 seconds). Preventing more logs from
process 'apps.plugin' for 3500 seconds.
Which may result in more valuable logs being suppressed. I have traced this
flawed check to the "collect_data_for_pid" function in apps_plugin.c, with the
following code:
void collect_data_for_pid(pid_t pid) {
if(unlikely(pid <= 0 || pid > pid_max)) {
error("Invalid pid %d read (expected 1 to %d). Ignoring process.", pid,
pid_max);
return;
}
I have reported this issue to the upstream github project at
https://github.com/firehol/netdata/issues/3099, but a FreeBSD port fix would be
welcome until this is addressed upstream.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list