connect_re returns ACTION_RESULT_DONE while the callback is still pending

Ouverte
#14,194 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
57/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
cpp
Domaine
backend, networking

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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

Langage dominant
C++
Étoiles
2k
Forks
903
Merge moyen
4 j 4 h
PR mergées (30 j)
135

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de apache/trafficserver

Toutes les issues de apache/trafficserver

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.