when use standard http client panic id (14) <= evictCount (14) #43048
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?go1.15.4 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOHOSTARCH="amd64"
GOHOSTOS="linux"
What did you do?
use standard http.Client as singleton, share one client for all goroutines (client := &http.Client{Timeout: timeOut})
What did you expect to see?
work without panic
What did you see instead?
panics bellow stack trace:
goroutine 3220 [running]:
runtime/debug.Stack(0xc00014a148, 0x4edb5a, 0xc001698040)
/usr/local/go/src/runtime/debug/stack.go:24 +0x9f
runtime/debug.PrintStack()
/usr/local/go/src/runtime/debug/stack.go:16 +0x25
main.main.func2.1(0xc00014bb38)
/app/main.go:75 +0x57
panic(0xb8bf00, 0xc0010880c0)
/usr/local/go/src/runtime/panic.go:969 +0x1b9
vendor/golang.org/x/net/http2/hpack.(*headerFieldTable).idToIndex(0xc00056ab00, 0xe, 0xc00014a400)
/usr/local/go/src/vendor/golang.org/x/net/http2/hpack/tables.go:119 +0x12d
vendor/golang.org/x/net/http2/hpack.(*headerFieldTable).search(0xc00056ab00, 0xc001490090, 0xd, 0xc0011e1b00, 0x439, 0x0, 0x17, 0x0)
/usr/local/go/src/vendor/golang.org/x/net/http2/hpack/tables.go:106 +0x150
vendor/golang.org/x/net/http2/hpack.(*Encoder).searchTable(0xc00056ab00, 0xc001490090, 0xd, 0xc0011e1b00, 0x439, 0x0, 0x0, 0x400)
/usr/local/go/src/vendor/golang.org/x/net/http2/hpack/encode.go:97 +0x92
vendor/golang.org/x/net/http2/hpack.(*Encoder).WriteField(0xc00056ab00, 0xc001490090, 0xd, 0xc0011e1b00, 0x439, 0x0, 0x0, 0x0)
/usr/local/go/src/vendor/golang.org/x/net/http2/hpack/encode.go:62 +0x110
net/http.(*http2ClientConn).writeHeader(0xc0006f0480, 0xc001490090, 0xd, 0xc0011e1b00, 0x439)
/usr/local/go/src/net/http/h2_bundle.go:8118 +0xbc
net/http.(*http2ClientConn).encodeHeaders.func3(0xc84b3e, 0xd, 0xc0011e1b00, 0x439)
/usr/local/go/src/net/http/h2_bundle.go:8057 +0x93
net/http.(*http2ClientConn).encodeHeaders.func1(0xc000128100)
/usr/local/go/src/net/http/h2_bundle.go:8023 +0x3d5
net/http.(*http2ClientConn).encodeHeaders(0xc0006f0480, 0xc000140200, 0x1, 0x0, 0x0, 0x0, 0xe, 0xe, 0xc0015c6d50, 0xc0015c6d60, ...)
/usr/local/go/src/net/http/h2_bundle.go:8055 +0x637
net/http.(*http2ClientConn).roundTrip(0xc0006f0480, 0xc000140200, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/h2_bundle.go:7524 +0x2bb
net/http.(*http2Transport).RoundTripOpt(0xc0016ac060, 0xc000140200, 0xbba500, 0xc001692150, 0xc00112e080, 0x5)
/usr/local/go/src/net/http/h2_bundle.go:6948 +0x170
net/http.(*http2Transport).RoundTrip(...)
/usr/local/go/src/net/http/h2_bundle.go:6909
net/http.http2noDialH2RoundTripper.RoundTrip(0xc0016ac060, 0xc000140200, 0xd5ddc0, 0xc0016ac060, 0x0)
/usr/local/go/src/net/http/h2_bundle.go:9119 +0x3e
net/http.(*Transport).roundTrip(0x1ac1d20, 0xc000140200, 0xc698e0, 0x7fca59f80701, 0xc000140200)
/usr/local/go/src/net/http/transport.go:527 +0xd8c
net/http.(*Transport).RoundTrip(0x1ac1d20, 0xc000140200, 0x1ac1d20, 0xbfeb9b170dc91297, 0xe543f540e054)
/usr/local/go/src/net/http/roundtrip.go:17 +0x35
net/http.send(0xc000140000, 0xd5cca0, 0x1ac1d20, 0xbfeb9b170dc91297, 0xe543f540e054, 0xc00152ff80, 0xc000564030, 0xbfeb9b170dc91297, 0x1, 0x0)
/usr/local/go/src/net/http/client.go:252 +0x453
net/http.(*Client).send(0xc001692090, 0xc000140000, 0xbfeb9b170dc91297, 0xe543f540e054, 0xc00152ff80, 0xc000564030, 0x0, 0x1, 0xc00015f420)
/usr/local/go/src/net/http/client.go:176 +0xff
net/http.(*Client).do(0xc001692090, 0xc000140000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/client.go:718 +0x45f
net/http.(*Client).Do(...)
/usr/local/go/src/net/http/client.go:586
customer-service/models/customer.(*InfoRequest).postGetCustomer(0xc00015f7c8, 0xc0001280a0, 0xc00058c0c0, 0x0, 0x0, 0x0)
/app/models/customer/info.go:179 +0x25b
customer-service/models/customer.(*InfoRequest).Info(0xc00015f7c8, 0xc0001280a0, 0x4, 0xc00015f7e8, 0x1)
/app/models/customer/info.go:149 +0x65
customer-service/controllers/customer.Info(0xc00018c500, 0xc001490068, 0x5)
/app/controllers/customer/info.go:20 +0x1de
github.com/gofiber/fiber/v2.(*App).next(0xc0005767e0, 0xc00018c500, 0xc0011e1b00, 0x439, 0x480)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:126 +0x1b9
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00018c500, 0xc84b3e, 0xd)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:632 +0x88
customer-service/controllers/customer.CheckAuthHeaderMiddleware(0xc00018c500, 0xc8ead9, 0x1b)
/app/controllers/customer/middleware.go:19 +0xf3
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00018c500, 0xc8ead9, 0x1b)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:629 +0x59
github.com/gofiber/fiber/v2/middleware/cors.New.func1(0xc00018c500, 0xc00056f208, 0xc001490068)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/middleware/cors/cors.go:141 +0x305
github.com/gofiber/fiber/v2.(*Ctx).Next(0xc00018c500, 0x1, 0xc001573b98)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/ctx.go:629 +0x59
main.main.func2(0xc00018c500, 0x0, 0x0)
/app/main.go:83 +0x5f
github.com/gofiber/fiber/v2.(*App).next(0xc0005767e0, 0xc00018c500, 0xc00018c500, 0xdc76e19, 0xdc76e1900000010)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:126 +0x1b9
github.com/gofiber/fiber/v2.(*App).handler(0xc0005767e0, 0xc001475900)
/go/pkg/mod/github.com/gofiber/fiber/[email protected]/router.go:154 +0x11a
github.com/valyala/fasthttp.(*Server).serveConn(0xc000578b40, 0xd773e0, 0xc000010098, 0x0, 0x0)
/go/pkg/mod/github.com/valyala/[email protected]/server.go:2168 +0x11ac
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0015257c0, 0xc0019ee760)
/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:223 +0xc2
github.com/valyala/fasthttp.(*workerPool).getCh.func1(0xc0015257c0, 0xc0019ee760, 0xb71be0, 0xc0019ee760)
/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:195 +0x35
created by github.com/valyala/fasthttp.(*workerPool).getCh
/go/pkg/mod/github.com/valyala/[email protected]/workerpool.go:194 +0x115
time="2020-12-07T15:23:44+06:00" level=error msg="id (14) <= evictCount (14)" function=func1 line=54 package=main.main
The text was updated successfully, but these errors were encountered: