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

net: panic: runtime error: invalid memory address or nil pointer dereference #36357

Closed
sylr opened this issue Jan 2, 2020 · 1 comment
Closed

Comments

@sylr
Copy link

@sylr sylr commented Jan 2, 2020

What version of Go are you using (go version)?

$ go version 1.13.5

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

I've a traefik reverse proxy which panics a lot:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x58768f]
goroutine 6594 [running]:
bufio.(*Writer).Available(...)
	/usr/local/go/src/bufio/bufio.go:610
bufio.(*Writer).WriteString(0x0, 0x255bbf4, 0x19, 0xc002ab8300, 0x40919b, 0xc00003a000)
	/usr/local/go/src/bufio/bufio.go:691 +0x7f
net/http.(*expectContinueReader).Read(0xc00099fd20, 0xc002ab8300, 0x67a, 0x67a, 0x1ff03a0, 0xc002bc5001, 0xc002ab8300)
	/usr/local/go/src/net/http/server.go:888 +0x13b
io.(*LimitedReader).Read(0xc000655e80, 0xc002ab8300, 0x67a, 0x67a, 0x0, 0xc00140b800, 0x40a1b8)
	/usr/local/go/src/io/io.go:448 +0x63
io.copyBuffer(0x2958c40, 0xc0006e9a00, 0x2955200, 0xc000655e80, 0xc002ab8300, 0x67a, 0x67a, 0x5, 0xc00140b9b0, 0x5)
	/usr/local/go/src/io/io.go:402 +0x122
io.Copy(...)
	/usr/local/go/src/io/io.go:364
net.genericReadFrom(0x2955c40, 0xc001200428, 0x2955200, 0xc000655e80, 0x0, 0x0, 0x245a600)
	/usr/local/go/src/net/net.go:625 +0x9a
net.(*TCPConn).readFrom(0xc001200428, 0x2955200, 0xc000655e80, 0xc00140b9e8, 0x40a48a, 0x21495c0)
	/usr/local/go/src/net/tcpsock_posix.go:54 +0xe2
net.(*TCPConn).ReadFrom(0xc001200428, 0x2955200, 0xc000655e80, 0x7f2c616def88, 0xc001200428, 0x1)
	/usr/local/go/src/net/tcpsock.go:103 +0x4d
io.copyBuffer(0x2955c40, 0xc001200428, 0x2955200, 0xc000655e80, 0x0, 0x0, 0x0, 0x2247760, 0x7f2c616dee01, 0x7f2c616def68)
	/usr/local/go/src/io/io.go:388 +0x2ed
io.Copy(...)
	/usr/local/go/src/io/io.go:364
net/http.persistConnWriter.ReadFrom(0xc00190aea0, 0x2955200, 0xc000655e80, 0x7f2c616def68, 0xc00190aea0, 0x1)
	/usr/local/go/src/net/http/transport.go:1599 +0x85
bufio.(*Writer).ReadFrom(0xc001f10440, 0x2955200, 0xc000655e80, 0x7f2c616def48, 0xc001f10440, 0x1)
	/usr/local/go/src/bufio/bufio.go:713 +0x34a
io.copyBuffer(0x29519e0, 0xc001f10440, 0x2955200, 0xc000655e80, 0x0, 0x0, 0x0, 0xc00140bc38, 0x40cb78, 0x20)
	/usr/local/go/src/io/io.go:388 +0x2ed
io.Copy(...)
	/usr/local/go/src/io/io.go:364
net/http.(*transferWriter).doBodyCopy(0xc000aa7540, 0x29519e0, 0xc001f10440, 0x2955200, 0xc000655e80, 0x0, 0xc00140bee0, 0xc003463b80)
	/usr/local/go/src/net/http/transfer.go:400 +0x6a
net/http.(*transferWriter).writeBody(0xc000aa7540, 0x29519e0, 0xc001f10440, 0x2, 0x2)
	/usr/local/go/src/net/http/transfer.go:359 +0x6da
net/http.(*Request).write(0xc0015d1e00, 0x29519e0, 0xc001f10440, 0x0, 0xc001ed8f60, 0xc00099ff60, 0x0, 0x0)
	/usr/local/go/src/net/http/request.go:682 +0x6d3
net/http.(*persistConn).writeLoop(0xc00190aea0)
	/usr/local/go/src/net/http/transport.go:2207 +0x1c8
created by net/http.(*Transport).dialConn
	/usr/local/go/src/net/http/transport.go:1575 +0xb23

I've failed to identified the client behaviour/request that provokes this.

@mvdan

This comment has been minimized.

Copy link
Member

@mvdan mvdan commented Jan 2, 2020

It sounds like you should file this bug with traefik, not here. This is a very common panic that can happen with certain kinds of bugs in people's code.

@mvdan mvdan closed this Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.