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

disable-repo-locking crashes the server #1551

Closed
kbaldyga opened this issue May 4, 2021 · 2 comments
Closed

disable-repo-locking crashes the server #1551

kbaldyga opened this issue May 4, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@kbaldyga
Copy link
Contributor

kbaldyga commented May 4, 2021

v0.17.0_now panics when disable-repo-locking is enabled.

2021/05/04 10:39:40 PANIC: runtime error: invalid memory address or nil pointer dereference
goroutine 38 [running]:
github.com/urfave/negroni.(*Recovery).ServeHTTP.func1(0x7fb2d452c438, 0xc00000e3e8, 0xc000078af0, 0xc0004e3000)
	/go/pkg/mod/github.com/urfave/[email protected]/recovery.go:159 +0xd2
panic(0x11d40e0, 0x1cb4ee0)
	/usr/local/go/src/runtime/panic.go:965 +0x1b9
github.com/runatlantis/atlantis/server.(*Server).Index(0xc0004d96c0, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3200)
	/home/circleci/project/server/server.go:744 +0x4d9
net/http.HandlerFunc.ServeHTTP(0xc0004b27c0, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3200)
	/usr/local/go/src/net/http/server.go:2069 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0004de240, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000)
	/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0xd3
github.com/urfave/negroni.Wrap.func1(0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000, 0xc00006ce20)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:46 +0x4d
github.com/urfave/negroni.HandlerFunc.ServeHTTP(0xc00000c408, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000, 0xc00006ce20)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:29 +0x4e
github.com/urfave/negroni.middleware.ServeHTTP(0x15c6a80, 0xc00000c408, 0xc00000c450, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38 +0x9c
github.com/runatlantis/atlantis/server.(*RequestLogger).ServeHTTP(0xc0004b3db0, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000, 0xc00006ce00)
	/home/circleci/project/server/middleware.go:36 +0x1a4
github.com/urfave/negroni.middleware.ServeHTTP(0x15c4040, 0xc0004b3db0, 0xc00000c438, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38 +0x9c
github.com/urfave/negroni.(*Recovery).ServeHTTP(0xc000078af0, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000, 0xc00006cde0)
	/go/pkg/mod/github.com/urfave/[email protected]/recovery.go:193 +0x8c
github.com/urfave/negroni.middleware.ServeHTTP(0x15c4720, 0xc000078af0, 0xc00000c420, 0x7fb2d452c438, 0xc00000e3e8, 0xc0004e3000)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38 +0x9c
github.com/urfave/negroni.(*Negroni).ServeHTTP(0xc0001603c0, 0x15d94a8, 0xc0001008c0, 0xc0004e3000)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:96 +0xf1
net/http.serverHandler.ServeHTTP(0xc00013a000, 0x15d94a8, 0xc0001008c0, 0xc0004e3000)
	/usr/local/go/src/net/http/server.go:2887 +0xa3
net/http.(*conn).serve(0xc0000b34a0, 0x15ddcf0, 0xc0004fe900)
	/usr/local/go/src/net/http/server.go:1952 +0x8cd
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3013 +0x39b

This seems to be related to #1473, the applyLockingClient is not initialised in the branch resposible for disabling-repo-lock https://github.com/runatlantis/atlantis/blame/79309ed39c21c06bd8a8dea7e7c8802e4b15313c/server/server.go#L303

@gezb
Copy link
Contributor

gezb commented Jun 11, 2021

@acastle would it be possible to get a v0.17.1 release with this fix backported?

@kmannuz
Copy link

kmannuz commented Jun 14, 2021

Seeing this error as well on v0.17.0

@kbaldyga kbaldyga closed this as completed Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants