Uploaded image for project: 'National Data Service'
  1. National Data Service
  2. NDS-531

Stack trace attempting to add service from a spec with long key

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • Labs Workbench - Beta
    • None
    • Backend
    • None
    • NDS Sprint 12

      While testing NDS-461, attempting to install a service with a key of more than 18 chars yields:

      {"Error":"runtime error: invalid memory address or nil pointer dereference\ngoroutine 741 [running]:\nruntime/debug.Stack(0x0, 0x0, 0x0)\n\t/golang/go/src/runtime/debug/stack.go:24 +0x80\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecoverMiddleware).MiddlewareFunc.func1.1(0xc8203bd690, 0x7f3803811a48, 0xc820317bf0)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recover.go:41 +0x53\npanic(0x13ec820, 0xc820016090)\n\t/golang/go/src/runtime/panic.go:426 +0x4e9\nmain.(*Server).createIngressRule(0xc820158000, 0xc8203bc148, 0x8, 0x0, 0xc8203f8850, 0x0, 0x0)\n\t/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:1457 +0x824\nmain.(*Server).createKubernetesService(0xc820158000, 0xc8203bc148, 0x8, 0xc8203f8850, 0xc82042e480, 0xc82042e480, 0x0, 0x0)\n\t/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:1448 +0x78c\nmain.(*Server).PostStack(0xc820158000, 0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:1414 +0xc65\nmain.(*Server).PostStack-fm(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:315 +0x3e\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*router).AppFunc.func1(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/router.go:56 +0xf1\ngithub.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt.(*JWTMiddleware).middlewareImpl(0xc820214060, 0x7f3803811a88, 0xc820383440, 0xc820473220, 0xc8202d1540)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt/auth_jwt.go:103 +0x2bf\ngithub.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt.(*JWTMiddleware).MiddlewareFunc.func2(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt/auth_jwt.go:82 +0x47\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*IfMiddleware).MiddlewareFunc.func1(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/if.go:47 +0x6b\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*CorsMiddleware).MiddlewareFunc.func1(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/cors.go:86 +0xc2\ngithub.com/ndslabs/apiserver/pkg/middleware.(*NoCacheMiddleware).MiddlewareFunc.func1(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/pkg/middleware/no_cache.go:17 +0x12b\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*ContentTypeCheckerMiddleware).MiddlewareFunc.func1(0x7f3803811a88, 0xc820383440, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/content_type_checker.go:38 +0x1e9\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*JsonIndentMiddleware).MiddlewareFunc.func1(0x7f3803811a48, 0xc820317bf0, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/json_indent.go:35 +0x118\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecoverMiddleware).MiddlewareFunc.func1(0x7f3803811a48, 0xc820317bf0, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recover.go:57 +0x81\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*PoweredByMiddleware).MiddlewareFunc.func1(0x7f3803811a48, 0xc820317bf0, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/powered_by.go:26 +0xa7\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecorderMiddleware).MiddlewareFunc.func1(0x7f3803811a08, 0xc820473240, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recorder.go:22 +0xbc\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*TimerMiddleware).MiddlewareFunc.func1(0x7f3803811a08, 0xc820473240, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/timer.go:20 +0x117\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*AccessLogApacheMiddleware).MiddlewareFunc.func1(0x7f3803811a08, 0xc820473240, 0xc820473220)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/access_log_apache.go:87 +0x55\ngithub.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.adapterFunc.func1(0x7f38038119a8, 0xc820416ea0, 0xc8203f2000)\n\t/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/middleware.go:70 +0x132\nnet/http.HandlerFunc.ServeHTTP(0xc8202d18c0, 0x7f38038119a8, 0xc820416ea0, 0xc8203f2000)\n\t/golang/go/src/net/http/server.go:1618 +0x3a\nnet/http.(*ServeMux).ServeHTTP(0xc820010ff0, 0x7f38038119a8, 0xc820416ea0, 0xc8203f2000)\n\t/golang/go/src/net/http/server.go:1910 +0x17d\nnet/http.serverHandler.ServeHTTP(0xc820467680, 0x7f38038119a8, 0xc820416ea0, 0xc8203f2000)\n\t/golang/go/src/net/http/server.go:2081 +0x19e\nnet/http.(*conn).serve(0xc820429c80)\n\t/golang/go/src/net/http/server.go:1472 +0xf2e\ncreated by net/http.(*Server).Serve\n\t/golang/go/src/net/http/server.go:2137 +0x44e\n"}

      More investigation is needed to determine if this is a true bug or simply a one-off problem / a result of bad state.

              willis8 Craig Willis
              lambert8 Sara Lambert
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Time Spent - 30 minutes Remaining Estimate - 30 minutes
                  30m
                  Logged:
                  Time Spent - 30 minutes Remaining Estimate - 30 minutes
                  30m