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

[BUG] Using [[inputs.sqlserver]] causes segfault after updating telegraf to v. 1.2.0 #2317

Closed
sunserg opened this issue Jan 25, 2017 · 4 comments · Fixed by #2346
Closed
Assignees
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Milestone

Comments

@sunserg
Copy link

sunserg commented Jan 25, 2017

Bug report

After updating TICK from prev. v. to v.1.2.0 telegraf.service exited with error, please see log in "Additional info" below.

Relevant part of telegraf.conf:

# Read metrics from Microsoft SQL Server
[[inputs.sqlserver]]
interval = "60s"
servers = [
"Server=wks2382;Port=1433;User Id=telegraf;Password=somePassw;app name=telegraf;log=1;",
]

Other content in the config is unchanged.

System info:

Linux osboxes 4.4.0-59-generic #80-Ubuntu SMP Fri Jan 6 17:47:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
telegraf version 1.2.0, influxdb v. 1.2.0.

Steps to reproduce:

  1. Update to TICK 1.2.0

Expected behavior:

Actual behavior:

Additional info:

Jan 25 13:11:01 osboxes systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Jan 25 13:11:01 osboxes telegraf[1808]: 2017-01-25T13:11:01Z I! Starting Telegraf (version 1.2.0)
Jan 25 13:11:01 osboxes telegraf[1808]: 2017-01-25T13:11:01Z I! Loaded outputs: influxdb
Jan 25 13:11:01 osboxes telegraf[1808]: 2017-01-25T13:11:01Z I! Loaded inputs: inputs.swap inputs.disk inputs.diskio inputs.processes inputs.system inputs.sqlserver inputs.cpu inputs.kernel inputs.mem
Jan 25 13:11:01 osboxes telegraf[1808]: 2017-01-25T13:11:01Z I! Tags enabled: host=osboxes
Jan 25 13:11:01 osboxes telegraf[1808]: 2017-01-25T13:11:01Z I! Agent Config: Interval:10s, Quiet:false, Hostname:"osboxes", Flush Interval:10s
Jan 25 13:11:11 osboxes telegraf[1808]: panic: runtime error: invalid memory address or nil pointer dereference
Jan 25 13:11:11 osboxes telegraf[1808]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x654edb]
Jan 25 13:11:11 osboxes telegraf[1808]: goroutine 424 [running]:
Jan 25 13:11:11 osboxes telegraf[1808]: panic(0xf2a2e0, 0xc420010070)
Jan 25 13:11:11 osboxes telegraf[1808]:         /usr/local/go/src/runtime/panic.go:500 +0x1a1
Jan 25 13:11:11 osboxes telegraf[1808]: github.com/influxdata/influxdb/client/v2.(*client).Write(0xc4201080c0, 0x18fd660, 0xc4208aaa20, 0x0, 0x0)
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/influxdb/client/v2/client.go:354 +0xfb
Jan 25 13:11:11 osboxes telegraf[1808]: github.com/influxdata/telegraf/plugins/outputs/influxdb.(*InfluxDB).Write(0xc42000a900, 0xc42096c000, 0x3e8, 0x3e8, 0xc420658da0, 0x6b3911)
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/plugins/outputs/influxdb/influxdb.go:202 +0x27b
Jan 25 13:11:11 osboxes telegraf[1808]: github.com/influxdata/telegraf/internal/models.(*RunningOutput).write(0xc4201a8a00, 0xc42096c000, 0x3e8, 0x3e8, 0x3e8, 0x2)
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/internal/models/running_output.go:170 +0xa1
Jan 25 13:11:11 osboxes telegraf[1808]: github.com/influxdata/telegraf/internal/models.(*RunningOutput).AddMetric(0xc4201a8a00, 0x18ff3a0, 0xc4205bf480)
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/internal/models/running_output.go:112 +0x149
Jan 25 13:11:11 osboxes telegraf[1808]: github.com/influxdata/telegraf/agent.(*Agent).flusher.func1(0xc420765d40, 0xc4202380c0, 0xc4208cdc20, 0xc420026090)
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:278 +0x1e7
Jan 25 13:11:11 osboxes telegraf[1808]: created by github.com/influxdata/telegraf/agent.(*Agent).flusher
Jan 25 13:11:11 osboxes telegraf[1808]:         /home/ubuntu/telegraf-build/src/github.com/influxdata/telegraf/agent/agent.go:286 +0xee
Jan 25 13:11:11 osboxes systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jan 25 13:11:11 osboxes systemd[1]: telegraf.service: Unit entered failed state.
Jan 25 13:11:11 osboxes systemd[1]: telegraf.service: Failed with result 'exit-code'.
Jan 25 13:11:11 osboxes systemd[1]: telegraf.service: Service hold-off time over, scheduling restart.
Jan 25 13:11:11 osboxes systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
@sunserg sunserg changed the title Using [[inputs.sqlserver]] causes segfault after updating telegraf to v. 1.2.0 [BUG] Using [[inputs.sqlserver]] causes segfault after updating telegraf to v. 1.2.0 Jan 25, 2017
@sparrc sparrc added the bug unexpected problem or unintended behavior label Jan 25, 2017
@sparrc
Copy link
Contributor

sparrc commented Jan 25, 2017

how do you know it's related to the sqlserver plugin? does it happen immediately or after some time?

@sparrc sparrc added this to the 1.2.1 milestone Jan 25, 2017
@sunserg
Copy link
Author

sunserg commented Jan 26, 2017

A1. If [inputs.sqlserver] is commented out, telegraf.service starts and runs OK.
Cpu and other inputs are processed.

A2. It happens immediately as you can see in the log:
Jan 25 13:11:01 osboxes systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
...
Jan 25 13:11:11 osboxes telegraf[1808]: panic: runtime error: invalid memory address or nil pointer dereference

@adeleglise
Copy link

adeleglise commented Jan 31, 2017

I can confirm that i am encountering this issue as well on two SQL SERVER instances.

Problem on Windows 2012 server, Telegraf version 1.2.0.

@sparrc sparrc added the panic issue that results in panics from Telegraf label Feb 1, 2017
@acamilleri
Copy link

acamilleri commented Feb 1, 2017

I confirm too, i running telegraf and influxDB on Debian 8.
My SQL Server is on Windows 2012 R2 server with SQL Server 2014.

for information with this: https://github.com/zensqlmonitor/influxdb-sqlserver i have no error.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior panic issue that results in panics from Telegraf
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants