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

Panic querying the stats #31

Open
srinisakh opened this issue Feb 18, 2020 · 1 comment
Open

Panic querying the stats #31

srinisakh opened this issue Feb 18, 2020 · 1 comment

Comments

@srinisakh
Copy link

Ethtool stats working

$ ethtool -S ens3f0np0
NIC statistics:
     rx_noskb_drops: 0
     rx_nodesc_trunc: 2
     port_tx_bytes: 104773444739116
     port_tx_packets: 86336211060
     port_tx_pause: 17142
     port_tx_control: 0
     port_tx_unicast: 86335445993
     port_tx_multicast: 747920
     port_tx_broadcast: 5
     port_tx_lt64: 0
     port_tx_64: 371087084

Where as same is not working when querying thru this library, am I missing something?

2020-02-18T23:09:28Z I! Starting Telegraf
Interface name: ens3f0np0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xea5431]

goroutine 26 [running]:
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).ioctl(0x0, 0xc0004c9830, 0x9, 0xc000103aec, 0xc000058250, 0xc0004c9830)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:256 +0xc1
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).getDriverInfo(0x0, 0xc0004c9830, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:269 +0xb7
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).DriverName(0x0, 0xc0004c9830, 0x9, 0x0, 0x1a, 0xc00028e000, 0x0)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:178 +0x5d
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*CommandEthtool).DriverName(0xc0000100d0, 0xc0004c9830, 0x9, 0x13, 0xc00050a688, 0x1, 0x1)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:112 +0x42
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).gatherEthtoolStats(0xc0001c1840, 0x8, 0x2328, 0xc0004c9830, 0x9, 0xc0008d8454, 0x6, 0x23ac, 0x13, 0x2aabf00, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:68 +0x177
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).Gather.func1(0xc0001c1840, 0x2aabf00, 0xc00000ed60, 0xc0004c9870, 0x8, 0x2328, 0xc0004c9830, 0x9, 0xc0008d8454, 0x6, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:45 +0x77
created by github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).Gather
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:44 +0x276
@srinisakh
Copy link
Author

Here is the stack with latest commit

Interface name: ens3f0np0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xea5c11]

goroutine 76 [running]:
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).ioctl(0x0, 0xc000155000, 0x9, 0xc000101aec, 0xc0001cc090, 0xc000155000)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:350 +0xc1
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).getDriverInfo(0x0, 0xc000155000, 0x9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:363 +0xb7
github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool.(*Ethtool).DriverName(0x0, 0xc000155000, 0x9, 0x0, 0x1a, 0xc000276000, 0x0)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/vendor/github.com/safchain/ethtool/ethtool.go:238 +0x5d
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*CommandEthtool).DriverName(0xc0001ca040, 0xc000155000, 0x9, 0x13, 0xc000514688, 0x1, 0x1)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:112 +0x42
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).gatherEthtoolStats(0xc00049b9c0, 0x8, 0x2328, 0xc000155000, 0x9, 0xc00077a454, 0x6, 0x23ac, 0x13, 0x2aadca0, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:68 +0x177
github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).Gather.func1(0xc00049b9c0, 0x2aadca0, 0xc0001ce820, 0xc000155050, 0x8, 0x2328, 0xc000155000, 0x9, 0xc00077a454, 0x6, ...)
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:45 +0x77
created by github.com/influxdata/telegraf/plugins/inputs/ethtool.(*Ethtool).Gather
        /home/ssakhamuri/go/src/github.com/influxdata/telegraf/plugins/inputs/ethtool/ethtool_linux.go:44 +0x276

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

No branches or pull requests

1 participant