connect_re returns ACTION_RESULT_DONE while the callback is still pending

未关闭
#14,194 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
57/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp

调研方向

Read the cited paths in UnixNetProcessor.cc, Socks.cc, and QUICNetProcessor.cc, then follow how SocksEntry and vc->action_ provide cancellable actions. Start by checking the connect_re return paths against the behavior described in Action.h and PendingAction.h. Done means the SOCKS and QUIC paths return the specified cancellable actions while still delivering the callback; verify with the relevant networking tests.

由索引模型根据 Issue 内容生成。

描述

Bug Network QUIC SOCKS

ACTION_RESULT_DONE tells the caller that the request left nothing to cancel (Action.h#L242-L256). Two connect_re implementations return it while a callback is still on its way, so the caller can't cancel the connect.

SOCKS retry. In UnixNetProcessor.cc#L243-L252, when SOCKS is in use and the inline connectUp() fails, connect_re returns ACTION_RESULT_DONE. But connectUp() reports the failure to the SocksEntry, not the user (UnixNetVConnection.cc#L1243-L1245). SocksEntry::startEvent then picks the next SOCKS server and calls connect_re again asynchronously (Socks.cc#L205-L230). The user's continuation is called back later with NET_EVENT_OPEN or NET_EVENT_OPEN_FAILED from SocksEntry::free() (Socks.cc#L161-L175). HttpSM stores the result in pending_action (HttpSM.cc#L6308), and PendingAction ignores ACTION_RESULT_DONE (PendingAction.h#L99). If the transaction ends before the retry finishes, nothing cancels the SocksEntry, and its callback reaches a continuation that may already be gone.

QUIC (quiche). QUICNetProcessor::connect_re returns ACTION_RESULT_DONE on every success path (QUICNetProcessor.cc#L203-L223). NET_EVENT_OPEN is only delivered after the handshake completes, from _start_application() (QUICNetVConnection.cc#L283). The only in-tree caller is traffic_quic.

In both cases connect_re should return a real, cancellable Action: the SocksEntry action for SOCKS, and &vc->action_ for QUIC.


generated with Claude Opus 5.5 by Josiah VanderZee

主要语言
C++
星标
2k
派生
903
平均合并
4 天 4 小时
30 天内合并 PR
135

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/trafficserver 的其他 Issue

查看 apache/trafficserver 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。