zinx icon indicating copy to clipboard operation
zinx copied to clipboard

遇到一个报错

Open poembro opened this issue 3 years ago • 3 comments

  goroutine 42866 [select]:
 github.com/aceld/zinx/znet.(*Connection).StartWriter(0xc0004d8e10)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:68 +0x297
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:158 +0xa5

 goroutine 42801 [IO wait]:
 internal/poll.runtime_pollWait(0x7fb04d6806e8, 0x72, 0xffffffffffffffff)
 /usr/local/go/src/runtime/netpoll.go:184 +0x55
 internal/poll.(*pollDesc).wait(0xc000176018, 0x72, 0x0, 0x8, 0xffffffffffffffff)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
 internal/poll.(*pollDesc).waitRead(...)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
 internal/poll.(*FD).Read(0xc000176000, 0xc00020e7a8, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1cf
 net.(*netFD).Read(0xc000176000, 0xc00020e7a8, 0x8, 0x8, 0x20, 0x8, 0x455ca0)
 /usr/local/go/src/net/fd_unix.go:202 +0x4f
 net.(*conn).Read(0xc0000104a8, 0xc00020e7a8, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/net/net.go:184 +0x68
 io.ReadAtLeast(0xa6e280, 0xc0000104a8, 0xc00020e7a8, 0x8, 0x8, 0x8, 0x9, 0x0, 0x0)
 /usr/local/go/src/io/io.go:310 +0x87
 io.ReadFull(...)
 /usr/local/go/src/io/io.go:329
 github.com/aceld/zinx/znet.(*Connection).StartReader(0xc0004d8e10)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:111 +0x251
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:156 +0x83

 goroutine 43950 [select]:
 github.com/aceld/zinx/znet.(*Connection).StartWriter(0xc000287200)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:68 +0x297
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:158 +0xa5

 goroutine 92903 [select]:
 github.com/aceld/zinx/znet.(*Connection).StartWriter(0xc0004d8a20)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:68 +0x297
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:158 +0xa5

 goroutine 74995 [IO wait]:
 internal/poll.runtime_pollWait(0x7fb04d68a6d0, 0x72, 0xffffffffffffffff)
 /usr/local/go/src/runtime/netpoll.go:184 +0x55
 internal/poll.(*pollDesc).wait(0xc0004a1698, 0x72, 0x0, 0x8, 0xffffffffffffffff)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
 internal/poll.(*pollDesc).waitRead(...)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
 internal/poll.(*FD).Read(0xc0004a1680, 0xc00037a080, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1cf
 net.(*netFD).Read(0xc0004a1680, 0xc00037a080, 0x8, 0x8, 0x0, 0x8, 0xc00037a080)
 /usr/local/go/src/net/fd_unix.go:202 +0x4f
 net.(*conn).Read(0xc0001d0110, 0xc00037a080, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/net/net.go:184 +0x68
 io.ReadAtLeast(0xa6e280, 0xc0001d0110, 0xc00037a080, 0x8, 0x8, 0x8, 0x9, 0x0, 0x0)
 /usr/local/go/src/io/io.go:310 +0x87
 io.ReadFull(...)
 /usr/local/go/src/io/io.go:329
 github.com/aceld/zinx/znet.(*Connection).StartReader(0xc00045c870)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:111 +0x251
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:156 +0x83
 
 goroutine 78940 [IO wait]:
 internal/poll.runtime_pollWait(0x7fb04d691ef0, 0x72, 0xffffffffffffffff)
 /usr/local/go/src/runtime/netpoll.go:184 +0x55
 internal/poll.(*pollDesc).wait(0xc000563298, 0x72, 0x0, 0x8, 0xffffffffffffffff)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
 internal/poll.(*pollDesc).waitRead(...)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
 internal/poll.(*FD).Read(0xc000563280, 0xc00037aa98, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1cf
 net.(*netFD).Read(0xc000563280, 0xc00037aa98, 0x8, 0x8, 0x20, 0x8, 0x455ca0)
 /usr/local/go/src/net/fd_unix.go:202 +0x4f
 net.(*conn).Read(0xc0001d06a8, 0xc00037aa98, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/net/net.go:184 +0x68
 io.ReadAtLeast(0xa6e280, 0xc0001d06a8, 0xc00037aa98, 0x8, 0x8, 0x8, 0x9, 0x0, 0x0)
 /usr/local/go/src/io/io.go:310 +0x87
 io.ReadFull(...)
 /usr/local/go/src/io/io.go:329
 github.com/aceld/zinx/znet.(*Connection).StartReader(0xc0004d8360)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:111 +0x251
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:156 +0x83
 
 goroutine 91929 [IO wait]:
 internal/poll.runtime_pollWait(0x7fb04d68c708, 0x72, 0xffffffffffffffff)
 /usr/local/go/src/runtime/netpoll.go:184 +0x55
 internal/poll.(*pollDesc).wait(0xc000563e98, 0x72, 0x0, 0x8, 0xffffffffffffffff)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
 internal/poll.(*pollDesc).waitRead(...)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
 internal/poll.(*FD).Read(0xc000563e80, 0xc00037a530, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1cf
 net.(*netFD).Read(0xc000563e80, 0xc00037a530, 0x8, 0x8, 0x0, 0x8, 0xc00037a530)
 /usr/local/go/src/net/fd_unix.go:202 +0x4f
 net.(*conn).Read(0xc0001d03a0, 0xc00037a530, 0x8, 0x8, 0x0, 0x0, 0x0)
 /usr/local/go/src/net/net.go:184 +0x68
 io.ReadAtLeast(0xa6e280, 0xc0001d03a0, 0xc00037a530, 0x8, 0x8, 0x8, 0x9, 0x0, 0x0)
 /usr/local/go/src/io/io.go:310 +0x87
 io.ReadFull(...)
 /usr/local/go/src/io/io.go:329
 github.com/aceld/zinx/znet.(*Connection).StartReader(0xc0002875f0)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:111 +0x251
 created by github.com/aceld/zinx/znet.(*Connection).Start                                                                                                                                                                         un      7 00:14:48
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:156 +0x83
 
 goroutine 99572 [IO wait]:
 internal/poll.runtime_pollWait(0x7fb04d680bc8, 0x72, 0xffffffffffffffff)
 /usr/local/go/src/runtime/netpoll.go:184 +0x55
 internal/poll.(*pollDesc).wait(0xc00050f498, 0x72, 0x1000, 0x1000, 0xffffffffffffffff)
 /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
 internal/poll.(*pollDesc).waitRead(...)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:92
 internal/poll.(*FD).Read(0xc00050f480, 0xc000366000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
 /usr/local/go/src/internal/poll/fd_unix.go:169 +0x1cf
 net.(*netFD).Read(0xc00050f480, 0xc000366000, 0x1000, 0x1000, 0x4312dc, 0xc0001aab20, 0x458900)
 /usr/local/go/src/net/fd_unix.go:202 +0x4f
 net.(*conn).Read(0xc0001d03e0, 0xc000366000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
 /usr/local/go/src/net/net.go:184 +0x68
 net/http.(*persistConn).Read(0xc00009a120, 0xc000366000, 0x1000, 0x1000, 0xc0004283c0, 0xc0001aac20, 0x406765)
 /usr/local/go/src/net/http/transport.go:1752 +0x75
 bufio.(*Reader).fill(0xc000624d20)
 /usr/local/go/src/bufio/bufio.go:100 +0x103
 bufio.(*Reader).Peek(0xc000624d20, 0x1, 0x0, 0x0, 0x1, 0xc000538c00, 0x0)
 /usr/local/go/src/bufio/bufio.go:138 +0x4f
 net/http.(*persistConn).readLoop(0xc00009a120)
 /usr/local/go/src/net/http/transport.go:1905 +0x1d6
 created by net/http.(*Transport).dialConn
 /usr/local/go/src/net/http/transport.go:1574 +0xafe
 
 goroutine 94218 [select]:
 github.com/aceld/zinx/znet.(*Connection).StartWriter(0xc00045c2d0)
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:68 +0x297
 created by github.com/aceld/zinx/znet.(*Connection).Start
 /data/web/golang/pkg/mod/github.com/aceld/[email protected]/znet/connection.go:158 +0xa5

poembro avatar Jan 17 '21 02:01 poembro

能把最近的或者全部的堆栈信息打出来么,感觉开的go的数量太多了。是不是开的链接太多,可以限定一下最大链接数量。

aceld avatar Jan 26 '21 08:01 aceld

出现了相同的错误,目前还不知道什么原因。

wecane avatar Jun 17 '22 00:06 wecane

五千条链接,感觉也不多,测试也会出现这种问题,请问下有解决办法吗

gityde avatar Sep 06 '23 02:09 gityde