We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TO panics in the GET /api/x/caches/stats route doing an unchecked type assertion:
GET /api/x/caches/stats
ERROR: api.go:209: 2021-02-23T13:28:59.128183143Z: 96.118.252.81:34068 panic: (err: interface conversion: interface {} is string, not uint64) stacktrace: goroutine 47852 [running]: github.com/apache/trafficcontrol/lib/go-util.Stacktrace(0xc00159f658, 0xe324e0, 0xc0284781e0) /tmp/go/src/github.com/apache/trafficcontrol/lib/go-util/util.go:32 +0x9f github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware.WrapPanicRecover.func1.1(0x107ebc0, 0xc020ab7230, 0xc00018ae00) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go:152 +0x58 panic(0xe324e0, 0xc0284781e0) /usr/local/go/src/runtime/panic.go:969 +0x1b9 github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats.addStats(0xc0066ac000, 0xa7e, 0xcaa, 0xc00ce7a190, 0x4b, 0xc0018c0400, 0x1c, 0xc020ab7a10, 0xc0018c0400, 0x1c, ...) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats/cachesstats.go:149 +0x353 github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats.getCachesStats(0xc0063ec400, 0x0, 0x0, 0x0, 0x0, 0x0) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats/cachesstats.go:94 +0xda5 github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats.Get(0x107ebc0, 0xc020ab7230, 0xc00018ae00) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/cachesstats/cachesstats.go:45 +0x12e github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware.AuthBase.GetWrapper.func1.1(0x107ebc0, 0xc020ab7230, 0xc00018ae00) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go:107 +0x282 github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware.WrapPanicRecover.func1(0x107ebc0, 0xc020ab7230, 0xc00018ae00) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go:156 +0x79 github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware.WrapHeaders.func1(0x1081c40, 0xc0052927e0, 0xc00018ae00) /tmp/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/routing/middleware/wrappers.go:136 +0x64f net/http.HandlerFunc.ServeHTTP(0xc00007e7a0, 0x1081c40, 0xc0052927e0, 0xc00018ae00) /usr/local/go/src/net/http/server.go:2042 +0x44 net/http.(*timeoutHandler).ServeHTTP.func1(0xc0052929c0, 0xc00f516600, 0xc0052927e0, 0xc00018ae00, 0xc00435ac00) /usr/local/go/src/net/http/server.go:3272 +0x7f created by net/http.(*timeoutHandler).ServeHTTP /usr/local/go/src/net/http/server.go:3266 +0x22e
TO should properly convert the string into a uint64 rather than doing an unchecked type assertion.
Request GET /api/3.0/caches/stats, observe the above 500 internal server error and stacktrace in the TO logs.
GET /api/3.0/caches/stats
500 internal server error
The text was updated successfully, but these errors were encountered:
@rawlinp I can take this one
Sorry, something went wrong.
srijeet0406
Successfully merging a pull request may close this issue.
I'm submitting a ...
Traffic Control components affected ...
Current behavior:
TO panics in the
GET /api/x/caches/stats
route doing an unchecked type assertion:Expected behavior:
TO should properly convert the string into a uint64 rather than doing an unchecked type assertion.
Minimal reproduction of the problem with instructions:
Request
GET /api/3.0/caches/stats
, observe the above500 internal server error
and stacktrace in the TO logs.The text was updated successfully, but these errors were encountered: