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

paincs: accessing the hot store #1243

Closed
liukun4515 opened this issue Sep 12, 2018 · 2 comments
Closed

paincs: accessing the hot store #1243

liukun4515 opened this issue Sep 12, 2018 · 2 comments

Comments

@liukun4515
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
  • pd cluster without tikv
  1. What did you expect to see?

return null just like hot write and hot read

» hot read
null
» hot write
null
  1. What did you see instead?
» hot store
Failed to get hotspot: [500] PANIC: runtime error: invalid memory address or nil pointer dereference
goroutine 15819 [running]:
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(*Recovery).ServeHTTP.func1(0x8422a0cc38, 0x42297a420, 0x42299b130, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/recovery.go:159 +0xef
panic(0x1becc00, 0x24d54e0)
        /usr/local/go/src/runtime/panic.go:502 +0x229
github.com/pingcap/pd/server.(*clusterInfo).getStoresBytesWriteStat(0x0, 0x0)
        /Users/liukun/go/src/github.com/pingcap/pd/server/cluster_info.go:220 +0x2f
github.com/pingcap/pd/server.(*Handler).GetHotBytesWriteStores(0x42298ef40, 0x1)
        /Users/liukun/go/src/github.com/pingcap/pd/server/handler.go:118 +0x39
github.com/pingcap/pd/server/api.(*hotStatusHandler).GetHotStores(0x422b58180, 0x8422a0cc38, 0x42297a428, 0x4229c2700)
        /Users/liukun/go/src/github.com/pingcap/pd/server/api/hot_status.go:51 +0x43
github.com/pingcap/pd/server/api.(*hotStatusHandler).GetHotStores-fm(0x8422a0cc38, 0x42297a428, 0x4229c2700)
        /Users/liukun/go/src/github.com/pingcap/pd/server/api/router.go:79 +0x48
net/http.HandlerFunc.ServeHTTP(0x422b58250, 0x8422a0cc38, 0x42297a428, 0x4229c2700)
        /usr/local/go/src/net/http/server.go:1947 +0x44
github.com/pingcap/pd/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0x42298db90, 0x8422a0cc38, 0x42297a428, 0x4229c2700)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/gorilla/mux/mux.go:159 +0xed
github.com/pingcap/pd/vendor/github.com/urfave/negroni.Wrap.func1(0x8422a0cc38, 0x42297a428, 0x4229c2500, 0x422b2e0e0)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:46 +0x4d
github.com/pingcap/pd/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0x422b94900, 0x8422a0cc38, 0x42297a428, 0x4229c2500, 0x422b2e0e0)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:29 +0x4e
github.com/pingcap/pd/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x1e9a5e0, 0x422b94900, 0x422b94960, 0x8422a0cc38, 0x42297a428, 0x4229c2500)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0xa5
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm(0x8422a0cc38, 0x42297a428, 0x4229c2500)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0x60
github.com/pingcap/pd/server/api.(*redirector).ServeHTTP(0x4229962d8, 0x8422a0cc38, 0x42297a428, 0x4229c2500, 0x422b2e060)
        /Users/liukun/go/src/github.com/pingcap/pd/server/api/redirector.go:45 +0x4f3
github.com/pingcap/pd/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x1e98220, 0x4229962d8, 0x422b94940, 0x8422a0cc38, 0x42297a428, 0x4229c2500)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0xa5
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP(0x422b75740, 0x8422a0cc38, 0x42297a420, 0x4229c2500)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:96 +0xf2
github.com/pingcap/pd/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0x42298d490, 0x8422a0cc38, 0x42297a420, 0x4229c2500)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/gorilla/mux/mux.go:159 +0xed
github.com/pingcap/pd/vendor/github.com/urfave/negroni.Wrap.func1(0x8422a0cc38, 0x42297a420, 0x422ab2600, 0x422b2e020)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:46 +0x4d
github.com/pingcap/pd/vendor/github.com/urfave/negroni.HandlerFunc.ServeHTTP(0x422b949a0, 0x8422a0cc38, 0x42297a420, 0x422ab2600, 0x422b2e020)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:29 +0x4e
github.com/pingcap/pd/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x1e9a5e0, 0x422b949a0, 0x422b94a00, 0x8422a0cc38, 0x42297a420, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0xa5
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(middleware).ServeHTTP-fm(0x8422a0cc38, 0x42297a420, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0x60
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(*Recovery).ServeHTTP(0x42299b130, 0x8422a0cc38, 0x42297a420, 0x422ab2600, 0x4229ebfc0)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/recovery.go:193 +0x8c
github.com/pingcap/pd/vendor/github.com/urfave/negroni.middleware.ServeHTTP(0x1e99000, 0x42299b130, 0x422b949e0, 0x8422a0cc38, 0x42297a420, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:38 +0xa5
github.com/pingcap/pd/vendor/github.com/urfave/negroni.(*Negroni).ServeHTTP(0x422989800, 0x1ea72e0, 0x423028460, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/urfave/negroni/negroni.go:96 +0xf2
net/http.(*ServeMux).ServeHTTP(0x422f5adb0, 0x1ea72e0, 0x423028460, 0x422ab2600)
        /usr/local/go/src/net/http/server.go:2337 +0x130
github.com/pingcap/pd/vendor/github.com/coreos/etcd/embed.(*accessController).ServeHTTP(0x422fd30a0, 0x1ea72e0, 0x423028460, 0x422ab2600)
        /Users/liukun/go/src/github.com/pingcap/pd/vendor/github.com/coreos/etcd/embed/serve.go:342 +0x14c
net/http.serverHandler.ServeHTTP(0x4229832b0, 0x1ea72e0, 0x423028460, 0x422ab2600)
        /usr/local/go/src/net/http/server.go:2694 +0xbc
net/http.(*conn).serve(0x422b3e960, 0x1ea8860, 0x422dba400)
        /usr/local/go/src/net/http/server.go:1830 +0x651
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2795 +0x27b
  1. What version of PD are you using (pd-server -V)?
@disksing
Copy link
Contributor

PTAL @nolouch

@rleungx
Copy link
Member

rleungx commented Sep 12, 2018

I'm going to fix it.

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