panjf2000 / gnet

🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go.
https://gnet.host
Apache License 2.0
9.7k stars 1.04k forks source link

客户端10万条消息写入的时候服务端崩溃了 版本 v2.0.2 #393

Closed tangtaoit closed 2 years ago

tangtaoit commented 2 years ago

gnet版本:v2.0.2 MAC

2022/08/10 10:52:59 worker exits from a panic: runtime error: invalid memory address or nil pointer dereference 2022/08/10 10:52:59 worker exits from panic: goroutine 47721 [running]: github.com/panjf2000/ants/v2.(goWorker).run.func1.1() /Users/tt/go/pkg/mod/github.com/panjf2000/ants/v2@v2.4.8/worker.go:58 +0x10c panic({0x13fc140, 0x177b4d0}) /usr/local/go/src/runtime/panic.go:838 +0x207 github.com/panjf2000/gnet/v2/internal/netpoll.(Poller).ModReadWrite(0x12a845b?, 0xc0172d7680?) /Users/tt/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.0.2/internal/netpoll/kqueue_default_poller.go:230 +0x24 github.com/panjf2000/gnet/v2.(conn).write(0xc00013a510, {0xc0172d7680, 0xbd, 0x13a}) /Users/tt/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.0.2/connection.go:143 +0xe5 github.com/panjf2000/gnet/v2.(conn).Write(0x100000000000005?, {0xc0172d7680?, 0xc000119600?, 0xc013cc2758?}) /Users/tt/go/pkg/mod/github.com/panjf2000/gnet/v2@v2.0.2/connection.go:342 +0x5d g

tangtaoit commented 2 years ago

操作了关闭了的conn所致