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

server: cleanup null panics #406

Merged
merged 1 commit into from
Dec 13, 2018
Merged

Conversation

adamdecaf
Copy link
Member

2018/12/13 16:57:21 http: panic serving 10.60.34.15:53858: runtime error: invalid memory address or nil pointer dereference
goroutine 62438 [running]:
net/http.(*conn).serve.func1(0xc000397680)
	/usr/local/go/src/net/http/server.go:1746 +0xd0
panic(0x8c1860, 0xd23720)
	/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/moov-io/ach/server.(*repositoryInMemory).FindAllBatches(0xc00000b700, 0xc00039000b, 0x5, 0x0, 0x0, 0x0)
	/go/src/github.com/moov-io/ach/server/repository.go:115 +0xc9
github.com/moov-io/ach/server.(*service).GetBatches(0xc000051760, 0xc00039000b, 0x5, 0xc000051760, 0x9d42e0, 0xc000124600)
	/go/src/github.com/moov-io/ach/server/service.go:159 +0x47
github.com/moov-io/ach/server.loggingMiddleware.GetBatches(0x9db9e0, 0xc000051760, 0x9d42e0, 0xc000124600, 0xc00039000b, 0x5, 0x0, 0x0, 0x0)
	/go/src/github.com/moov-io/ach/server/logging.go:134 +0xcc
github.com/moov-io/ach/server.getBatchesEndpoint.func1(0x9d8ba0, 0xc0001905d0, 0x8d2060, 0xc0004ded00, 0xc0004ded00, 0x0, 0x0, 0x40baef)
	/go/src/github.com/moov-io/ach/server/batches.go:89 +0x61
github.com/moov-io/ach/vendor/github.com/go-kit/kit/transport/http.Server.ServeHTTP(0xc000134060, 0x96fd40, 0x96fd70, 0xc00000c260, 0x1, 0x1, 0xc00000c268, 0x1, 0x1, 0x96fd68, ...)
	/go/src/github.com/moov-io/ach/vendor/github.com/go-kit/kit/transport/http/server.go:110 +0x310
github.com/moov-io/ach/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0xc000108b60, 0x9d8520, 0xc000394620, 0xc000120600)
	/go/src/github.com/moov-io/ach/vendor/github.com/gorilla/mux/mux.go:162 +0xf1
net/http.serverHandler.ServeHTTP(0xc000063d40, 0x9d8520, 0xc000394620, 0xc000120400)
	/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc000397680, 0x9d8ae0, 0xc000266180)
	/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:2851 +0x2f5

@codecov-io
Copy link

codecov-io commented Dec 13, 2018

Codecov Report

Merging #406 into master will decrease coverage by 0.58%.
The diff coverage is 65.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #406      +/-   ##
==========================================
- Coverage   85.14%   84.56%   -0.59%     
==========================================
  Files         110      110              
  Lines        6841     8895    +2054     
==========================================
+ Hits         5825     7522    +1697     
- Misses        724     1078     +354     
- Partials      292      295       +3
Impacted Files Coverage Δ
server/repository.go 85.71% <65.38%> (-9.45%) ⬇️
test/ach-adv-read/main.go 55.55% <0%> (-8.09%) ⬇️
test/ach-axt-read/main.go 57.14% <0%> (-8.08%) ⬇️
test/ach-ccd-read/main.go 57.14% <0%> (-8.08%) ⬇️
test/ach-iat-read/main.go 60% <0%> (-8%) ⬇️
test/ach-trc-read/main.go 47.82% <0%> (-7.73%) ⬇️
test/ach-trx-read/main.go 47.82% <0%> (-7.73%) ⬇️
test/ach-xck-read/main.go 47.82% <0%> (-7.73%) ⬇️
test/ach-web-read/main.go 65.71% <0%> (-7.62%) ⬇️
test/ach-shr-read/main.go 45.45% <0%> (-7.49%) ⬇️
... and 97 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3aef105...9059924. Read the comment docs.

@adamdecaf adamdecaf merged commit a28fd40 into moov-io:master Dec 13, 2018
@adamdecaf adamdecaf deleted the server-null-pointer branch December 13, 2018 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants