Codis Panic
- Dominant language
- Go
- Stars
- 13.2k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
Hi There,
I have Codis 3.2.
I can see that the proxy is showing ERROR and then returning to serve and then again..
it seems like it is stuck in a loop.
This is the stack:
[martini] PANIC: runtime error: invalid memory address or nil pointer dereference
/usr/local/go/src/runtime/panic.go:458 (0x4364b3)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/go/src/runtime/panic.go:62 (0x43500d)
panicmem: panic(memoryError)
/usr/local/go/src/runtime/sigpanic_unix.go:24 (0x44b464)
sigpanic: panicmem()
/usr/src/go/src/github.com/CodisLabs/codis/pkg/proxy/proxy.go:598 (0x4fd2a9)
(*Proxy).Stats: stats.Rusage.Mem = u.MemTotal()
/usr/src/go/src/github.com/CodisLabs/codis/pkg/proxy/proxy_api.go:140 (0x4fe135)
(*apiServer).Stats: return rpc.ApiResponseJson(s.proxy.Stats(flags))
/usr/src/go/src/github.com/CodisLabs/codis/pkg/proxy/proxy_api.go:72 (0x50ba74)
(*apiServer).Stats-fm: r.Get("/stats/:xauth", api.Stats)
/usr/local/go/src/runtime/asm_amd64.s:479 (0x466b8c)
call32: CALLFN(·call32, 32)
/usr/local/go/src/reflect/value.go:434 (0x537bb9)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:302 (0x5374d4)
Value.Call: return v.call("Call", in)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/codegangsta/inject/inject.go:102 (0x72b2c5)
(*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
:30 (0x663411)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/router.go:408 (0x661e31)
(*routeContext).run: vals, err := r.Invoke(handler)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/router.go:285 (0x66110f)
(*route).Handle: context.run()
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/router.go:132 (0x65fd7b)
(*router).Handle: bestRoute.Handle(context, res)
/usr/src/go/src/github.com/CodisLabs/codis/pkg/proxy/proxy_api.go:86 (0x50d001)
(Router).Handle-fm: m.Action(r.Handle)
/usr/local/go/src/runtime/asm_amd64.s:480 (0x466c3c)
call64: CALLFN(·call64, 64)
/usr/local/go/src/reflect/value.go:434 (0x537bb9)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:302 (0x5374d4)
Value.Call: return v.call("Call", in)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/codegangsta/inject/inject.go:102 (0x72b2c5)
(*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:179 (0x65e37a)
(*context).run: _, err := c.Invoke(c.handler())
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:170 (0x65e2a6)
(*context).Next: c.run()
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/martini-contrib/gzip/gzip.go:40 (0x66772e)
glob.func1: c.Next()
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/martini-contrib/gzip/gzip.go:56 (0x667823)
All.func1: serveGzip(w, r, c, opt)
/usr/local/go/src/runtime/asm_amd64.s:480 (0x466c3c)
call64: CALLFN(·call64, 64)
/usr/local/go/src/reflect/value.go:434 (0x537bb9)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:302 (0x5374d4)
Value.Call: return v.call("Call", in)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/codegangsta/inject/inject.go:102 (0x72b2c5)
(*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:179 (0x65e37a)
(*context).run: _, err := c.Invoke(c.handler())
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:170 (0x65e2a6)
(*context).Next: c.run()
/usr/src/go/src/github.com/CodisLabs/codis/pkg/proxy/proxy_api.go:46 (0x50b1ad)
newApiServer.func1: c.Next()
/usr/local/go/src/runtime/asm_amd64.s:480 (0x466c3c)
call64: CALLFN(·call64, 64)
/usr/local/go/src/reflect/value.go:434 (0x537bb9)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:302 (0x5374d4)
Value.Call: return v.call("Call", in)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/codegangsta/inject/inject.go:102 (0x72b2c5)
(*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:179 (0x65e37a)
(*context).run: _, err := c.Invoke(c.handler())
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:170 (0x65e2a6)
(*context).Next: c.run()
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/recovery.go:142 (0x66251b)
Recovery.func1: c.Next()
/usr/local/go/src/runtime/asm_amd64.s:479 (0x466b8c)
call32: CALLFN(·call32, 32)
/usr/local/go/src/reflect/value.go:434 (0x537bb9)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:302 (0x5374d4)
Value.Call: return v.call("Call", in)
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/codegangsta/inject/inject.go:102 (0x72b2c5)
(*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:179 (0x65e37a)
(*context).run: _, err := c.Invoke(c.handler())
/usr/src/go/src/github.com/CodisLabs/codis/vendor/github.com/go-martini/martini/martini.go:75 (0x65d737)
(*Martini).ServeHTTP: m.createContext(res, req).run()
/usr/local/go/src/net/http/server.go:2002 (0x623f3f)
(*ServeMux).ServeHTTP: h.ServeHTTP(w, r)
/usr/local/go/src/net/http/server.go:2182 (0x6248ed)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1559 (0x6213d7)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:2086 (0x4696f1)
goexit: BYTE $0x90 // NOP
2018/07/01 21:36:35 http: multiple response.WriteHeader calls
Can you help me figure it out.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.