-
Notifications
You must be signed in to change notification settings - Fork 18
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
Investigate runtime errors while completing the multipart upload #43
Comments
relevant changes that fixed this in production: https://review.dev.storj.io/c/storj/gateway/+/5920 it would be interesting if we could reproduce this on ST as well, or if it's just MT in very specific circumstances. |
Change https://review.dev.storj.io/c/storj/gateway/+/6764 mentions this issue. |
I just realized what was wrong and managed to reproduce this panic. Steps to reproduce:
2.1// Usage: go run main.go 2.2package main gateway's output: 2022-01-31T17:05:36.031+0100 INFO http/server.go:3160 http: panic serving 127.0.0.1:54441: runtime error: index out of range [10] with length 3 goroutine 74 [running]: net/http.(*conn).serve.func1(0x140008400a0) net/http/server.go:1802 +0xdc panic({0x105de0b80, 0x140002682e8}) runtime/panic.go:1052 +0x2ac storj.io/minio/cmd.criticalErrorHandler.ServeHTTP.func1(0x14000842100, {0x105f21bb0, 0x14000858000}) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:789 +0x158 panic({0x105de0b80, 0x140002682e8}) runtime/panic.go:1038 +0x21c github.com/spacemonkeygo/monkit/v3.newSpan.func1(0x1400033ded0) github.com/spacemonkeygo/monkit/v3@v3.0.17/ctx.go:147 +0x360 panic({0x105de0b80, 0x140002682e8}) runtime/panic.go:1052 +0x2ac storj.io/gateway/miniogw.(*gatewayLayer).CompleteMultipartUpload(0x14000042480, {0x105f31ff8, 0x14000849e60}, {0x1400000ac06, 0xa}, {0x1400000ac11, 0x8}, {0x1400000ac23, 0xc5}, {0x1400058a460, ...}, ...) storj.io/gateway/miniogw/multipart.go:303 +0xa24 storj.io/gateway/miniogw.(*singleTenancyLayer).CompleteMultipartUpload(0x14000848f90, {0x105f31ff8, 0x14000849920}, {0x1400000ac06, 0xa}, {0x1400000ac11, 0x8}, {0x1400000ac23, 0xc5}, {0x1400058a460, ...}, ...) storj.io/gateway/miniogw/single_tenant.go:215 +0x124 storj.io/minio/cmd.objectAPIHandlers.CompleteMultipartUploadHandler({0x105ee8c70, 0x105ee8c50}, {0x105f23e90, 0x140008401e0}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/object-handlers.go:2625 +0x14b4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.httpTraceAll.func1({0x105f23e90, 0x140008401e0}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:352 +0x124 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.collectAPIStats.func1({0x105f23e90, 0x14000840140}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:379 +0xf4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.maxClients.func1({0x105f23e90, 0x14000840140}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-api.go:147 +0x2b0 net/http.HandlerFunc.ServeHTTP(0x1400128e700, {0x105f23e90, 0x14000840140}, 0x14000842300) net/http/server.go:2047 +0x40 storj.io/minio/cmd.redirectHandler.ServeHTTP({{0x105f02f80, 0x1400128e700}}, {0x105f23e90, 0x14000840140}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:201 +0x23c storj.io/minio/cmd.customHeaderHandler.ServeHTTP({{0x105f03e60, 0x1400033d200}}, {0x105f23e60, 0x140005681c8}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:759 +0x158 storj.io/minio/cmd.securityHeaderHandler.ServeHTTP({{0x105f03dc0, 0x1400033d210}}, {0x105f23e60, 0x140005681c8}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:774 +0x1d4 storj.io/minio/cmd.bucketForwardingHandler.ServeHTTP({0x140008495c0, {0x105f03f20, 0x1400033d220}}, {0x105f23e60, 0x140005681c8}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:632 +0xeb4 storj.io/minio/cmd.requestValidityHandler.ServeHTTP({{0x105f03d20, 0x14000568168}}, {0x105f23e60, 0x140005681c8}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:616 +0x2f4 storj.io/minio/cmd.httpStatsHandler.ServeHTTP({{0x105f03ec0, 0x1400033d250}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:544 +0x114 storj.io/minio/cmd.requestSizeLimitHandler.ServeHTTP({{0x105f03de0, 0x1400033d260}, 0x50004000000}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:69 +0x110 storj.io/minio/cmd.requestHeaderSizeLimitHandler.ServeHTTP({{0x105f03ea0, 0x14000568180}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:94 +0x154 storj.io/minio/cmd.crossDomainPolicy.ServeHTTP({{0x105f03e80, 0x1400033d2a0}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/crossdomain-xml-handler.go:51 +0x110 storj.io/minio/cmd.browserRedirectHandler.ServeHTTP({{0x105f03da0, 0x1400033d2d0}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:285 +0x84 storj.io/minio/cmd.minioReservedBucketHandler.ServeHTTP({{0x105f03d00, 0x1400033d2e0}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:353 +0x2d8 storj.io/minio/cmd.cacheControlHandler.ServeHTTP({{0x105f03e20, 0x1400033d2f0}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:312 +0x330 storj.io/minio/cmd.timeValidityHandler.ServeHTTP({{0x105f03d40, 0x1400033d300}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:423 +0x338 storj.io/minio/cmd.resourceHandler.ServeHTTP({{0x105f03f60, 0x1400033d310}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:524 +0x29c storj.io/minio/cmd.authHandler.ServeHTTP({{0x105f03f00, 0x1400033d320}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/auth-handler.go:505 +0x23c storj.io/minio/cmd.sseTLSHandler.ServeHTTP({{0x105f03ce0, 0x1400033d330}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:810 +0x3ac storj.io/minio/cmd.reservedMetadataHandler.ServeHTTP({{0x105f03f40, 0x1400033d340}}, {0x105f21bb0, 0x14000858000}, 0x14000842300) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:140 +0x154 github.com/gorilla/mux.(*Router).ServeHTTP(0x1400050bd40, {0x105f21bb0, 0x14000858000}, 0x14000842100) github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e4 github.com/rs/cors.(*Cors).Handler.func1({0x105f21bb0, 0x14000858000}, 0x14000842100) github.com/rs/cors@v1.7.0/cors.go:219 +0x21c net/http.HandlerFunc.ServeHTTP(0x1400131c0a0, {0x105f21bb0, 0x14000858000}, 0x14000842100) net/http/server.go:2047 +0x40 storj.io/minio/cmd.criticalErrorHandler.ServeHTTP({{0x105f02f80, 0x1400131c0a0}}, {0x105f21bb0, 0x14000858000}, 0x14000842100) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:792 +0x8c storj.io/minio/cmd/http.(*Server).Start.func1({0x105f21bb0, 0x14000858000}, 0x14000842100) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/http/server.go:102 +0xc0 net/http.HandlerFunc.ServeHTTP(0x140002ca000, {0x105f21bb0, 0x14000858000}, 0x14000842100) net/http/server.go:2047 +0x40 net/http.serverHandler.ServeHTTP({0x14001264360}, {0x105f21bb0, 0x14000858000}, 0x14000842100) net/http/server.go:2879 +0x444 net/http.(*conn).serve(0x140008400a0, {0x105f31ff8, 0x140002901b0}) net/http/server.go:1930 +0xb6c created by net/http.(*Server).Serve net/http/server.go:3034 +0x4b8 2022-01-31T17:05:36.129+0100 INFO http/server.go:3160 http: panic serving 127.0.0.1:54443: runtime error: index out of range [10] with length 3 goroutine 86 [running]: net/http.(*conn).serve.func1(0x140005d0820) net/http/server.go:1802 +0xdc panic({0x105de0b80, 0x14000368660}) runtime/panic.go:1052 +0x2ac storj.io/minio/cmd.criticalErrorHandler.ServeHTTP.func1(0x140007fc700, {0x105f21bb0, 0x140005da1c0}) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:789 +0x158 panic({0x105de0b80, 0x14000368660}) runtime/panic.go:1038 +0x21c github.com/spacemonkeygo/monkit/v3.newSpan.func1(0x14000265080) github.com/spacemonkeygo/monkit/v3@v3.0.17/ctx.go:147 +0x360 panic({0x105de0b80, 0x14000368660}) runtime/panic.go:1052 +0x2ac storj.io/gateway/miniogw.(*gatewayLayer).CompleteMultipartUpload(0x14000042480, {0x105f31ff8, 0x140005f48d0}, {0x1400010c306, 0xa}, {0x1400010c311, 0x8}, {0x1400010c323, 0xc5}, {0x1400022efa0, ...}, ...) storj.io/gateway/miniogw/multipart.go:303 +0xa24 storj.io/gateway/miniogw.(*singleTenancyLayer).CompleteMultipartUpload(0x14000848f90, {0x105f31ff8, 0x140005f43f0}, {0x1400010c306, 0xa}, {0x1400010c311, 0x8}, {0x1400010c323, 0xc5}, {0x1400022efa0, ...}, ...) storj.io/gateway/miniogw/single_tenant.go:215 +0x124 storj.io/minio/cmd.objectAPIHandlers.CompleteMultipartUploadHandler({0x105ee8c70, 0x105ee8c50}, {0x105f23e90, 0x140005d0960}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/object-handlers.go:2625 +0x14b4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.httpTraceAll.func1({0x105f23e90, 0x140005d0960}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:352 +0x124 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.collectAPIStats.func1({0x105f23e90, 0x140005d08c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:379 +0xf4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.maxClients.func1({0x105f23e90, 0x140005d08c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-api.go:147 +0x2b0 net/http.HandlerFunc.ServeHTTP(0x1400128e700, {0x105f23e90, 0x140005d08c0}, 0x140007fc900) net/http/server.go:2047 +0x40 storj.io/minio/cmd.redirectHandler.ServeHTTP({{0x105f02f80, 0x1400128e700}}, {0x105f23e90, 0x140005d08c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:201 +0x23c storj.io/minio/cmd.customHeaderHandler.ServeHTTP({{0x105f03e60, 0x14000264c10}}, {0x105f23e60, 0x140005089c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:759 +0x158 storj.io/minio/cmd.securityHeaderHandler.ServeHTTP({{0x105f03dc0, 0x14000264c20}}, {0x105f23e60, 0x140005089c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:774 +0x1d4 storj.io/minio/cmd.bucketForwardingHandler.ServeHTTP({0x140005f40c0, {0x105f03f20, 0x14000264c30}}, {0x105f23e60, 0x140005089c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:632 +0xeb4 storj.io/minio/cmd.requestValidityHandler.ServeHTTP({{0x105f03d20, 0x14000508978}}, {0x105f23e60, 0x140005089c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:616 +0x2f4 storj.io/minio/cmd.httpStatsHandler.ServeHTTP({{0x105f03ec0, 0x14000264c60}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:544 +0x114 storj.io/minio/cmd.requestSizeLimitHandler.ServeHTTP({{0x105f03de0, 0x14000264c70}, 0x50004000000}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:69 +0x110 storj.io/minio/cmd.requestHeaderSizeLimitHandler.ServeHTTP({{0x105f03ea0, 0x14000508990}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:94 +0x154 storj.io/minio/cmd.crossDomainPolicy.ServeHTTP({{0x105f03e80, 0x14000264c80}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/crossdomain-xml-handler.go:51 +0x110 storj.io/minio/cmd.browserRedirectHandler.ServeHTTP({{0x105f03da0, 0x14000264c90}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:285 +0x84 storj.io/minio/cmd.minioReservedBucketHandler.ServeHTTP({{0x105f03d00, 0x14000264ca0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:353 +0x2d8 storj.io/minio/cmd.cacheControlHandler.ServeHTTP({{0x105f03e20, 0x14000264cb0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:312 +0x330 storj.io/minio/cmd.timeValidityHandler.ServeHTTP({{0x105f03d40, 0x14000264cc0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:423 +0x338 storj.io/minio/cmd.resourceHandler.ServeHTTP({{0x105f03f60, 0x14000264cd0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:524 +0x29c storj.io/minio/cmd.authHandler.ServeHTTP({{0x105f03f00, 0x14000264ce0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/auth-handler.go:505 +0x23c storj.io/minio/cmd.sseTLSHandler.ServeHTTP({{0x105f03ce0, 0x14000264cf0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:810 +0x3ac storj.io/minio/cmd.reservedMetadataHandler.ServeHTTP({{0x105f03f40, 0x14000264d00}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc900) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:140 +0x154 github.com/gorilla/mux.(*Router).ServeHTTP(0x1400050bd40, {0x105f21bb0, 0x140005da1c0}, 0x140007fc700) github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e4 github.com/rs/cors.(*Cors).Handler.func1({0x105f21bb0, 0x140005da1c0}, 0x140007fc700) github.com/rs/cors@v1.7.0/cors.go:219 +0x21c net/http.HandlerFunc.ServeHTTP(0x1400131c0a0, {0x105f21bb0, 0x140005da1c0}, 0x140007fc700) net/http/server.go:2047 +0x40 storj.io/minio/cmd.criticalErrorHandler.ServeHTTP({{0x105f02f80, 0x1400131c0a0}}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc700) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:792 +0x8c storj.io/minio/cmd/http.(*Server).Start.func1({0x105f21bb0, 0x140005da1c0}, 0x140007fc700) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/http/server.go:102 +0xc0 net/http.HandlerFunc.ServeHTTP(0x140002ca000, {0x105f21bb0, 0x140005da1c0}, 0x140007fc700) net/http/server.go:2047 +0x40 net/http.serverHandler.ServeHTTP({0x14001264360}, {0x105f21bb0, 0x140005da1c0}, 0x140007fc700) net/http/server.go:2879 +0x444 net/http.(*conn).serve(0x140005d0820, {0x105f31ff8, 0x140002901b0}) net/http/server.go:1930 +0xb6c created by net/http.(*Server).Serve net/http/server.go:3034 +0x4b8 2022-01-31T17:05:36.279+0100 INFO http/server.go:3160 http: panic serving 127.0.0.1:54444: runtime error: index out of range [10] with length 3 goroutine 58 [running]: net/http.(*conn).serve.func1(0x140002f4000) net/http/server.go:1802 +0xdc panic({0x105de0b80, 0x140008761c8}) runtime/panic.go:1052 +0x2ac storj.io/minio/cmd.criticalErrorHandler.ServeHTTP.func1(0x140002f8000, {0x105f21bb0, 0x1400087a000}) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:789 +0x158 panic({0x105de0b80, 0x140008761c8}) runtime/panic.go:1038 +0x21c github.com/spacemonkeygo/monkit/v3.newSpan.func1(0x140002845d0) github.com/spacemonkeygo/monkit/v3@v3.0.17/ctx.go:147 +0x360 panic({0x105de0b80, 0x140008761c8}) runtime/panic.go:1052 +0x2ac storj.io/gateway/miniogw.(*gatewayLayer).CompleteMultipartUpload(0x14000042480, {0x105f31ff8, 0x14000290d20}, {0x1400060c206, 0xa}, {0x1400060c211, 0x8}, {0x1400060c223, 0xc5}, {0x140002ce280, ...}, ...) storj.io/gateway/miniogw/multipart.go:303 +0xa24 storj.io/gateway/miniogw.(*singleTenancyLayer).CompleteMultipartUpload(0x14000848f90, {0x105f31ff8, 0x14000290840}, {0x1400060c206, 0xa}, {0x1400060c211, 0x8}, {0x1400060c223, 0xc5}, {0x140002ce280, ...}, ...) storj.io/gateway/miniogw/single_tenant.go:215 +0x124 storj.io/minio/cmd.objectAPIHandlers.CompleteMultipartUploadHandler({0x105ee8c70, 0x105ee8c50}, {0x105f23e90, 0x140002f4140}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/object-handlers.go:2625 +0x14b4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.httpTraceAll.func1({0x105f23e90, 0x140002f4140}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:352 +0x124 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.collectAPIStats.func1({0x105f23e90, 0x140002f40a0}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:379 +0xf4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.maxClients.func1({0x105f23e90, 0x140002f40a0}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-api.go:147 +0x2b0 net/http.HandlerFunc.ServeHTTP(0x1400128e700, {0x105f23e90, 0x140002f40a0}, 0x140002f8200) net/http/server.go:2047 +0x40 storj.io/minio/cmd.redirectHandler.ServeHTTP({{0x105f02f80, 0x1400128e700}}, {0x105f23e90, 0x140002f40a0}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:201 +0x23c storj.io/minio/cmd.customHeaderHandler.ServeHTTP({{0x105f03e60, 0x14000284160}}, {0x105f23e60, 0x14000288180}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:759 +0x158 storj.io/minio/cmd.securityHeaderHandler.ServeHTTP({{0x105f03dc0, 0x14000284170}}, {0x105f23e60, 0x14000288180}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:774 +0x1d4 storj.io/minio/cmd.bucketForwardingHandler.ServeHTTP({0x14000290510, {0x105f03f20, 0x14000284180}}, {0x105f23e60, 0x14000288180}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:632 +0xeb4 storj.io/minio/cmd.requestValidityHandler.ServeHTTP({{0x105f03d20, 0x14000288138}}, {0x105f23e60, 0x14000288180}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:616 +0x2f4 storj.io/minio/cmd.httpStatsHandler.ServeHTTP({{0x105f03ec0, 0x140002841b0}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:544 +0x114 storj.io/minio/cmd.requestSizeLimitHandler.ServeHTTP({{0x105f03de0, 0x140002841c0}, 0x50004000000}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:69 +0x110 storj.io/minio/cmd.requestHeaderSizeLimitHandler.ServeHTTP({{0x105f03ea0, 0x14000288150}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:94 +0x154 storj.io/minio/cmd.crossDomainPolicy.ServeHTTP({{0x105f03e80, 0x140002841d0}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/crossdomain-xml-handler.go:51 +0x110 storj.io/minio/cmd.browserRedirectHandler.ServeHTTP({{0x105f03da0, 0x140002841e0}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:285 +0x84 storj.io/minio/cmd.minioReservedBucketHandler.ServeHTTP({{0x105f03d00, 0x140002841f0}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:353 +0x2d8 storj.io/minio/cmd.cacheControlHandler.ServeHTTP({{0x105f03e20, 0x14000284200}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:312 +0x330 storj.io/minio/cmd.timeValidityHandler.ServeHTTP({{0x105f03d40, 0x14000284210}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:423 +0x338 storj.io/minio/cmd.resourceHandler.ServeHTTP({{0x105f03f60, 0x14000284220}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:524 +0x29c storj.io/minio/cmd.authHandler.ServeHTTP({{0x105f03f00, 0x14000284230}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/auth-handler.go:505 +0x23c storj.io/minio/cmd.sseTLSHandler.ServeHTTP({{0x105f03ce0, 0x14000284240}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:810 +0x3ac storj.io/minio/cmd.reservedMetadataHandler.ServeHTTP({{0x105f03f40, 0x14000284250}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8200) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:140 +0x154 github.com/gorilla/mux.(*Router).ServeHTTP(0x1400050bd40, {0x105f21bb0, 0x1400087a000}, 0x140002f8000) github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e4 github.com/rs/cors.(*Cors).Handler.func1({0x105f21bb0, 0x1400087a000}, 0x140002f8000) github.com/rs/cors@v1.7.0/cors.go:219 +0x21c net/http.HandlerFunc.ServeHTTP(0x1400131c0a0, {0x105f21bb0, 0x1400087a000}, 0x140002f8000) net/http/server.go:2047 +0x40 storj.io/minio/cmd.criticalErrorHandler.ServeHTTP({{0x105f02f80, 0x1400131c0a0}}, {0x105f21bb0, 0x1400087a000}, 0x140002f8000) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:792 +0x8c storj.io/minio/cmd/http.(*Server).Start.func1({0x105f21bb0, 0x1400087a000}, 0x140002f8000) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/http/server.go:102 +0xc0 net/http.HandlerFunc.ServeHTTP(0x140002ca000, {0x105f21bb0, 0x1400087a000}, 0x140002f8000) net/http/server.go:2047 +0x40 net/http.serverHandler.ServeHTTP({0x14001264360}, {0x105f21bb0, 0x1400087a000}, 0x140002f8000) net/http/server.go:2879 +0x444 net/http.(*conn).serve(0x140002f4000, {0x105f31ff8, 0x140002901b0}) net/http/server.go:1930 +0xb6c created by net/http.(*Server).Serve net/http/server.go:3034 +0x4b8 2022-01-31T17:05:36.480+0100 INFO http/server.go:3160 http: panic serving 127.0.0.1:54445: runtime error: index out of range [10] with length 3 goroutine 90 [running]: net/http.(*conn).serve.func1(0x140005d1220) net/http/server.go:1802 +0xdc panic({0x105de0b80, 0x14000368858}) runtime/panic.go:1052 +0x2ac storj.io/minio/cmd.criticalErrorHandler.ServeHTTP.func1(0x140007fca00, {0x105f21bb0, 0x140005da2a0}) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:789 +0x158 panic({0x105de0b80, 0x14000368858}) runtime/panic.go:1038 +0x21c github.com/spacemonkeygo/monkit/v3.newSpan.func1(0x140002657f0) github.com/spacemonkeygo/monkit/v3@v3.0.17/ctx.go:147 +0x360 panic({0x105de0b80, 0x14000368858}) runtime/panic.go:1052 +0x2ac storj.io/gateway/miniogw.(*gatewayLayer).CompleteMultipartUpload(0x14000042480, {0x105f31ff8, 0x140005f55c0}, {0x1400010c406, 0xa}, {0x1400010c411, 0x8}, {0x1400010c423, 0xc5}, {0x1400022f3b0, ...}, ...) storj.io/gateway/miniogw/multipart.go:303 +0xa24 storj.io/gateway/miniogw.(*singleTenancyLayer).CompleteMultipartUpload(0x14000848f90, {0x105f31ff8, 0x140005f50e0}, {0x1400010c406, 0xa}, {0x1400010c411, 0x8}, {0x1400010c423, 0xc5}, {0x1400022f3b0, ...}, ...) storj.io/gateway/miniogw/single_tenant.go:215 +0x124 storj.io/minio/cmd.objectAPIHandlers.CompleteMultipartUploadHandler({0x105ee8c70, 0x105ee8c50}, {0x105f23e90, 0x140005d1360}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/object-handlers.go:2625 +0x14b4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.httpTraceAll.func1({0x105f23e90, 0x140005d1360}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:352 +0x124 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.collectAPIStats.func1({0x105f23e90, 0x140005d12c0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-utils.go:379 +0xf4 net/http.HandlerFunc.ServeHTTP(...) net/http/server.go:2047 storj.io/minio/cmd.maxClients.func1({0x105f23e90, 0x140005d12c0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/handler-api.go:147 +0x2b0 net/http.HandlerFunc.ServeHTTP(0x1400128e700, {0x105f23e90, 0x140005d12c0}, 0x140007fcc00) net/http/server.go:2047 +0x40 storj.io/minio/cmd.redirectHandler.ServeHTTP({{0x105f02f80, 0x1400128e700}}, {0x105f23e90, 0x140005d12c0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:201 +0x23c storj.io/minio/cmd.customHeaderHandler.ServeHTTP({{0x105f03e60, 0x14000265380}}, {0x105f23e60, 0x14000508db0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:759 +0x158 storj.io/minio/cmd.securityHeaderHandler.ServeHTTP({{0x105f03dc0, 0x14000265390}}, {0x105f23e60, 0x14000508db0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:774 +0x1d4 storj.io/minio/cmd.bucketForwardingHandler.ServeHTTP({0x140005f4db0, {0x105f03f20, 0x140002653a0}}, {0x105f23e60, 0x14000508db0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:632 +0xeb4 storj.io/minio/cmd.requestValidityHandler.ServeHTTP({{0x105f03d20, 0x14000508d68}}, {0x105f23e60, 0x14000508db0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:616 +0x2f4 storj.io/minio/cmd.httpStatsHandler.ServeHTTP({{0x105f03ec0, 0x140002653d0}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:544 +0x114 storj.io/minio/cmd.requestSizeLimitHandler.ServeHTTP({{0x105f03de0, 0x140002653e0}, 0x50004000000}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:69 +0x110 storj.io/minio/cmd.requestHeaderSizeLimitHandler.ServeHTTP({{0x105f03ea0, 0x14000508d80}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:94 +0x154 storj.io/minio/cmd.crossDomainPolicy.ServeHTTP({{0x105f03e80, 0x140002653f0}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/crossdomain-xml-handler.go:51 +0x110 storj.io/minio/cmd.browserRedirectHandler.ServeHTTP({{0x105f03da0, 0x14000265400}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:285 +0x84 storj.io/minio/cmd.minioReservedBucketHandler.ServeHTTP({{0x105f03d00, 0x14000265410}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:353 +0x2d8 storj.io/minio/cmd.cacheControlHandler.ServeHTTP({{0x105f03e20, 0x14000265420}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:312 +0x330 storj.io/minio/cmd.timeValidityHandler.ServeHTTP({{0x105f03d40, 0x14000265430}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:423 +0x338 storj.io/minio/cmd.resourceHandler.ServeHTTP({{0x105f03f60, 0x14000265440}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:524 +0x29c storj.io/minio/cmd.authHandler.ServeHTTP({{0x105f03f00, 0x14000265450}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/auth-handler.go:505 +0x23c storj.io/minio/cmd.sseTLSHandler.ServeHTTP({{0x105f03ce0, 0x14000265460}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:810 +0x3ac storj.io/minio/cmd.reservedMetadataHandler.ServeHTTP({{0x105f03f40, 0x14000265470}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fcc00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:140 +0x154 github.com/gorilla/mux.(*Router).ServeHTTP(0x1400050bd40, {0x105f21bb0, 0x140005da2a0}, 0x140007fca00) github.com/gorilla/mux@v1.8.0/mux.go:210 +0x1e4 github.com/rs/cors.(*Cors).Handler.func1({0x105f21bb0, 0x140005da2a0}, 0x140007fca00) github.com/rs/cors@v1.7.0/cors.go:219 +0x21c net/http.HandlerFunc.ServeHTTP(0x1400131c0a0, {0x105f21bb0, 0x140005da2a0}, 0x140007fca00) net/http/server.go:2047 +0x40 storj.io/minio/cmd.criticalErrorHandler.ServeHTTP({{0x105f02f80, 0x1400131c0a0}}, {0x105f21bb0, 0x140005da2a0}, 0x140007fca00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/generic-handlers.go:792 +0x8c storj.io/minio/cmd/http.(*Server).Start.func1({0x105f21bb0, 0x140005da2a0}, 0x140007fca00) storj.io/minio@v0.0.0-20211007171754-df6c27823c8a/cmd/http/server.go:102 +0xc0 net/http.HandlerFunc.ServeHTTP(0x140002ca000, {0x105f21bb0, 0x140005da2a0}, 0x140007fca00) net/http/server.go:2047 +0x40 net/http.serverHandler.ServeHTTP({0x14001264360}, {0x105f21bb0, 0x140005da2a0}, 0x140007fca00) net/http/server.go:2879 +0x444 net/http.(*conn).serve(0x140005d1220, {0x105f31ff8, 0x140002901b0}) net/http/server.go:1930 +0xb6c created by net/http.(*Server).Serve net/http/server.go:3034 +0x4b8 panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x18 pc=0x104714f28] What happens? It's really interesting; it's not obvious from the stack trace.
The problem is that after a few seconds, the concurrent space-sending goroutine will try to write to the client as it didn't hear from CompleteMultipartUpload yet. But the resources associated with that connection are long gone now. It terminates the gateway since this panic isn't in the handler by now. This change should solve all related problems: https://review.dev.storj.io/c/storj/gateway/+/6764. |
…leted (#3) This change re-enables the following tests: - s3tests.functional.test_headers:test_object_create_bad_md5_invalid_short - s3tests.functional.test_headers:test_object_create_bad_contentlength_none - s3tests.functional.test_headers:test_object_create_bad_authorization_empty - s3tests.functional.test_headers:test_bucket_create_bad_authorization_empty - s3tests.functional.test_headers:test_bucket_create_bad_authorization_invalid_aws2 - s3tests.functional.test_headers:test_bucket_create_bad_date_invalid_aws2 - s3tests.functional.test_s3:test_bucket_list_many - s3tests.functional.test_s3:test_bucket_list_delimiter_basic - s3tests.functional.test_s3:test_bucket_list_delimiter_prefix - s3tests.functional.test_s3:test_bucket_list_delimiter_prefix_underscore - s3tests.functional.test_s3:test_bucket_list_delimiter_dot - s3tests.functional.test_s3:test_bucket_list_delimiter_empty - s3tests.functional.test_s3:test_bucket_list_delimiter_none - s3tests.functional.test_s3:test_bucket_list_delimiter_not_exist - s3tests.functional.test_s3:test_bucket_list_prefix_basic - s3tests.functional.test_s3:test_bucket_list_prefix_empty - s3tests.functional.test_s3:test_bucket_list_prefix_none - s3tests.functional.test_s3:test_bucket_list_maxkeys_one - s3tests.functional.test_s3:test_bucket_list_maxkeys_zero - s3tests.functional.test_s3:test_bucket_list_maxkeys_none - s3tests.functional.test_s3:test_bucket_list_marker_empty - s3tests.functional.test_s3:test_bucket_list_marker_unreadable - s3tests.functional.test_s3:test_bucket_list_marker_not_in_list - s3tests.functional.test_s3:test_bucket_list_marker_after_list - s3tests.functional.test_s3:test_bucket_list_marker_before_list - s3tests.functional.test_s3:test_multipart_upload_size_too_small - s3tests.functional.test_s3:test_multipart_upload_missing_part - s3tests.functional.test_s3:test_multipart_upload_incorrect_etag The tests were re-enabled because the following are completed: - storj/edge#43 - storj/edge#105 - storj/edge#140 - storj/edge#142 - storj/edge#143 - storj/edge#146 - storj/edge#150 - storj/gateway-st#49 Ports changed after storj/edge@7a9fd39 were adjusted where needed. Closes storj/edge#133
While completing the multipart upload, we encountered invalid memory address or nil pointer dereference runtime error panics. A good starting point would be to try to replicate them locally. It might also be a good idea to try to find similar issues on the net (maybe in minio/minio?). There's a possible data race somewhere.
A sample stack trace from the killed Gateway-MT process:
The text was updated successfully, but these errors were encountered: