Leadaxe:sing-box-lx 修复 XHTTP 连接测试的失败根因识别
Leadaxe 表示,lx 分支提交 37e4e7e4e 修复了 XHTTP 连接测试中将响应拒绝误判为已恢复的问题。父传输阶段返回成功时,并不一定已等待下载响应;修复以 Unawaited 标记这类子阶段,使其失败不再仅因结束时间早于父阶段而被过滤。他还修正了 UDP 测试中的并发夹具问题;文末两项 Windows 轮询测试当时仍待确认,随后另有修复说明。
作者原文@LeadaxeThanks for the careful report. Fixed in 37e4e7e4e on
lx.
TestTransportStage_LX/refused— this was a real defect inrootCause, not only in the test. The test lives intransport/v2rayxhttp(build tagwith_lx_command), notcommon/lxtrace. The XHTTPtransportstage ends OK whenDialContextreturns, without waiting for the download response, androotCausetold a recovered failure from a late refusal by end times alone. A refusal handled before the dial returned — or within the same clock tick, which is common on Windows where Go's monotonic clock advances in interrupt ticks — was treated as recovered by the parent's OK, and the root cause came out 0. In a connection test that reads as "the path was completed".The fix is structural rather than a timing tweak:
Stage.Unawaited()marks a child whose outcome the parent does not wait for, and its failure is never filtered as recovered, whichever ended first.transport_responseis marked so. Real recoveries (MASQUE h3 → h2, TrustTunnel session replacement) keep the existing rule.TestRootCauseSkipsRecoveredFailuregained cases with explicit end times — child before parent and an exact tie — which fail without the fix.
TestRRUDP_poolSkipsDeadAndQuarantined— reproduced on macOS (3/100 under-race). Applied yourholdRound/dropRoundsuggestion; 100/100 after.
TestRRAlgo_10_secondSoftSignShifts,TestRRStand9_searchPickGivesNoExtraRound— both pass here, no Windows host to confirm. A likely candidate is the same clock-tick tie:rrHeal.countscomparesrrClock(start) >= epoch, so a pick made just before the pause can land in the pause's tick on Windows. Not changed — unconfirmed hypothesis only; a Windows run with the tick in mind would settle it.