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

getty 偶现panic,程序退出 #1362

Closed
gaohuag opened this issue Aug 3, 2021 · 5 comments
Closed

getty 偶现panic,程序退出 #1362

gaohuag opened this issue Aug 3, 2021 · 5 comments
Assignees
Labels
bug Something isn't working occupied Issue has been occupied

Comments

@gaohuag
Copy link

gaohuag commented Aug 3, 2021

What happened:
使用dubbo-go的程序会异常退出

What you expected to happen:
如果发生异常,能通过recover捕获异常。
How to reproduce it (as minimally and precisely as possible):
偶现的,我也不知道怎么重现问题
Anything else we need to know?:
一些错误提示:
``
2021-08-03T07:25:46.724+0100 DEBUG getty/pool.go:195 add session{session {client:TCP_CLIENT:24:10.0.2.15:34697<->172.31.229.155:20889}, Read Bytes: 0, Write Bytes: 0, Read Pkgs: 0, Write Pkgs: 0}
2021-08-03T07:25:46.724+0100 ERROR getty/pool.go:157 tcpConn.SetKeepAlivePeriod() = error:%vset tcp 10.0.2.15:43983->172.31.40.48:28089: setsockopt: invalid argument
github.com/apache/dubbo-go/remoting/getty.(*gettyRPCClient).newSession
/golang/monitor-agent/vendor/github.com/apache/dubbo-go/remoting/getty/pool.go:157
github.com/apache/dubbo-getty.(*client).connect
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:391
github.com/apache/dubbo-getty.(*client).reConnect
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:443
github.com/apache/dubbo-getty.(*client).RunEventLoop
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:421
panic: @rtimeout < 1

goroutine 6331 [running]:
github.com/apache/dubbo-getty.(*gettyConn).SetReadTimeout(0xc000b5e410, 0x0)
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/connection.go:118 +0x65
github.com/apache/dubbo-go/remoting/getty.(*gettyRPCClient).newSession(0xc00017e000, 0x12436d0, 0xc0004569c0, 0x12436d0, 0xc0004569c0)
/golang/monitor-agent/vendor/github.com/apache/dubbo-go/remoting/getty/pool.go:171 +0x892
github.com/apache/dubbo-getty.(*client).connect(0xc000a61040)
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:391 +0xa4
github.com/apache/dubbo-getty.(*client).reConnect(0xc000a61040)
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:443 +0x56
github.com/apache/dubbo-getty.(*client).RunEventLoop(0xc000a61040, 0xc000254410)
/golang/monitor-agent/vendor/github.com/apache/dubbo-getty/client.go:421 +0x6d
created by github.com/apache/dubbo-go/remoting/getty.newGettyRPCClientConn
/golang/monitor-agent/vendor/github.com/apache/dubbo-go/remoting/getty/pool.go:82 +0x22b
``
dubbo-go v1.5.6和v3.0.0都有这个问题

@LaurenceLiZhixin LaurenceLiZhixin added the bug Something isn't working label Aug 6, 2021
@LaurenceLiZhixin
Copy link
Contributor

@Mulavar

@Lvnszn
Copy link
Contributor

Lvnszn commented Aug 6, 2021

你好,可以了解一下您这边的配置会替换掉consumerConfig里面的protocalConf这个字段么? @gaohuag

@LaurenceLiZhixin
Copy link
Contributor

@gaohuag Any feedback?

@Mulavar
Copy link
Member

Mulavar commented Aug 13, 2021

能否具体描述一下产生这个问题时的场景,比如当时你在做什么操作,是起了大量client或者是写了复杂的调用逻辑么?

@LaurenceLiZhixin LaurenceLiZhixin added the occupied Issue has been occupied label Aug 13, 2021
@Mulavar
Copy link
Member

Mulavar commented Aug 17, 2021

看日志,应该是设置 getty 参数时 tcp_read_timeout 设置的值过小,这个参数必须大于等于 1s,否则就会 panic。

zouyx added a commit that referenced this issue Aug 24, 2021
…tion_when_tcp_timeout_is_less_than_1

Fix: fix the exception when tcp timeout is less than 1s for 3.0 #1362
LaurenceLiZhixin pushed a commit that referenced this issue Aug 27, 2021
…#1388)

* 修复当getty的tcp read/write timeout小于1s时panic的问题

* 优化代码逻辑

* Getty TCP Write Timeout Min Value调整为1s

* 不再使用范围比较

* 更新TCP读写超时最小值命名

Co-authored-by: Changeden <chenzhiduan@unizone.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working occupied Issue has been occupied
Projects
None yet
Development

No branches or pull requests

4 participants