Skip to content

netpoll空指针问题 #408

@junaozun

Description

@junaozun

我们线上使用的hertz的服务,出现panic,疑似netpoll的问题:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xee22ce]

goroutine 2771338 [running]:
github.com/cloudwego/netpoll.(*linkBufferNode).Next(...)
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/cloudwego/netpoll/nocopy_linkbuffer.go:833
github.com/cloudwego/netpoll.(*UnsafeLinkBuffer).Next(0x9?, 0x479852?)
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/cloudwego/netpoll/nocopy_linkbuffer.go:97 +0x22e
github.com/cloudwego/netpoll.(*connection).Read(0xc0004a8640, {0xc005abc480, 0x8, 0xc003156cf8?})
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/cloudwego/netpoll/connection_impl.go:286 +0x7b
github.com/cloudwego/hertz/pkg/network/netpoll.(*Conn).Read(0xc0057aad70?, {0xc005abc480?, 0x9?, 0x9?})
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/cloudwego/hertz/pkg/network/netpoll/connection.go:53 +0x22
io.ReadAtLeast({0x7fea09b3c028, 0xc0057aad70}, {0xc005abc480, 0x8, 0x35}, 0x8)
/usr/local/go/src/io/io.go:335 +0x90
io.ReadFull(...)
/usr/local/go/src/io/io.go:354
github.com/hertz-contrib/http2.(*Framer).ReadFrame(0xc00606a780)
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/hertz-contrib/http2/frame.go:511 +0x113
github.com/hertz-contrib/http2.(*clientConnReadLoop).run(0xc003156fa8)
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/hertz-contrib/http2/client.go:1878 +0x12d
github.com/hertz-contrib/http2.(*clientConn).readLoop(0xc000a3eea0)
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/hertz-contrib/http2/client.go:1801 +0x55
created by github.com/hertz-contrib/http2.(*HostClient).newClientConn in goroutine 2771321
/var/jenkins_home/workspace/online-k8s-hestia@2/vendor/github.com/hertz-contrib/http2/client.go:587 +0xa9b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions