Skip to content

net/http: nil pointer dereference in closeConnIfStillIdle #16208

Closed
@reusee

Description

@reusee
  1. What version of Go are you using (go version)?
    go version devel +b75b063 Tue Jun 28 04:49:33 2016 +0000 linux/amd64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/reus"
    GORACE=""
    GOROOT="/home/reus/go"
    GOTOOLDIR="/home/reus/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build483039895=/tmp/go-build -gno-record-gcc-switches"
    CXX="g++"
    CGO_ENABLED="1"
  3. What did you see instead?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4de58f]

goroutine 54787 [running]:
panic(0x7a2f40, 0xc4200120c0)
    /home/reus/go/src/runtime/panic.go:500 +0x1a1
net/http.(*persistConn).closeConnIfStillIdle(0xc4249cfb00)
    /home/reus/go/src/net/http/transport.go:1255 +0x2f
net/http.(*persistConn).(net/http.closeConnIfStillIdle)-fm()
    /home/reus/go/src/net/http/transport.go:643 +0x2a
created by time.goFunc
    /home/reus/go/src/time/sleep.go:154 +0x44

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions