Skip to content
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

v2.2.0-rc.1 on mac panics with "panic: qtls.ClientSessionState not compatible with tls.ClientSessionState goroutine 1 [running]: github.com/lucas-clemente/quic-go/internal/handshake.init.2() github.com/lucas-clemente/[email protected]/internal/handshake/unsafe.go:26 +0x205" #3698

Closed
joe-getcouragenow opened this issue Sep 1, 2020 · 3 comments
Labels
invalid ❓ This doesn't seem right

Comments

@joe-getcouragenow
Copy link

joe-getcouragenow commented Sep 1, 2020

ON latest go, latest xcaddy and latest caddy things wont run on Mac

error:

./xcaddy-darwin-amd64 
go list -m: not using modules
2020/09/01 14:59:21 [ERROR] exec [go list -m]: exit status 1: 

./caddy-darwin-amd64
panic: qtls.ClientSessionState not compatible with tls.ClientSessionState

goroutine 1 [running]:
github.com/lucas-clemente/quic-go/internal/handshake.init.2()
        github.com/lucas-clemente/[email protected]/internal/handshake/unsafe.go:26 +0x205


go env:

GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/Users/apple/workspace/go/bin"
GOCACHE="/Users/apple/Library/Caches/go-build"
GOENV="/Users/apple/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/apple/workspace/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build185835723=/tmp/go-build -gno-record-gcc-switches -fno-common"

go version:

go version go1.15 darwin/amd64

repro makefile:

# https://github.com/caddyserver/xcaddy


GO_OS 		:= $(shell go env GOOS)
GO_ARCH		:= $(shell go env GOARCH)
GIT_VERSION	:= $(shell git describe --tags)

LIB=github.com/caddyserver/xcaddy
LIB_TAG=v0.1.5
LIB_FSPATH=$(GOPATH)/src/$(LIB)
LIB_BIN_FSPATH=$(PWD)/bin
LIB_DATA_FSPATH=$(PWD)/data

LIB_XBIN=$(LIB_BIN_FSPATH)/xcaddy-$(GO_OS)-$(GO_ARCH)
LIB_BIN=$(LIB_BIN_FSPATH)/caddy-$(GO_OS)-$(GO_ARCH)

#CADDY_CORE_VERSION=v2.1.1
CADDY_CORE_VERSION=v2.2.0-rc.1
PLUGIN_ROUTE53_VERSION=v1.0.2

print:
	@echo
	@echo GO_OS : $(GO_OS)
	@echo GO_ARCH : $(GO_ARCH)
	@echo GIT_VERSION : $(GIT_VERSION)
	@echo
	@echo
	@echo LIB : $(LIB)
	@echo LIB_FSPATH : $(LIB_FSPATH)
	@echo LIB_BIN_FSPATH : $(LIB_BIN_FSPATH)
	@echo LIB_DATA_FSPATH : $(LIB_DATA_FSPATH)
	@echo LIB_XBIN : $(LIB_XBIN)
	@echo LIB_BIN : $(LIB_BIN)

	@echo 
	@echo CADDY_CORE_VERSION : $(CADDY_CORE_VERSION)
	@echo PLUGIN_ROUTE53_VERSION : $(PLUGIN_ROUTE53_VERSION)
	
	@echo 
	

dep:
	git clone https://$(LIB).git $(LIB_FSPATH)
dep-tag: dep
	cd $(LIB_FSPATH) && git fetch --all --tags --prune && git checkout tags/$(LIB_TAG)
dep-delete:
	rm -rf $(LIB_FSPATH)
vscode-add:
	code --add $(LIB_FSPATH) --reuse-window


### Build XCADDY
build:
	mkdir -p $(LIB_BIN_FSPATH)
	cd $(LIB_FSPATH)/cmd/xcaddy && go build -o $(LIB_XBIN) .
	
build-delete:
	rm -rf $(LIB_BIN_FSPATH)

## Build CADDY

xcaddy-build:
	# Build Caddy server from source
	#xcaddy build

	# Build Caddy with a specific module
	#xcaddy build --with <module_name>

	# Build and run Caddy for a development plugin in the current directory
	#xcaddy run

	# Build and run Caddy for a development plugin using a specific Caddy config
	#xcaddy run --config <path_to_file>

	$(LIB_XBIN) build $(CADDY_CORE_VERSION) \
		--with "github.com/caddy-dns/route53@${PLUGIN_ROUTE53_VERSION}" \
		--output $(LIB_BIN)

xcaddy-print:
	$(LIB_XBIN) --version
	$(LIB_XBIN) list-modules

caddy-run:
	$(LIB_BIN) run

@francislavoie
Copy link
Member

francislavoie commented Sep 1, 2020

That's a known issue with Go 1.15. build from master instead for now, the issue has since been fixed.

#3642

@francislavoie francislavoie added the invalid ❓ This doesn't seem right label Sep 1, 2020
@joe-getcouragenow
Copy link
Author

thank @francislavoie

@joe-getcouragenow
Copy link
Author

Now works. Indeed, just had to tell xcaddy build to use master.

Posting this for others if they hit it.

build master \
                --output /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/caddy-darwin-amd64
2020/09/02 08:19:15 [INFO] Temporary folder: /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/buildenv_2020-09-02-0819.032707137
2020/09/02 08:19:15 [INFO] Writing main module: /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/buildenv_2020-09-02-0819.032707137/main.go
2020/09/02 08:19:15 [INFO] Initializing Go module
2020/09/02 08:19:15 [INFO] exec (timeout=10s): /usr/local/bin/go mod init caddy 
go: creating new go.mod: module caddy
2020/09/02 08:19:15 [INFO] Pinning versions
2020/09/02 08:19:15 [INFO] exec (timeout=0s): /usr/local/bin/go get -d -v github.com/caddyserver/caddy/v2@master 
go: downloading github.com/caddyserver/caddy v1.0.6-0.20200303163406-891446d06340
go: downloading github.com/caddyserver/caddy/v2 v2.2.0-rc.1.0.20200831192326-24f34780b61f
go: github.com/caddyserver/caddy/v2 master => v2.2.0-rc.1.0.20200831192326-24f34780b61f
go: downloading github.com/caddyserver/certmagic v0.11.3-0.20200822022242-4fd8ae48ef87
go: downloading github.com/libdns/libdns v0.1.0
go: downloading github.com/mholt/acmez v0.1.1-0.20200811184240-dc9c5f05ed1e
2020/09/02 08:19:19 [INFO] Build environment ready
2020/09/02 08:19:19 [INFO] Building Caddy
2020/09/02 08:19:19 [INFO] exec (timeout=0s): /usr/local/bin/go build -o /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/caddy-darwin-amd64 -ldflags -w -s -trimpath 
go: downloading github.com/smallstep/cli v0.15.0
go: downloading github.com/smallstep/certificates v0.15.1
go: downloading howett.net/plist v0.0.0-20181124034731-591f970eefbb
go: downloading github.com/lucas-clemente/quic-go v0.18.0
go: downloading github.com/marten-seemann/qpack v0.2.0
go: downloading github.com/marten-seemann/qtls-go1-15 v0.1.0
go: downloading go.step.sm/crypto v0.2.0
2020/09/02 08:19:58 [INFO] Build complete: /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/caddy-darwin-amd64
2020/09/02 08:19:58 [INFO] Cleaning up temporary folder: /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/buildenv_2020-09-02-0819.032707137
#/Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/xcaddy-darwin-amd64 build \
                --with "github.com/caddy-dns/[email protected]" \
                --output /Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/caddy-darwin-amd64
➜  xcaddy git:(master) ✗ make caddy-run   
fatal: No names found, cannot describe anything.
/Users/apple/workspace/go/src/github.com/joe-getcouragenow/junk/archi/daemon/caddy/xcaddy/bin/caddy-darwin-amd64 run
2020/09/02 06:20:06.672 INFO    admin   admin endpoint started  {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["127.0.0.1:2019", "localhost:2019", "[::1]:2019"]}
2020/09/02 06:20:06.672 INFO    serving initial configuration
^C2020/09/02 06:20:09.038       INFO    shutting down   {"signal": "SIGINT"}
2020/09/02 06:20:09.539 INFO    admin   stopped previous server
2020/09/02 06:20:09.539 INFO    shutdown done   {"signal": "SIGINT"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid ❓ This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants