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

influxdb crashes with nil pointer reference #4494

Closed
ranjib opened this issue Oct 19, 2015 · 11 comments
Closed

influxdb crashes with nil pointer reference #4494

ranjib opened this issue Oct 19, 2015 · 11 comments

Comments

@ranjib
Copy link

ranjib commented Oct 19, 2015

Im getting a nil pointer reference related panic and corresponding crash, after every few days. This error goes away if i blow away the data directory
Following is the trace

Oct 18 22:36:42 metrics influxd[2194]: panic: runtime error: invalid memory address or nil pointer dereference
Oct 18 22:36:42 metrics influxd[2194]: [signal 0xb code=0x1 addr=0x3c pc=0x1c9b34]
Oct 18 22:36:42 metrics influxd[2194]: goroutine 1 [running]:
Oct 18 22:36:42 metrics influxd[2194]: github.com/influxdb/influxdb/tsdb.(*PointBatcher).Stop(0x0)
Oct 18 22:36:42 metrics influxd[2194]: /home/ubuntu/gospace/src/github.com/influxdb/influxdb/tsdb/batcher.go:114 +0x14
Oct 18 22:36:42 metrics influxd[2194]: github.com/influxdb/influxdb/services/graphite.(*Service).Close(0x10d0c1b0, 0x0, 0x0)
Oct 18 22:36:42 metrics influxd[2194]: /home/ubuntu/gospace/src/github.com/influxdb/influxdb/services/graphite/service.go:188 +0x94
Oct 18 22:36:42 metrics influxd[2194]: github.com/influxdb/influxdb/cmd/influxd/run.(*Server).Close(0x10c69b90, 0x0, 0x0)
Oct 18 22:36:42 metrics influxd[2194]: /home/ubuntu/gospace/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:407 +0xd4
@karlbohlmark
Copy link

Thanks for reporting! I'm not part of the project but I should think that it would be helpful if you provide additional information about your configuration, such as which version you are running.

@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

What's version are you running? What arch?

@ranjib
Copy link
Author

ranjib commented Oct 19, 2015

influxd version

version: InfluxDB v0.9

uname -a

Linux metrics 3.18.0-23-rpi2 #24-Ubuntu SMP PREEMPT Sat May 23 20:04:29 UTC 2015 armv7l armv7l armv7l GNU/Linux

configuration:

reporting-disabled = true
[meta]
  dir = "/opt/influxdb/meta"
  hostname = "localhost"
  bind-address = ":8088"
  retention-autocreate = true
  election-timeout = "1s"
  heartbeat-timeout = "1s"
  leader-lease-timeout = "500ms"
  commit-timeout = "50ms"
[data]
  dir = "/opt/influxdb/data"
  max-wal-size = 104857600
  wal-flush-interval = "10m"
  wal-partition-flush-delay = "2s"
  wal-dir = "/opt/influxdb/wal"
  wal-enable-logging = true
[cluster]
  shard-writer-timeout = "5s"
  write-timeout = "5s"
[retention]
  enabled = true
  check-interval = "30m"
[monitor]
  store-enabled = true
  store-database = "_internal"
  store-retention-policy = "monitor"
  store-retention-duration = "168h"
  store-replication-factor = 1
  store-interval = "1m"
[admin]
  enabled = true
  bind-address = ":8083"
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
[http]
  enabled = true
  bind-address = ":8086"
  auth-enabled = false
  log-enabled = true
  write-tracing = false
  pprof-enabled = false
  https-enabled = false
  https-certificate = "/etc/ssl/influxdb.pem"
[[graphite]]
  enabled = true
[collectd]
  enabled = false
[opentsdb]
  enabled = false
[[udp]]
  enabled = false
[continuous_queries]
  log-enabled = true
  enabled = true
  recompute-previous-n = 2
  recompute-no-older-than = "10m"
  compute-runs-per-interval = 10
  compute-no-more-than = "2m"
[hinted-handoff]
  enabled = true
  dir = "/opt/influxdb/hh"
  max-size = 1073741824
  max-age = "168h"
  retry-rate-limit = 0
  retry-interval = "1s"

@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

v0.9. is not enough information, unfortunately. Did you build this yourself? What is the commit hash?

@ranjib
Copy link
Author

ranjib commented Oct 19, 2015

@otoolep yeah, i had built it from master, and cant track the commit sha easily. i'll rebuild it from current master and let it run for couple of days and report back. Do you want me to close the ticket for the time being?

@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

You can't track the commit? Just do

git show

I will close the ticket. Without more information -- the actual panic and commit hash -- there is nothing we can do here.

@otoolep otoolep closed this as completed Oct 19, 2015
@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

Actually, I think it back, you have provided the panic, but without the actual commit, it may be difficult to work on this issue.

@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

Actually, I think I see the issue.

@otoolep otoolep reopened this Oct 19, 2015
otoolep added a commit that referenced this issue Oct 19, 2015
This will ensure that these operations don't run concurrently. This
change also ensures nil batchers are not closed.

Fixes issue #4494.
@otoolep
Copy link
Contributor

otoolep commented Oct 19, 2015

I believe #4502 will fix this issue.

Thanks for the report @ranjib -- you must have been starting and stopping InfluxDB in very quick succession to bring this out.

@ranjib
Copy link
Author

ranjib commented Oct 19, 2015

@otoolep i run the whole thing inside a raspberry pi cluster (influx, telegraf, grafana), on weekends it acts as build farm , producing all builds (using GoCD), and during the weekdays i run it as traditional DC (monitoring + scheduler/batch jobs), hence i dont have the code once.

thanks a tonne for the fix, i'll give it a spin :-) .

@otoolep
Copy link
Contributor

otoolep commented Oct 27, 2015

All fixed.

@otoolep otoolep closed this as completed Oct 27, 2015
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

3 participants