dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

[BUG] TestStreamForServer fails in CI with QUIC port announcement error (not reproducible locally)

Open nanjiek opened this issue 11 months ago • 6 comments

✅ 验证清单

  • [x] 🔍 我已经搜索过 现有 Issues,确信这不是重复问题

🚀 Go 版本

1.25.0

📦 Dubbo-go 版本

v3.3.0

🖥️ 服务端配置

No response

💻 客户端配置

No response

🌐 协议配置

No response

📋 注册中心配置

No response

💾 操作系统

🐧 Linux

📝 Bug 描述

WARN	triple_protocol/negotiation.go:244	Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr
2025/12/23 06:22:25 http: TLS handshake error from 127.0.0.1:36564: read tcp 127.0.0.1:37861->127.0.0.1:36564: use of closed network connection
--- FAIL: TestStreamForServer (0.00s)
    --- FAIL: TestStreamForServer/client-stream-conn (0.00s)
        triple_ext_test.go:1668: 
            assertion:	assert.Nil
            got:	unknown: write envelope: EOF
            
FAIL

🔄 重现步骤

Run make test locally: TestStreamForServer passes without errors. Run the same test in CI (GitHub Actions/GitLab CI/etc.): The test consistently fails with the above logs. No code changes (e.g., only comment modifications) trigger a full CI test run, which reproduces the failure (confirming it is environment-dependent, not code-dependent).

✅ 预期行为

The TestStreamForServer test should pass stably in both local and CI environments, with no port announcement or connection closure errors.

❌ 实际行为

In the server-side handler (the client-stream-conn subtest case), intentionally invoking stream.Conn().Send("not-proto") triggers an error, yet the server still returns a response afterward. Currently, a send error in StreamingHandlerConn causes the server to close/half-close the connection prematurely. When the client attempts to write the final frame during CloseAndReceive, it receives the error unknown: write envelope: EOF, while the test expects a nil result.

nanjiek avatar Dec 23 '25 06:12 nanjiek

@CAICAIIs

nanjiek avatar Dec 23 '25 06:12 nanjiek

I am unable to reproduce this problem, it works fine in my local and CI environments. Please allow me to verify if this issue exists.

marsevilspirit avatar Dec 23 '25 16:12 marsevilspirit

He encountered a problem here: https://github.com/apache/dubbo-go/actions/runs/20453172952/job/58770084585

CAICAIIs avatar Dec 23 '25 16:12 CAICAIIs

Two points of doubt:

  1. The problem seems to be with HTTP/3. My current guess is that triple HTTP/3 support on Steam is not yet fully developed. Since HTTP/3 uses the QUIC protocol, an EOF error will occur when the packet length is incorrect. See #2912 for more information.
  2. This unit test shouldn't be running HTTP/3 code. We need to investigate why there's a WARN log indicating a QUIC header is being set.

marsevilspirit avatar Dec 23 '25 17:12 marsevilspirit

More Detail:2025-12-23T06:22:24.142Z WARN triple_protocol/negotiation.go:244 Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr 2025-12-23T06:22:24.142Z WARN triple_protocol/negotiation.go:244 Failed to set QUIC headers for /test: no port can be announced, specify it explicitly using Server.Port or Server.Addr 2025/12/23 06:22:25 http: TLS handshake error from 127.0.0.1:36564: read tcp 127.0.0.1:37861->127.0.0.1:36564: use of closed network connection --- FAIL: TestStreamForServer (0.00s) --- FAIL: TestStreamForServer/client-stream-conn (0.00s) triple_ext_test.go:1668: assertion: assert.Nil got: unknown: write envelope: EOF

FAIL

nanjiek avatar Dec 24 '25 08:12 nanjiek

close via #3379

Alanxtl avatar Jun 16 '26 03:06 Alanxtl