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

CPU plugin fails to load on Mac OS X #22

Closed
octo opened this Issue Feb 21, 2012 · 34 comments

Comments

Projects
None yet
@octo
Member

octo commented Feb 21, 2012

From: yozshura (Mantis #32)
OS: Mac OS X Snow Leopard (10.6.7)

Here is excerpt from log file:

[2011-05-20 03:16:13] cpu plugin: host_processors returned 4
[2011-05-20 03:16:13] Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.
[2011-05-20 03:16:13] Initialization complete, entering read-loop.
[2011-05-20 03:16:13] rrdtool plugin: Adjusting "RandomTimeout" to 0.000 seconds.
[2011-05-20 03:20:01] Exiting normally.

System: Macbook Pro 2011, Snow Leopard 10.6.7 64bit

octo added a commit that referenced this issue Feb 25, 2012

Merge pull request #22 from bostjan/master
php-collection: Fixed DS definitions for apache_bytes, apache_requests and apache_scoreboard merge
@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Sep 11, 2012

Member

Looks like an invalid argument to host_processors:

#define KERN_INVALID_ARGUMENT       4
        /* The function requested was not applicable to this
         * type of argument, or an argument is invalid
         */
Member

octo commented Sep 11, 2012

Looks like an invalid argument to host_processors:

#define KERN_INVALID_ARGUMENT       4
        /* The function requested was not applicable to this
         * type of argument, or an argument is invalid
         */
@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Sep 11, 2012

Member

From http://www.linuxselfhelp.com/gnu/machinfo/html_chapter/mach_9.html:
"This function returns KERN_SUCCESS if the call succeeded, KERN_INVALID_ARGUMENT if host_priv is not a privileged host port, and KERN_INVALID_ADDRESS if processor_count points to inaccessible memory."

Member

octo commented Sep 11, 2012

From http://www.linuxselfhelp.com/gnu/machinfo/html_chapter/mach_9.html:
"This function returns KERN_SUCCESS if the call succeeded, KERN_INVALID_ARGUMENT if host_priv is not a privileged host port, and KERN_INVALID_ADDRESS if processor_count points to inaccessible memory."

@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Oct 31, 2012

Contributor

I can reproduce this as well details can be found #72 (comment)

Contributor

ChrisLundquist commented Oct 31, 2012

I can reproduce this as well details can be found #72 (comment)

@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Jan 10, 2013

Contributor

@octo We should be able to close this issue as #72 is closed. One step closer to 4.10 :)

Contributor

ChrisLundquist commented Jan 10, 2013

@octo We should be able to close this issue as #72 is closed. One step closer to 4.10 :)

@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Jan 30, 2013

Member

Hi Chris,

how are the two issues related? Is this fixed and working now?

Best regards,
—octo

Member

octo commented Jan 30, 2013

Hi Chris,

how are the two issues related? Is this fixed and working now?

Best regards,
—octo

@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Jan 30, 2013

Contributor

I am confused as well. I must have been mistaken. I think I just wanted to confirm the issue and then later made the mistake of thinking it was resolved / related. This indeed does appear to be a different issue, my apologies.

Contributor

ChrisLundquist commented Jan 30, 2013

I am confused as well. I must have been mistaken. I think I just wanted to confirm the issue and then later made the mistake of thinking it was resolved / related. This indeed does appear to be a different issue, my apologies.

@octo octo closed this Apr 5, 2013

@dpzmick

This comment has been minimized.

Show comment
Hide comment
@dpzmick

dpzmick Jul 13, 2013

This issue does not seem to be closed. I am getting the same error with a git clone I just made.

OS X 10.8

dpzmick commented Jul 13, 2013

This issue does not seem to be closed. I am getting the same error with a git clone I just made.

OS X 10.8

@dpzmick

This comment has been minimized.

Show comment
Hide comment
@dpzmick

dpzmick Jul 13, 2013

Nevermind. I noticed some permissions errors showing up in logs. Needed to run as root!

dpzmick commented Jul 13, 2013

Nevermind. I noticed some permissions errors showing up in logs. Needed to run as root!

@schmurfy

This comment has been minimized.

Show comment
Hide comment
@schmurfy

schmurfy Jul 15, 2013

still not working for me with 5.3 on OSX 10.8:

$ sudo collectd -f
,[2013-07-15 09:54:50] cpu plugin: Found 4 processors.
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] Initialization complete, entering read-loop.


[2013-07-15 09:54:58] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:08] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:28] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:56:18] cpu plugin: processor_info failed: (os/kern) failure

This problem has been there since I started using collectd, cpu just never worked on my dev machine ;)
I can provide more infos if I know what to look for.

schmurfy commented Jul 15, 2013

still not working for me with 5.3 on OSX 10.8:

$ sudo collectd -f
,[2013-07-15 09:54:50] cpu plugin: Found 4 processors.
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:54:50] Initialization complete, entering read-loop.


[2013-07-15 09:54:58] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:08] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:55:28] cpu plugin: processor_info failed: (os/kern) failure
[2013-07-15 09:56:18] cpu plugin: processor_info failed: (os/kern) failure

This problem has been there since I started using collectd, cpu just never worked on my dev machine ;)
I can provide more infos if I know what to look for.

@schmurfy

This comment has been minimized.

Show comment
Hide comment
@schmurfy

schmurfy Jul 15, 2013

After doing some more tests the failure logged do not appear to cause any problem, the cpu stats are reported despite the error.

schmurfy commented Jul 15, 2013

After doing some more tests the failure logged do not appear to cause any problem, the cpu stats are reported despite the error.

@dpzmick

This comment has been minimized.

Show comment
Hide comment
@dpzmick

dpzmick Jul 18, 2013

Same thing happens here. Plugin works, but claims to not be working. Here are log messages:

Jul 17 23:53:04 misao collectd[33503]: cpu plugin: processor_info failed: (os/kern) failure
Jul 17 23:53:04 misao kernel[0]: cpu_info(268435458,5,0xffffff801e76248c,0xffffff801e762488) not implemented

dpzmick commented Jul 18, 2013

Same thing happens here. Plugin works, but claims to not be working. Here are log messages:

Jul 17 23:53:04 misao collectd[33503]: cpu plugin: processor_info failed: (os/kern) failure
Jul 17 23:53:04 misao kernel[0]: cpu_info(268435458,5,0xffffff801e76248c,0xffffff801e762488) not implemented

@lorenzfischer

This comment has been minimized.

Show comment
Hide comment
@lorenzfischer

lorenzfischer Apr 2, 2014

@dpzmick: do you remember which permissions the plugin complained about? I cannot run as root and I also don't have access to syslog :-(

lorenzfischer commented Apr 2, 2014

@dpzmick: do you remember which permissions the plugin complained about? I cannot run as root and I also don't have access to syslog :-(

@dpzmick

This comment has been minimized.

Show comment
Hide comment
@dpzmick

dpzmick Apr 2, 2014

@lorenzfischer I don't sorry. That machine is long gone now :/

dpzmick commented Apr 2, 2014

@lorenzfischer I don't sorry. That machine is long gone now :/

@dch

This comment has been minimized.

Show comment
Hide comment
@dch

dch Jun 5, 2014

OK I can repro this atm, on a macbook pro 15" running Mavericks. I've got a debug enabled build and can provide whatever is needed here, incl access if thats useful.

dch commented Jun 5, 2014

OK I can repro this atm, on a macbook pro 15" running Mavericks. I've got a debug enabled build and can provide whatever is needed here, incl access if thats useful.

@dch dch reopened this Jun 5, 2014

@dch

This comment has been minimized.

Show comment
Hide comment
@dch

dch Jun 5, 2014

Created new plugin context.
[2014-06-05 19:34:45] [info] cpu plugin: Found 8 processors.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = nice;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = system;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = idle;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 1; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-user to the cache.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-nice to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-system to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-idle to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-1/cpu-user to the cache.
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-user"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-nice"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-system"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-idle"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-1/cpu-user"
[2014-06-05 19:34:45] [debug] name = collectd; num_proc = 2; num_lwp = 17; vmem_size = 5106257920; vmem_rss = 6897664; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 280; vmem_majflt_counter = 17700; cpu_user_counter = 4817609760; cpu_system_counter = 8825174929; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = beam; num_proc = 1; num_lwp = 35; vmem_size = 2840875008; vmem_rss = 82137088; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 502; vmem_majflt_counter = 28684; cpu_user_counter = 51953853006; cpu_system_counter = 6779186057; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = java; num_proc = 0; num_lwp = 0; vmem_size = 0; vmem_rss = 0; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 0; vmem_majflt_counter = 0; cpu_user_counter = 0; cpu_system_counter = 0; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;

dch commented Jun 5, 2014

Created new plugin context.
[2014-06-05 19:34:45] [info] cpu plugin: Found 8 processors.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = nice;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.821; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = system;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 0; type = cpu; type_instance = idle;
[2014-06-05 19:34:45] [debug] plugin_dispatch_values: time = 1401989685.822; interval = 5.000; host = akai.skunkwerks.at; plugin = cpu; plugin_instance = 1; type = cpu; type_instance = user;
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-user to the cache.
[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-nice to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-system to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-0/cpu-idle to the cache.
[2014-06-05 19:34:45] [debug] uc_insert: Added akai.skunkwerks.at/cpu-1/cpu-user to the cache.
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-user"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-nice"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-system"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-0/cpu-idle"
[2014-06-05 19:34:45] [debug] write_riemann plugin: Successfully created protobuf for metric: host = "akai.skunkwerks.at", service = "cpu-1/cpu-user"
[2014-06-05 19:34:45] [debug] name = collectd; num_proc = 2; num_lwp = 17; vmem_size = 5106257920; vmem_rss = 6897664; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 280; vmem_majflt_counter = 17700; cpu_user_counter = 4817609760; cpu_system_counter = 8825174929; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = beam; num_proc = 1; num_lwp = 35; vmem_size = 2840875008; vmem_rss = 82137088; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 502; vmem_majflt_counter = 28684; cpu_user_counter = 51953853006; cpu_system_counter = 6779186057; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
[2014-06-05 19:34:45] [debug] name = java; num_proc = 0; num_lwp = 0; vmem_size = 0; vmem_rss = 0; vmem_data = 0; vmem_code = 0; vmem_minflt_counter = 0; vmem_majflt_counter = 0; cpu_user_counter = 0; cpu_system_counter = 0; io_rchar = -1; io_wchar = -1; io_syscr = -1; io_syscw = -1;
@ojilles

This comment has been minimized.

Show comment
Hide comment
@ojilles

ojilles Sep 16, 2014

Still here, indeed. (Fails on all my Macs)

ojilles commented Sep 16, 2014

Still here, indeed. (Fails on all my Macs)

@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Sep 17, 2014

Member

[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure

This error appears to be returned when querying the PROCESSOR_TEMPERATURE property. This at least explains why the plugin "appears to be working": Reading the cpu performance works, but reading the temperature fails.

Member

octo commented Sep 17, 2014

[2014-06-05 19:34:45] [error] cpu plugin: processor_info failed: (os/kern) failure

This error appears to be returned when querying the PROCESSOR_TEMPERATURE property. This at least explains why the plugin "appears to be working": Reading the cpu performance works, but reading the temperature fails.

@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Sep 17, 2014

Contributor

Prior Art for reading CPU temps on OS X

Contributor

ChrisLundquist commented Sep 17, 2014

Prior Art for reading CPU temps on OS X

@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Sep 17, 2014

Member

Thanks Chris! It actually very much looks like the temperature is (attempted to be) read, but after that the variable holding the temperature is never touched again, making this an entirely pointless endeavor.

Since this doesn't appear to break backwards compatibility, I'll likely just remove the code from the cpu plugin entirely and look into adding it to the apple_sensors plugin instead.

Member

octo commented Sep 17, 2014

Thanks Chris! It actually very much looks like the temperature is (attempted to be) read, but after that the variable holding the temperature is never touched again, making this an entirely pointless endeavor.

Since this doesn't appear to break backwards compatibility, I'll likely just remove the code from the cpu plugin entirely and look into adding it to the apple_sensors plugin instead.

@ChrisLundquist

This comment has been minimized.

Show comment
Hide comment
@ChrisLundquist

ChrisLundquist Sep 17, 2014

Contributor

👍 That would simplify the cross platform concerns, and make for less code to maintain.

Contributor

ChrisLundquist commented Sep 17, 2014

👍 That would simplify the cross platform concerns, and make for less code to maintain.

octo added a commit that referenced this issue Sep 17, 2014

cpu plugin: Remove temperature code for Mac OS X.
This code would throw an error for some systems, because the temperature
couldn't be read. Since the plugin still works in general, this was very
confusing to users. Becaus the temperature, even when read sucessfully, was
never dispatched, remove the code entirely. We might want to add this back to
the apple_sensors plugin eventually.

Fixes: #22

@octo octo modified the milestones: 5.3, 4.10 Sep 17, 2014

@octo octo self-assigned this Sep 17, 2014

@octo octo closed this Sep 17, 2014

@ojilles

This comment has been minimized.

Show comment
Hide comment
@ojilles

ojilles Sep 17, 2014

Thanks for very swift action!

ojilles commented Sep 17, 2014

Thanks for very swift action!

@ifesdjeen

This comment has been minimized.

Show comment
Hide comment
@ifesdjeen

ifesdjeen Dec 1, 2014

Contributor

Still fails on master...

cpu plugin: host_processors returned 4
Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.
Contributor

ifesdjeen commented Dec 1, 2014

Still fails on master...

cpu plugin: host_processors returned 4
Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.

pkit pushed a commit to pkit/collectd that referenced this issue Dec 18, 2014

Merge pull request #22 from rampage644/memory
Fix leaking json generator handle on shutdown
@HakShak

This comment has been minimized.

Show comment
Hide comment
@HakShak

HakShak Dec 21, 2014

Yeah, same here with 5.4 using homebrew on OSX 10.10.1

I get the log error and I also don't get any data for the CPU in graphite (everything else is working fine). There really isn't anywhere f710030 could have been reverted...

HakShak commented Dec 21, 2014

Yeah, same here with 5.4 using homebrew on OSX 10.10.1

I get the log error and I also don't get any data for the CPU in graphite (everything else is working fine). There really isn't anywhere f710030 could have been reverted...

@ilyaevseev

This comment has been minimized.

Show comment
Hide comment
@ilyaevseev

ilyaevseev Mar 3, 2015

The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:

[error] cpu plugin: processor_info failed: (os/kern) failure

ilyaevseev commented Mar 3, 2015

The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:

[error] cpu plugin: processor_info failed: (os/kern) failure

@mfournier

This comment has been minimized.

Show comment
Hide comment
@mfournier

mfournier Mar 5, 2015

Contributor

On Tue, Mar 03, 2015 at 12:41:11PM -0800, Ilya Evseev wrote:

The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:

Yes, 5.4.1 is know to have this problem. Give 5.4.2 a try please, and let
us know if you encounter any problem.

Contributor

mfournier commented Mar 5, 2015

On Tue, Mar 03, 2015 at 12:41:11PM -0800, Ilya Evseev wrote:

The problem still actual.
Mac OS X 10.8.5, Collectd 5.4.1 from Homebrew:

Yes, 5.4.1 is know to have this problem. Give 5.4.2 a try please, and let
us know if you encounter any problem.

@philhq

This comment has been minimized.

Show comment
Hide comment
@philhq

philhq Mar 11, 2015

I'm running 5.4.2 and I have the same error.

philhq commented Mar 11, 2015

I'm running 5.4.2 and I have the same error.

@mfournier

This comment has been minimized.

Show comment
Hide comment
@mfournier

mfournier Mar 12, 2015

Contributor

OK, so it seems there is another issue resulting in the same error message. Can somebody build collectd with --enable-debug and post a gdb backtrace of the crash ? Thanks!

Contributor

mfournier commented Mar 12, 2015

OK, so it seems there is another issue resulting in the same error message. Can somebody build collectd with --enable-debug and post a gdb backtrace of the crash ? Thanks!

@mfournier mfournier reopened this Mar 12, 2015

@theoriginalgri

This comment has been minimized.

Show comment
Hide comment
@theoriginalgri

theoriginalgri May 8, 2015

I built 5.4.2 with --enable-debug. Even though I don't see any [debug] messages.

My log (cleared prior to start):

08.05.15 20:43:23,824 collectd[75864]: cpu plugin: host_processors returned 4
08.05.15 20:43:23,824 collectd[75864]: Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.

Executing plugin test (-f -T):

Created new plugin context.
[New Thread 0x1047 of process 75864]
[New Thread 0x1203 of process 75864]
[New Thread 0x1303 of process 75864]
[New Thread 0x1403 of process 75864]
[New Thread 0x1503 of process 75864]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x1047 of process 75864]
0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
1650          status = (*callback) (ds, vl, &cf->cf_udata);
(gdb) bt
#0  0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
#1  0x00000001000067e7 in fc_bit_write_invoke (ds=0x7fff83a4b101 <__psynch_cvclrprepost+5>, vl=0x240056e429dafce5, meta=<optimized out>,
    user_data=<optimized out>) at filter_chain.c:708
#2  fc_default_action (ds=0x100200090, vl=0x1002003c8) at filter_chain.c:1041
#3  0x000000010000c9d9 in plugin_dispatch_values_internal (vl=<optimized out>) at plugin.c:1989
#4  plugin_write_thread (args=<optimized out>) at plugin.c:734
#5  0x00007fff909e4268 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#6  0x00007fff909e41e5 in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#7  0x00007fff909e241d in thread_start () from /usr/lib/system/libsystem_pthread.dylib
#8  0x0000000000000000 in ?? ()
(gdb)

theoriginalgri commented May 8, 2015

I built 5.4.2 with --enable-debug. Even though I don't see any [debug] messages.

My log (cleared prior to start):

08.05.15 20:43:23,824 collectd[75864]: cpu plugin: host_processors returned 4
08.05.15 20:43:23,824 collectd[75864]: Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.

Executing plugin test (-f -T):

Created new plugin context.
[New Thread 0x1047 of process 75864]
[New Thread 0x1203 of process 75864]
[New Thread 0x1303 of process 75864]
[New Thread 0x1403 of process 75864]
[New Thread 0x1503 of process 75864]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x1047 of process 75864]
0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
1650          status = (*callback) (ds, vl, &cf->cf_udata);
(gdb) bt
#0  0x000000010000ab08 in plugin_write (plugin=<optimized out>, ds=<optimized out>, vl=0x100200090) at plugin.c:1650
#1  0x00000001000067e7 in fc_bit_write_invoke (ds=0x7fff83a4b101 <__psynch_cvclrprepost+5>, vl=0x240056e429dafce5, meta=<optimized out>,
    user_data=<optimized out>) at filter_chain.c:708
#2  fc_default_action (ds=0x100200090, vl=0x1002003c8) at filter_chain.c:1041
#3  0x000000010000c9d9 in plugin_dispatch_values_internal (vl=<optimized out>) at plugin.c:1989
#4  plugin_write_thread (args=<optimized out>) at plugin.c:734
#5  0x00007fff909e4268 in _pthread_body () from /usr/lib/system/libsystem_pthread.dylib
#6  0x00007fff909e41e5 in _pthread_start () from /usr/lib/system/libsystem_pthread.dylib
#7  0x00007fff909e241d in thread_start () from /usr/lib/system/libsystem_pthread.dylib
#8  0x0000000000000000 in ?? ()
(gdb)

@octo octo modified the milestones: 5.3, 5.4 May 30, 2015

@digitalrinaldo

This comment has been minimized.

Show comment
Hide comment
@digitalrinaldo

digitalrinaldo Jul 6, 2015

Is there any update on this issue. I am seeing this on OSX 10

/usr/local/Cellar/collectd/5.4.2/sbin/collectd -C /usr/local/etc/collectd.conf -T -f
[2015-07-06 07:54:20] cpu plugin: host_processors returned 4
[2015-07-06 07:54:20] Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.

digitalrinaldo commented Jul 6, 2015

Is there any update on this issue. I am seeing this on OSX 10

/usr/local/Cellar/collectd/5.4.2/sbin/collectd -C /usr/local/etc/collectd.conf -T -f
[2015-07-06 07:54:20] cpu plugin: host_processors returned 4
[2015-07-06 07:54:20] Initialization of plugin `cpu' failed with status -1. Plugin will be unloaded.

@maikelvdh

This comment has been minimized.

Show comment
Hide comment
@maikelvdh

maikelvdh Aug 18, 2015

Actually facing the same problem when running it as current active user, but seem to get it passing when running collectd as root. The mach_host_self() doesn’t return the privileged host_priv port to non-root users in fact.

maikelvdh commented Aug 18, 2015

Actually facing the same problem when running it as current active user, but seem to get it passing when running collectd as root. The mach_host_self() doesn’t return the privileged host_priv port to non-root users in fact.

@maireadmccabe

This comment has been minimized.

Show comment
Hide comment
@maireadmccabe

maireadmccabe Oct 2, 2015

I'm running into the same issue on OS X 10, I was wondering if anybody has a work around as the cpu stats don't seem to be getting reported because of this issues. See below for messages found in syslog

cpu plugin: host_processors returned 4
Initialisation of plugin `cpu' failed with status -1. Plugin will be unloaded.

maireadmccabe commented Oct 2, 2015

I'm running into the same issue on OS X 10, I was wondering if anybody has a work around as the cpu stats don't seem to be getting reported because of this issues. See below for messages found in syslog

cpu plugin: host_processors returned 4
Initialisation of plugin `cpu' failed with status -1. Plugin will be unloaded.

@ryan-williams

This comment has been minimized.

Show comment
Hide comment
@ryan-williams

ryan-williams Nov 5, 2015

Same error here, collectd 5.5.0 on OSX 10.11.1, whether running collectd as my user or root.

Update: seems like it is actually reporting stats correctly now that I run as root; I guess I was mistaken!

ryan-williams commented Nov 5, 2015

Same error here, collectd 5.5.0 on OSX 10.11.1, whether running collectd as my user or root.

Update: seems like it is actually reporting stats correctly now that I run as root; I guess I was mistaken!

@octo

This comment has been minimized.

Show comment
Hide comment
@octo

octo Nov 30, 2015

Member

Thanks @maikelvdh and @ryan-williams, I'll improve the logged error message. If there's any way to get a processor_t without a privileged host control port, please let me know :)

—octo

Member

octo commented Nov 30, 2015

Thanks @maikelvdh and @ryan-williams, I'll improve the logged error message. If there's any way to get a processor_t without a privileged host control port, please let me know :)

—octo

@rubenk

This comment has been minimized.

Show comment
Hide comment
@rubenk

rubenk Aug 3, 2016

Contributor

I'm going to close this, since there's not much more we can from our point of view, sorry.

Contributor

rubenk commented Aug 3, 2016

I'm going to close this, since there's not much more we can from our point of view, sorry.

@rubenk rubenk closed this Aug 3, 2016

leifmadsen pushed a commit to leifmadsen/collectd that referenced this issue Apr 27, 2018

Merge pull request #22 from abays/connectivity-sim
Make ignorelist_t public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment