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

Node exporter crashing in Mac: Darwin 18.6.0 #1368

Closed
You-NeverKnow opened this issue Jun 4, 2019 · 6 comments · Fixed by #1414
Closed

Node exporter crashing in Mac: Darwin 18.6.0 #1368

You-NeverKnow opened this issue Jun 4, 2019 · 6 comments · Fixed by #1414

Comments

@You-NeverKnow
Copy link
Contributor

You-NeverKnow commented Jun 4, 2019

Host operating system: output of uname -a

Darwin Kernel Version 18.6.0
root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64

node_exporter version: output of node_exporter --version

node_exporter, version 0.18.0 (branch: master, revision: b3429e4)
build user: abhatwadekar@wtcabhatwadekarmacbook1
build date: 20190604-15:04:54
go version: go1.12.5

node_exporter command line flags

No flags

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Go to http://localhost:9100/metrics

What did you expect to see?

Node exporter running as expected

What did you see instead?

Runtime error

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x43b202f]

goroutine 41 [running]:
regexp.(*Regexp).doExecute(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc000258070, 0x3, 0x0, 0x0, ...)
	/usr/local/go/src/regexp/exec.go:527 +0x6f
regexp.(*Regexp).doMatch(...)
	/usr/local/go/src/regexp/exec.go:514
regexp.(*Regexp).MatchString(...)
	/usr/local/go/src/regexp/regexp.go:468
github.com/prometheus/node_exporter/collector.getNetDevStats(0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/abhatwadekar/node_exporter/node_exporter/collector/netdev_darwin.go:45 +0x28f
github.com/prometheus/node_exporter/collector.(*netDevCollector).Update(0xc0000cd3b0, 0xc0000949c0, 0x4a5ba60, 0x0)
	/Users/abhatwadekar/node_exporter/node_exporter/collector/netdev_common.go:70 +0x50
github.com/prometheus/node_exporter/collector.execute(0x45c0be6, 0x6, 0x46782c0, 0xc0000cd3b0, 0xc0000949c0)
	/Users/abhatwadekar/node_exporter/node_exporter/collector/collector.go:127 +0x7e
github.com/prometheus/node_exporter/collector.NodeCollector.Collect.func1(0xc0000949c0, 0xc0000b6700, 0x45c0be6, 0x6, 0x46782c0, 0xc0000cd3b0)
	/Users/abhatwadekar/node_exporter/node_exporter/collector/collector.go:118 +0x53
created by github.com/prometheus/node_exporter/collector.NodeCollector.Collect
	/Users/abhatwadekar/node_exporter/node_exporter/collector/collector.go:117 +0x109
@SuperQ
Copy link
Member

SuperQ commented Jun 4, 2019

Can you mention what commit this is built against?

@You-NeverKnow
Copy link
Contributor Author

@SuperQ Edited the issue to include the commit id

@discordianfish
Copy link
Member

Looks like an issue with go. @You-NeverKnow would you be able to build node_exporter from source using a different/older go version?

@You-NeverKnow
Copy link
Contributor Author

It crashed for go1.11.11 with the same error. Should I go older than this?
I forgot to mention earlier that it crashes only when you request endpoint /metrics

I built it with command <go1.11.11 binary> build <node_exporter folder>.

@discordianfish
Copy link
Member

Can you run this and paste the results?

package main

import (
	"fmt"
	"net"
)

func main() {
	fmt.Println(net.Interfaces())
}

@You-NeverKnow
Copy link
Contributor Author

[{1 16384 lo0  up|loopback|multicast} {2 1280 gif0  pointtopoint|multicast} {3 1280 stf0  0} {4 0 XHC20  0} {5 0 XHC0  0} {6 0 XHC1  0} {7 0 VHC128  0} {8 1500 en6 ac:de:48:00:11:22 up|broadcast|multicast} {9 1500 ap1 3a:f9:d3:bc:88:2d broadcast|multicast} {10 1500 en0 38:f9:d3:bc:88:2d up|broadcast|multicast} {11 2304 p2p0 0a:f9:d3:bc:88:2d up|broadcast|multicast} {12 1484 awdl0 5a:b5:c9:d2:d1:ac up|broadcast|multicast} {13 1500 en1 5a:00:68:d8:6d:01 up|broadcast|multicast} {14 1500 en2 5a:00:68:d8:6d:00 up|broadcast|multicast} {15 1500 en3 5a:00:68:d8:6d:05 up|broadcast|multicast} {16 1500 en4 5a:00:68:d8:6d:04 up|broadcast|multicast} {17 1500 bridge0 5a:00:68:d8:6d:01 up|broadcast|multicast} {18 2000 utun0  up|pointtopoint|multicast}] <nil>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants