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

[0.10 bug] Panic from DropSubscription #5864

Closed
kostasb opened this issue Feb 29, 2016 · 2 comments
Closed

[0.10 bug] Panic from DropSubscription #5864

kostasb opened this issue Feb 29, 2016 · 2 comments
Labels

Comments

@kostasb
Copy link

kostasb commented Feb 29, 2016

@jwilder @e-dard

Placeholder for the fix needed in 0.10 to avoid this type of panic:

[meta] 2016/02/29 07:39:39 Starting meta service
[meta] 2016/02/29 07:39:39 Listening on HTTP: 127.0.0.1:8091
[metastore] 2016/02/29 07:39:39 Using data dir: /var/opt/influxdb/meta
[metastore] 2016/02/29 07:39:39 Node at localhost:8088 [Follower]
[metastore] 2016/02/29 07:39:41 Node at localhost:8088 [Leader]. peers=[localhost:8088]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x48 pc=0x56d1b0]

goroutine 11 [running]:
github.com/influxdb/influxdb/services/meta.(*Data).DropSubscription(0xc208102510, 0xc2080f3980, 0x9, 0xc2080f3948, 0x7, 0xc2080f3960, 0x9, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/data.go:606 +0xc0
github.com/influxdb/influxdb/services/meta.(*storeFSM).applyDropSubscriptionCommand(0xc2080621b0, 0xc20812a9f0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store_fsm.go:404 +0x1c3
github.com/influxdb/influxdb/services/meta.func·009(0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store_fsm.go:66 +0x6f9
github.com/influxdb/influxdb/services/meta.(*storeFSM).Apply(0xc2080621b0, 0xc2080e9e40, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store_fsm.go:94 +0x2de
github.com/hashicorp/raft.(*Raft).runFSM(0xc2080c2380)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:564 +0xdfc
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.runFSM)·fm()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:253 +0x27
github.com/hashicorp/raft.func·011()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 1 [select]:
github.com/hashicorp/raft.(*Raft).Apply(0xc2080c2380, 0xc2080942d0, 0x2f, 0x30, 0x0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:296 +0x417
github.com/influxdb/influxdb/services/meta.(*raftState).apply(0xc208062360, 0xc2080942d0, 0x2f, 0x30, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/raft_state.go:188 +0x7f
github.com/influxdb/influxdb/services/meta.(*store).apply(0xc2080621b0, 0xc2080942d0, 0x2f, 0x30, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store.go:299 +0x5c
github.com/influxdb/influxdb/services/meta.(*store).setMetaNode(0xc2080621b0, 0xc2080da870, 0xe, 0xc2080da880, 0xe, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store.go:358 +0x39c
github.com/influxdb/influxdb/services/meta.(*store).open(0xc2080621b0, 0x7f94871789c0, 0xc2080da8e0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/store.go:149 +0x7cf
github.com/influxdb/influxdb/services/meta.(*Service).Open(0xc2080b6000, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/service.go:113 +0x8e8
github.com/influxdb/influxdb/cmd/influxd/run.(*Server).Open(0xc2080cc300, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:401 +0x2ef
github.com/influxdb/influxdb/cmd/influxd/run.(*Command).Run(0xc208062480, 0xc20800a010, 0x4, 0x4, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/cmd/influxd/run/command.go:125 +0xe10
main.(*Main).Run(0xc20802d700, 0xc20800a010, 0x4, 0x4, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/cmd/influxd/main.go:86 +0x422
main.main()
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/cmd/influxd/main.go:46 +0xdc

goroutine 6 [syscall]:
os/signal.loop()
    /root/.gvm/gos/go1.4.3/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
    /root/.gvm/gos/go1.4.3/src/os/signal/signal_unix.go:27 +0x35

goroutine 8 [IO wait]:
net.(*pollDesc).Wait(0xc2080106f0, 0x72, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080106f0, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc208010690, 0x0, 0x7f9487175fd0, 0xc20802ae90)
    /root/.gvm/gos/go1.4.3/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20802e030, 0x0, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20802e030, 0x0, 0x0, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/net/tcpsock_posix.go:244 +0x4c
github.com/influxdb/influxdb/tcp.(*Mux).Serve(0xc20805a600, 0x7f9487177978, 0xc20802e030, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/tcp/mux.go:52 +0xc7
created by github.com/influxdb/influxdb/cmd/influxd/run.(*Server).Open
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:396 +0x25e

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /root/.gvm/gos/go1.4.3/src/runtime/asm_amd64.s:2232 +0x1

goroutine 9 [chan receive]:
github.com/influxdb/influxdb/tcp.(*listener).Accept(0xc2080da8e0, 0x0, 0x0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/tcp/mux.go:135 +0x80
github.com/influxdb/influxdb/services/meta.(*raftLayer).Accept(0xc208094120, 0x0, 0x0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/raft_state.go:325 +0x65
github.com/hashicorp/raft.(*NetworkTransport).listen(0xc208010770)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/net_transport.go:362 +0x50
created by github.com/hashicorp/raft.NewNetworkTransportWithLogger
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/net_transport.go:154 +0x2c4

goroutine 10 [runnable]:
syscall.Syscall(0x2, 0xc208123c20, 0x80241, 0x1ed, 0x8, 0x1ed, 0x0)
    /root/.gvm/gos/go1.4.3/src/syscall/asm_linux_amd64.s:21 +0x5
syscall.open(0xc2080941b0, 0x21, 0x80241, 0x1ed, 0x0, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/syscall/zsyscall_linux_amd64.go:16 +0xaa
syscall.Open(0xc2080941b0, 0x21, 0x80241, 0x1ed, 0x40, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/syscall/syscall_linux.go:23 +0x5a
os.OpenFile(0xc2080941b0, 0x21, 0x241, 0xc2000001ed, 0xc208080024, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/os/file_unix.go:78 +0x6f
io/ioutil.WriteFile(0xc2080941b0, 0x21, 0xc208011834, 0x13, 0x40, 0xc2000001ed, 0x0, 0x0)
    /root/.gvm/gos/go1.4.3/src/io/ioutil/ioutil.go:77 +0x5e
github.com/hashicorp/raft.(*JSONPeers).SetPeers(0xc2080941e0, 0xc2080f4bf0, 0x1, 0x1, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/peer.go:121 +0x4e3
github.com/hashicorp/raft.(*Raft).processLog(0xc2080c2380, 0xc2080671c0, 0x0, 0x0, 0x0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:1212 +0x1167
github.com/hashicorp/raft.(*Raft).processLogs(0xc2080c2380, 0x483, 0xc2081041e0)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:1159 +0x444
github.com/hashicorp/raft.(*Raft).leaderLoop(0xc2080c2380)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:892 +0x3d7
github.com/hashicorp/raft.(*Raft).runLeader(0xc2080c2380)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:838 +0x876
github.com/hashicorp/raft.(*Raft).run(0xc2080c2380)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:602 +0xc9
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.run)·fm()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:252 +0x27
github.com/hashicorp/raft.func·011()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 12 [select]:
github.com/hashicorp/raft.(*Raft).runSnapshots(0xc2080c2380)
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:1705 +0x466
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.runSnapshots)·fm()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/raft.go:254 +0x27
github.com/hashicorp/raft.func·011()
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
    /tmp/tmp.r1Nea5VXEw/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 13 [select]:
github.com/influxdb/influxdb/services/meta.(*raftState).logLeaderChanges(0xc208062360)
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/raft_state.go:145 +0x459
created by github.com/influxdb/influxdb/services/meta.(*raftState).open
    /tmp/tmp.r1Nea5VXEw/src/github.com/influxdb/influxdb/services/meta/raft_state.go:135 +0x12b2

Related issue with Edd's fix: #5590

@kostasb kostasb added the panic label Mar 1, 2016
@jwilder
Copy link
Contributor

jwilder commented Mar 14, 2016

@e-dard This should be fixed now, right?

@e-dard
Copy link
Contributor

e-dard commented Mar 15, 2016

Fixed via #5861

@e-dard e-dard closed this as completed Mar 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants