connect_re returns ACTION_RESULT_DONE while the callback is still pending

Aperta
#14,194 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
cpp

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
2k
Fork
903
Merge medio
4g 4h
PR unite (30g)
135

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/trafficserver

Tutte le issue di apache/trafficserver

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.