-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
SIGTRAP: trace trap on M1 #2218
Comments
Note: resorted to building due to "EXC_BAD_ACCESS (Code Signature Invalid)" reported in #2217 |
Narrowing this down a bit:
Among the other Darwin / any collectors listed at https://github.com/prometheus/node_exporter#enabled-by-default, thermal appears to be the only one that panics. |
CC @STRRL |
With the request of @STRRL , I use my M1 Macbook Air for testing purpose with the latest build of master branch compiled using : Go 1.17.2 ARM64 |
@kmahyyg I can reproduce it by |
HI @SuperQ @splmatto , I am afraid that I could not resolve this bug soon. And I have no apple m1 devices so that I could not profile this issue easily. Maybe we could disable this feature on darwin arm64 default, but I did not find some configurations or compiler flags for doing that. Could you help me with that? Do I miss something? |
It looks like on the M1, IOPMCopyCPUPowerStatus is returning kIOReturnNotFound and the CFDictionaryRef is nil, so the code at [1] causes the panic. After applying the following:
[1] node_exporter/collector/thermal_darwin.go Line 121 in 9fbb56c
|
FWIW
https://opensource.apple.com/source/PowerManagement/PowerManagement-572.50.1/pmset/pmset.c.auto.html |
Thanks to @splmatto ❤️ , I just noticed that some notes in
I am not sure And the docs of https://developer.apple.com/documentation/iokit/1557079-iopmcopycpupowerstatus I think I would make a PR soon. |
Should be closed by #2225 - lemme know if this is still an issue |
* [BUGFIX] Handle nil CPU thermal power status on M1 prometheus#2218 * [BUGFIX] bsd: Ignore filesystems flagged as MNT_IGNORE. prometheus#2227 * [BUGFIX] Sanitize UTF-8 in dmi collector prometheus#2229 Signed-off-by: Ben Kochie <superq@gmail.com>
* [BUGFIX] Handle nil CPU thermal power status on M1 prometheus#2218 * [BUGFIX] bsd: Ignore filesystems flagged as MNT_IGNORE. prometheus#2227 * [BUGFIX] Sanitize UTF-8 in dmi collector prometheus#2229 Signed-off-by: Ben Kochie <superq@gmail.com>
Host operating system: output of
uname -a
Darwin m1minimatto01 20.6.0 Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:38 PDT 2021; root:xnu-7195.141.8~1/RELEASE_ARM64_T8101 arm64
node_exporter version: output of
node_exporter --version
node_exporter, version 1.3.0 (branch: master, revision: 9fbb56c)
build user: matto@m1minimatto01
build date: 20211125-02:29:18
go version: go1.17.3
platform: darwin/arm64
node_exporter command line flags
./node_exporter
Are you running node_exporter in Docker?
No.
What did you do that produced an error?
After starting the binary, curl'd the metrics endpoint:
curl http://localhost:9100/metrics
What did you expect to see?
node_exporter metrics output
What did you see instead?
The text was updated successfully, but these errors were encountered: