Skip to content

reverseproxy dynamic upstream race #5736

@kkroo

Description

@kkroo

Running off of master (d813550)
I am running into write-write race conditions with:

| WARNING: DATA RACE | Write at 0x00c00015d768 by goroutine 1181: | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.Handler.provisionUpstream() | /root/go/src/github.com/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:1072 +0x79 | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).proxyLoopIteration() | /root/go/src/github.com/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:464 +0x21b7 | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).ServeHTTP() | /root/go/src/github.com/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:434 +0x9ac | github.com/caddyserver/caddy/v2/modules/caddyhttp.wrapMiddleware.func1.1() | /root/go/src/github.com/github.com/caddyserver/caddy/v2/modules/caddyhttp/routes.go:331 +0xe8 | github.com/caddyserver/caddy/v2/modules/caddyhttp.HandlerFunc.ServeHTTP() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyhttp.go:58 +0x7e

| WARNING: DATA RACE | Write at 0x00c000798820 by goroutine 852: | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Upstream).fillHost() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/hosts.go:133 +0x15c | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.Handler.provisionUpstream() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:1068 +0x56 | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).proxyLoopIteration() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:464 +0x21d7 | github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy.(*Handler).ServeHTTP() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/reverseproxy/reverseproxy.go:434 +0x9ac | github.com/caddyserver/caddy/v2/modules/caddyhttp.wrapMiddleware.func1.1() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/routes.go:331 +0xe8 | github.com/caddyserver/caddy/v2/modules/caddyhttp.HandlerFunc.ServeHTTP() | /root/go/src/github.com/caddyserver/caddy/v2/modules/caddyhttp/caddyhttp.go:58 +0x7e

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞Something isn't workingneeds info 📭Requires more information

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions