Skip to content

rc32 panic when change the retention policy #2846

Closed
@huhongbo

Description

curl -G http://localhost:8086/query --data-urlencode "q=ALTER RETENTION POLICY default ON metrics DURATION inf"

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x51d702]

goroutine 278 [running]:
github.com/influxdb/influxdb/meta.(*Store).UpdateRetentionPolicy(0xc208070280, 0xc2083d8178, 0x7, 0xa36c50, 0x7, 0xc2085c8240, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/store.go:719 +0xd2
github.com/influxdb/influxdb/meta.(*StatementExecutor).executeAlterRetentionPolicyStatement(0xc2080dfd30, 0xc2083a79c0, 0xc2083a79c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/statement_executor.go:178 +0x10f
github.com/influxdb/influxdb/meta.(*StatementExecutor).ExecuteStatement(0xc2080dfd30, 0x7f3624211080, 0xc2083a79c0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/statement_executor.go:62 +0x4f5
github.com/influxdb/influxdb/tsdb.func·004()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tsdb/query_executor.go:188 +0x674
created by github.com/influxdb/influxdb/tsdb.(*QueryExecutor).ExecuteQuery
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tsdb/query_executor.go:211 +0x22b

goroutine 1 [chan receive (nil chan), 1 minutes]:
main.(*Main).Run(0xc208016f60, 0xc20800a010, 0x4, 0x4, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cmd/influxd/main.go:60 +0x3d6
main.main()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cmd/influxd/main.go:24 +0x1d0

goroutine 6 [syscall, 1 minutes]:
os/signal.loop()
        /root/.gvm/gos/go1.4.2/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
        /root/.gvm/gos/go1.4.2/src/os/signal/signal_unix.go:27 +0x35
goroutine 17 [syscall, 1 minutes, locked to thread]:
runtime.goexit()
        /root/.gvm/gos/go1.4.2/src/runtime/asm_amd64.s:2232 +0x1

goroutine 8 [IO wait, 1 minutes]:
net.(*pollDesc).Wait(0xc2080104c0, 0x72, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080104c0, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc208010460, 0x0, 0x7f36274e9de0, 0xc2080fa000)
        /root/.gvm/gos/go1.4.2/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20802e7f0, 0x0, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc20802e7f0, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/tcpsock_posix.go:244 +0x4c
github.com/influxdb/influxdb/tcp.(*Mux).Serve(0xc2080b96b0, 0x7f36274f0028, 0xc20802e7f0, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tcp/mux.go:45 +0x57
created by github.com/influxdb/influxdb/cmd/influxd/run.func·003
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:210 +0x76b

goroutine 9 [chan receive, 1 minutes]:
github.com/influxdb/influxdb/tcp.(*listener).Accept(0xc20802e7f8, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tcp/mux.go:117 +0x80
github.com/influxdb/influxdb/meta.(*raftLayer).Accept(0xc2080b96e0, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/store.go:1539 +0x64
github.com/hashicorp/raft.(*NetworkTransport).listen(0xc208010540)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/net_transport.go:346 +0x50
created by github.com/hashicorp/raft.NewNetworkTransport
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/net_transport.go:138 +0x2c4

goroutine 10 [select]:
github.com/hashicorp/raft.(*Raft).leaderLoop(0xc2080b41c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:807 +0xc7c
github.com/hashicorp/raft.(*Raft).runLeader(0xc2080b41c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:779 +0x74e
github.com/hashicorp/raft.(*Raft).run(0xc2080b41c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:576 +0xc9
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.run)·fm()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:241 +0x27
github.com/hashicorp/raft.func·008()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 11 [select, 1 minutes]:
github.com/hashicorp/raft.(*Raft).runFSM(0xc2080b41c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:490 +0xf74
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.runFSM)·fm()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:242 +0x27
github.com/hashicorp/raft.func·008()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 12 [select, 1 minutes]:
github.com/hashicorp/raft.(*Raft).runSnapshots(0xc2080b41c0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:1588 +0x466
github.com/hashicorp/raft.*Raft.(github.com/hashicorp/raft.runSnapshots)·fm()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/raft.go:243 +0x27
github.com/hashicorp/raft.func·008()
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:152 +0x51
created by github.com/hashicorp/raft.(*raftState).goFunc
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/hashicorp/raft/state.go:153 +0xe3

goroutine 14 [chan receive, 1 minutes]:
github.com/influxdb/influxdb/tcp.(*listener).Accept(0xc20802e800, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tcp/mux.go:117 +0x80
github.com/influxdb/influxdb/meta.(*Store).serveExecListener(0xc208070280)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/store.go:416 +0x8f
created by github.com/influxdb/influxdb/meta.(*Store).Open
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/meta/store.go:175 +0x196

goroutine 15 [select, 1 minutes]:
github.com/influxdb/influxdb/cmd/influxd/run.(*Server).monitorErrorChan(0xc20809a120, 0xc208030420)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:271 +0x149
created by github.com/influxdb/influxdb/cmd/influxd/run.func·003
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cmd/influxd/run/server.go:216 +0x8dc

goroutine 16 [select]:
github.com/influxdb/influxdb/services/hh.(*Service).retryWrites(0xc20802d040)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/services/hh/service.go:92 +0x2e7
created by github.com/influxdb/influxdb/services/hh.(*Service).Open
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/services/hh/service.go:61 +0xef

goroutine 18 [select, 1 minutes]:
github.com/influxdb/influxdb/services/hh.(*Service).expireWrites(0xc20802d040)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/services/hh/service.go:110 +0x2a4
created by github.com/influxdb/influxdb/services/hh.(*Service).Open
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/services/hh/service.go:62 +0x109

goroutine 19 [chan receive, 1 minutes]:
github.com/influxdb/influxdb/tcp.(*listener).Accept(0xc20802e808, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/tcp/mux.go:117 +0x80
github.com/influxdb/influxdb/cluster.(*Service).serve(0xc208010310)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cluster/service.go:79 +0x102
created by github.com/influxdb/influxdb/cluster.(*Service).Open
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/cluster/service.go:56 +0x67

goroutine 20 [IO wait, 1 minutes]:
net.(*pollDesc).Wait(0xc2083943e0, 0x72, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2083943e0, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc208394380, 0x0, 0x7f36274e9de0, 0xc2083c8040)
        /root/.gvm/gos/go1.4.2/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc208236f28, 0xc20805ea80, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/tcpsock_posix.go:234 +0x4e
net.(*TCPListener).Accept(0xc208236f28, 0x0, 0x0, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/tcpsock_posix.go:244 +0x4c
net/http.(*Server).Serve(0xc2083c4060, 0x7f36274f0028, 0xc208236f28, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/http/server.go:1728 +0x92
net/http.Serve(0x7f36274f0028, 0xc208236f28, 0x7f3627506008, 0xc2083c8030, 0x0, 0x0)
        /root/.gvm/gos/go1.4.2/src/net/http/server.go:1606 +0xa1
github.com/influxdb/influxdb/services/admin.(*Service).serve(0xc2080b9500)
        /root/.gvm/pkgsets/go1.4.2/global/src/github.com/influxdb/influxdb/services/admin/service.go:71 +0x147
created by github.com/influxdb/influxdb/services/admin.(*Service).Open
.......

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions