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

Segmentation fault on armv5 for collector "netdev" #2641

Closed
cah-jad-baz opened this issue Mar 23, 2023 · 5 comments · Fixed by #2757
Closed

Segmentation fault on armv5 for collector "netdev" #2641

cah-jad-baz opened this issue Mar 23, 2023 · 5 comments · Fixed by #2757

Comments

@cah-jad-baz
Copy link

Host operating system: output of uname -a

Linux SDcard 2.6.34 #17 PREEMPT Fri Nov 11 15:06:02 MST 2011 armv5tel GNU/Linux

node_exporter version: output of node_exporter --version

This was custom built because of issues/2476

node_exporter, version 1.4.0-rc.0 (branch: HEAD, revision: 73dabdfe9eb9a46a5349a486ebf4bb75e9660f29)
  build user:       root@1a363a2743bc
  build date:       20230214-20:22:25
  go version:       go1.19.5
  platform:         linux/arm

node_exporter command line flags

./node_exporter_arm --collector.disable-defaults --collector.netdev

node_exporter log output

~# ./node_exporter_arm --collector.disable-defaults --collector.netdev
ts=2023-02-23T18:57:17.114Z caller=node_exporter.go:180 level=info msg="Starting node_exporter" version="(version=1.5.0, branch=HEAD, revision=1b48970ffcf5630534fb00bb0687d73c66d1c959)"
ts=2023-02-23T18:57:17.117Z caller=node_exporter.go:181 level=info msg="Build context" build_context="(go=go1.19.5, user=root@1a363a2743bc, date=20230214-20:22:25)"
ts=2023-02-23T18:57:17.121Z caller=node_exporter.go:183 level=warn msg="Node Exporter is running as root user. This exporter is designed to run as unprivileged user, root is not required."
ts=2023-02-23T18:57:17.143Z caller=node_exporter.go:110 level=info msg="Enabled collectors"
ts=2023-02-23T18:57:17.143Z caller=node_exporter.go:117 level=info collector=netdev
ts=2023-02-23T18:57:17.220Z caller=tls_config.go:232 level=info msg="Listening on" address=0.0.0.0:9100
ts=2023-02-23T18:57:17.240Z caller=tls_config.go:235 level=info msg="TLS is disabled." http2=false address=0.0.0.0:9100
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x64b0c0]goroutine 33 [running]:
github.com/prometheus/node_exporter/collector.parseNetlinkStats({0x1176ba0, 0x2, 0x2}, 0x105d658, {0x8ad2ec, 0x105d620})
        /build_dir/node_exporter/collector/netdev_linux.go:69 +0x1e0
github.com/prometheus/node_exporter/collector.netlinkStats(0x105d658, {0x8ad2ec, 0x105d620})
        /build_dir/node_exporter/collector/netdev_linux.go:52 +0x114
github.com/prometheus/node_exporter/collector.getNetDevStats(0x105d658, {0x8ad2ec, 0x105d620})
        /build_dir/node_exporter/collector/netdev_linux.go:35 +0x40
github.com/prometheus/node_exporter/collector.(*netDevCollector).Update(0x105d650, 0x1173280)
        /build_dir/node_exporter/collector/netdev_common.go:113 +0x34
github.com/prometheus/node_exporter/collector.execute({0x79ab29, 0x6}, {0x8ad74c, 0x105d650}, 0x1173280, {0x8ad350, 0x11284c0})
        /build_dir/node_exporter/collector/collector.go:161 +0x40
github.com/prometheus/node_exporter/collector.NodeCollector.Collect.func1({0x79ab29, 0x6}, {0x8ad74c, 0x105d650})
        /build_dir/node_exporter/collector/collector.go:152 +0x54
created by github.com/prometheus/node_exporter/collector.NodeCollector.Collect
        /build_dir/node_exporter/collector/collector.go:151 +0x7c 

Are you running node_exporter in Docker?

No

What did you do that produced an error?

Run node-exporter with the "netdev" collector. If we exclude the "netdev" collector, we don't have any issues

What did you expect to see?

I expected node-exporter to run normally

What did you see instead?

Segmentation fault

@SuperQ
Copy link
Member

SuperQ commented Mar 23, 2023

Duplicate of #2476

@SuperQ SuperQ marked this as a duplicate of #2476 Mar 23, 2023
@SuperQ SuperQ closed this as completed Mar 23, 2023
@cah-jad-baz
Copy link
Author

How is it a duplicate of #2476?
#2476 is happening because of an old version of golang. This issue happened with node-exporter compiled with 1.19.5. So an upgrade of golang will fix #2476 but will not fix this issue

@cah-jad-baz
Copy link
Author

@SuperQ, this is not a duplicate, please review the description again

@discordianfish
Copy link
Member

Yeah that seems different

@dswarbrick
Copy link
Contributor

See prometheus/procfs#499

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.

4 participants