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

HTTP clientStreamConnection读取发生错误时,会导致后续连接复用卡死 #2329

Open
yejialiango opened this issue Jun 7, 2023 · 1 comment

Comments

@yejialiango
Copy link
Contributor

Describe the bug

现象:client -serverStream-> mosn -clientStream-> server, 当clientStream读取响应发生错误时(比如响应头超过8KB),直接进行reset归还了activeClient没有关闭连接,此时clientStreamConnection.serve已经退出。由于active已经归还,后续复用时已经没有clientStreamConnection.serve任务去处理响应了,因此会卡死。

原因:
pkg/stream/http/stream.go:265
image

pkg/stream/http/stream.go:300
未关闭连接
image
image
归还activeClient
image
image

reset后return
image

可能的解决方案:reset前设置activeClient.closeConn = true使该连接关闭

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • MOSN Version
@doujiang24
Copy link
Member

感谢报告,欢迎 PR~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants